aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-06-03 07:56:12 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-06-03 07:56:12 +0000
commit2731c3a8aef715c2ea27d541e946200bd4fc189f (patch)
treed56ff72432af73136b6c5a8c5fd9fa14da9b9852 /Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
parentc2135f2776e01842a775502c24b59d9169ffa851 (diff)
downloadlufa-2731c3a8aef715c2ea27d541e946200bd4fc189f.tar.gz
lufa-2731c3a8aef715c2ea27d541e946200bd4fc189f.tar.bz2
lufa-2731c3a8aef715c2ea27d541e946200bd4fc189f.zip
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.
Diffstat (limited to 'Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c')
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index 512cc1ae2..6ef7a9677 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)
{