diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-10-28 23:11:49 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-10-28 23:11:49 +0000 |
commit | b8dfa976ce796ede92dfefa6a39eb0a3b08acdce (patch) | |
tree | 8144660271140732a299511aa31159c12239ee55 /Demos/Device/ClassDriver | |
parent | 2d49c09b384375298a4995b79c4b29e8d9390cd6 (diff) | |
download | lufa-b8dfa976ce796ede92dfefa6a39eb0a3b08acdce.tar.gz lufa-b8dfa976ce796ede92dfefa6a39eb0a3b08acdce.tar.bz2 lufa-b8dfa976ce796ede92dfefa6a39eb0a3b08acdce.zip |
Added standard keyboard HID report scancode defines (thanks to László Monda).
Diffstat (limited to 'Demos/Device/ClassDriver')
3 files changed, 17 insertions, 17 deletions
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c index d17b238ef..34dee99d0 100644 --- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c +++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c @@ -149,20 +149,20 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn uint8_t UsedKeyCodes = 0; if (JoyStatus_LCL & JOY_UP) - KeyboardReport->KeyCode[UsedKeyCodes++] = 0x04; // A + KeyboardReport->KeyCode[UsedKeyCodes++] = HID_KEYBOARD_SC_A; else if (JoyStatus_LCL & JOY_DOWN) - KeyboardReport->KeyCode[UsedKeyCodes++] = 0x05; // B + KeyboardReport->KeyCode[UsedKeyCodes++] = HID_KEYBOARD_SC_B; if (JoyStatus_LCL & JOY_LEFT) - KeyboardReport->KeyCode[UsedKeyCodes++] = 0x06; // C + KeyboardReport->KeyCode[UsedKeyCodes++] = HID_KEYBOARD_SC_C; else if (JoyStatus_LCL & JOY_RIGHT) - KeyboardReport->KeyCode[UsedKeyCodes++] = 0x07; // D + KeyboardReport->KeyCode[UsedKeyCodes++] = HID_KEYBOARD_SC_D; if (JoyStatus_LCL & JOY_PRESS) - KeyboardReport->KeyCode[UsedKeyCodes++] = 0x08; // E + KeyboardReport->KeyCode[UsedKeyCodes++] = HID_KEYBOARD_SC_E; if (ButtonStatus_LCL & BUTTONS_BUTTON1) - KeyboardReport->KeyCode[UsedKeyCodes++] = 0x09; // F + KeyboardReport->KeyCode[UsedKeyCodes++] = HID_KEYBOARD_SC_F; if (UsedKeyCodes) KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT; diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index 245bf0755..61f22d2ab 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -185,17 +185,17 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT; if (JoyStatus_LCL & JOY_UP) - KeyboardReport->KeyCode[0] = 0x04; // A + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_A; else if (JoyStatus_LCL & JOY_DOWN) - KeyboardReport->KeyCode[0] = 0x05; // B + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_B; if (JoyStatus_LCL & JOY_LEFT) - KeyboardReport->KeyCode[0] = 0x06; // C + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_C; else if (JoyStatus_LCL & JOY_RIGHT) - KeyboardReport->KeyCode[0] = 0x07; // D + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_D; if (JoyStatus_LCL & JOY_PRESS) - KeyboardReport->KeyCode[0] = 0x08; // E + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_E; *ReportSize = sizeof(USB_KeyboardReport_Data_t); return false; diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c index a81b4d969..7c5411033 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c @@ -198,20 +198,20 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT; if (JoyStatus_LCL & JOY_UP) - KeyboardReport->KeyCode[0] = 0x04; // A + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_A; else if (JoyStatus_LCL & JOY_DOWN) - KeyboardReport->KeyCode[0] = 0x05; // B + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_B; if (JoyStatus_LCL & JOY_LEFT) - KeyboardReport->KeyCode[0] = 0x06; // C + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_C; else if (JoyStatus_LCL & JOY_RIGHT) - KeyboardReport->KeyCode[0] = 0x07; // D + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_D; if (JoyStatus_LCL & JOY_PRESS) - KeyboardReport->KeyCode[0] = 0x08; // E + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_E; if (ButtonStatus_LCL & BUTTONS_BUTTON1) - KeyboardReport->KeyCode[0] = 0x09; // F + KeyboardReport->KeyCode[0] = HID_KEYBOARD_SC_F; *ReportSize = sizeof(USB_KeyboardReport_Data_t); return false; |