diff options
Diffstat (limited to 'Demos/Host/ClassDriver')
-rw-r--r-- | Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c | 8 | ||||
-rw-r--r-- | Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index 9b6125e6c..38af3a7c5 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c @@ -137,9 +137,13 @@ int main(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/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index abb391cee..d7df58f07 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -157,9 +157,13 @@ int main(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) { |