aboutsummaryrefslogtreecommitdiff
path: root/Demos/Host/LowLevel
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-06-03 07:56:12 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-06-03 07:56:12 +0000
commit89cc9f3774fbd8f3f6c9ba5c1166542c63740bd0 (patch)
treed56ff72432af73136b6c5a8c5fd9fa14da9b9852 /Demos/Host/LowLevel
parent6d096af48196bc98d476f06a96997f8041db837e (diff)
Added new callback to the Audio Class driver to allow for endpoint control manipulations such as data sample rates.
Modified the Class Driver AudioInput and AudioOutput demos to support multiple sample rates. Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed. Fix broken LowLevel audio demo descriptors. Minor documentation fixes. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1779 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/LowLevel')
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c8
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
index 84e6145f..6df052d7 100644
--- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
@@ -173,9 +173,13 @@ void ReadNextReport(void)
PressedKey = (KeyCode - HID_KEYBOARD_SC_A) + 'A';
}
else if ((KeyCode >= HID_KEYBOARD_SC_1_AND_EXCLAMATION) &
- (KeyCode <= HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS))
+ (KeyCode < HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS))
{
- PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '0';
+ PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '1';
+ }
+ else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)
+ {
+ PressedKey = '0';
}
else if (KeyCode == HID_KEYBOARD_SC_SPACE)
{
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index 512cc1ae..6ef7a967 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -287,9 +287,13 @@ void ProcessKeyboardReport(uint8_t* KeyboardReport)
PressedKey = (KeyCode - HID_KEYBOARD_SC_A) + 'A';
}
else if ((KeyCode >= HID_KEYBOARD_SC_1_AND_EXCLAMATION) &
- (KeyCode <= HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS))
+ (KeyCode < HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS))
{
- PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '0';
+ PressedKey = (KeyCode - HID_KEYBOARD_SC_1_AND_EXCLAMATION) + '1';
+ }
+ else if (KeyCode == HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS)
+ {
+ PressedKey = '0';
}
else if (KeyCode == HID_KEYBOARD_SC_SPACE)
{