projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed minor issue with the RNDISEthernet demo DHCP protocol decoder routine using...
[pub/lufa.git]
/
Demos
/
Host
/
KeyboardHostWithParser
/
KeyboardHostWithParser.c
diff --git
a/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
index
f7a0087
..
d19929d
100644
(file)
--- a/
Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/
Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
@@
-75,7
+75,7
@@
int main(void)
/* Initialize USB Subsystem */
\r
USB_Init();
\r
\r
/* Initialize USB Subsystem */
\r
USB_Init();
\r
\r
- /* Startup message */
\r
+ /* Start
-
up message */
\r
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
"Keyboard Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
\r
puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
"Keyboard Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
\r
@@
-132,7
+132,7
@@
EVENT_HANDLER(USB_HostError)
for(;;);
\r
}
\r
\r
for(;;);
\r
}
\r
\r
-/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occured while
\r
+/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occur
r
ed while
\r
* enumerating an attached USB device.
\r
*/
\r
EVENT_HANDLER(USB_DeviceEnumerationFailed)
\r
* enumerating an attached USB device.
\r
*/
\r
EVENT_HANDLER(USB_DeviceEnumerationFailed)
\r
@@
-199,7
+199,10
@@
TASK(USB_Keyboard_Host)
wLength: 0,
\r
};
\r
\r
wLength: 0,
\r
};
\r
\r
- /* Send the request, display error and wait for device detatch if request fails */
\r
+ /* Select the control pipe for the request transfer */
\r
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);
\r
+
\r
+ /* Send the request, display error and wait for device detach if request fails */
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
puts_P(PSTR("Control Error (Set Configuration).\r\n"));
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
puts_P(PSTR("Control Error (Set Configuration).\r\n"));
\r
@@
-255,7
+258,7
@@
TASK(USB_Keyboard_Host)
break;
\r
}
\r
\r
break;
\r
}
\r
\r
- /* All LEDs off - ready to indicate keypresses */
\r
+ /* All LEDs off - ready to indicate key
presses */
\r
UpdateStatus(Status_USBReady);
\r
\r
puts_P(PSTR("Keyboard Enumerated.\r\n"));
\r
UpdateStatus(Status_USBReady);
\r
\r
puts_P(PSTR("Keyboard Enumerated.\r\n"));
\r
@@
-282,7
+285,7
@@
TASK(USB_Keyboard_Host)
/* Check each HID report item in turn, looking for keyboard scan code reports */
\r
for (uint8_t ReportNumber = 0; ReportNumber < HIDReportInfo.TotalReportItems; ReportNumber++)
\r
{
\r
/* Check each HID report item in turn, looking for keyboard scan code reports */
\r
for (uint8_t ReportNumber = 0; ReportNumber < HIDReportInfo.TotalReportItems; ReportNumber++)
\r
{
\r
- /* Create a tempoary item pointer to the next report item */
\r
+ /* Create a tempo
r
ary item pointer to the next report item */
\r
HID_ReportItem_t* ReportItem = &HIDReportInfo.ReportItems[ReportNumber];
\r
\r
/* Check if the current report item is a keyboard scancode */
\r
HID_ReportItem_t* ReportItem = &HIDReportInfo.ReportItems[ReportNumber];
\r
\r
/* Check if the current report item is a keyboard scancode */
\r