aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-10-28 23:11:49 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-10-28 23:11:49 +0000
commitb8dfa976ce796ede92dfefa6a39eb0a3b08acdce (patch)
tree8144660271140732a299511aa31159c12239ee55 /Demos/Device/ClassDriver
parent2d49c09b384375298a4995b79c4b29e8d9390cd6 (diff)
downloadlufa-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')
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c12
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c10
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c12
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;