aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-04-13 23:29:11 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-04-13 23:29:11 +0000
commit7b79325aa037db9786f0da069c11315a3f6d9721 (patch)
treec7cecdb1ed159e7f9c2331cb159e8b39bb6a8316 /Demos/Device
parent19ecd04f37f68c0674f1194aa8d8a4fc94d6168b (diff)
downloadlufa-7b79325aa037db9786f0da069c11315a3f6d9721.tar.gz
lufa-7b79325aa037db9786f0da069c11315a3f6d9721.tar.bz2
lufa-7b79325aa037db9786f0da069c11315a3f6d9721.zip
Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code.
Added spacing between multiple paragraphs in Doxygen \note sections. Removed call to the clock prescaler reset function in the Teensy bootloader to save space - the user application is accessed via a watchdog reset anyway, so the prescale reset would only affect the speed of the bootloader itself.
Diffstat (limited to 'Demos/Device')
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 26636bf41..db30ac579 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -146,9 +146,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
uint8_t ButtonStatus_LCL = Buttons_GetStatus();
uint8_t UsedKeyCodes = 0;
-
- KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;
-
+
if (JoyStatus_LCL & JOY_UP)
KeyboardReport->KeyCode[UsedKeyCodes++] = 0x04; // A
else if (JoyStatus_LCL & JOY_DOWN)
@@ -165,6 +163,9 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
KeyboardReport->KeyCode[UsedKeyCodes++] = 0x09; // F
+ if (UsedKeyCodes)
+ KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;
+
*ReportSize = sizeof(USB_KeyboardReport_Data_t);
return false;
}