projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
State information for class drivers is now zeroed out during enumeration (both in...
[pub/USBasp.git]
/
Demos
/
Host
/
LowLevel
/
KeyboardHost
/
KeyboardHost.c
diff --git
a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
index
c2d8dd4
..
1a53526
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
+++ b/
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
@@
-156,10
+156,7
@@
void ReadNextReport(void)
if (KeyboardReport.KeyCode)
\r
{
\r
/* Toggle status LED to indicate keypress */
\r
if (KeyboardReport.KeyCode)
\r
{
\r
/* Toggle status LED to indicate keypress */
\r
- if (LEDs_GetLEDs() & LEDS_LED2)
\r
- LEDs_TurnOffLEDs(LEDS_LED2);
\r
- else
\r
- LEDs_TurnOnLEDs(LEDS_LED2);
\r
+ LEDs_ToggleLEDs(LEDS_LED2);
\r
\r
char PressedKey = 0;
\r
\r
\r
char PressedKey = 0;
\r
\r
@@
-230,9
+227,6
@@
void Keyboard_HID_Task(void)
break;
\r
}
\r
\r
break;
\r
}
\r
\r
- USB_HostState = HOST_STATE_Configured;
\r
- break;
\r
- case HOST_STATE_Configured:
\r
/* HID class request to set the keyboard protocol to the Boot Protocol */
\r
USB_ControlRequest = (USB_Request_Header_t)
\r
{
\r
/* HID class request to set the keyboard protocol to the Boot Protocol */
\r
USB_ControlRequest = (USB_Request_Header_t)
\r
{
\r
@@
-262,9
+256,9
@@
void Keyboard_HID_Task(void)
\r
puts_P(PSTR("Keyboard Enumerated.\r\n"));
\r
\r
\r
puts_P(PSTR("Keyboard Enumerated.\r\n"));
\r
\r
- USB_HostState = HOST_STATE_
Ready
;
\r
+ USB_HostState = HOST_STATE_
Configured
;
\r
break;
\r
break;
\r
- case HOST_STATE_
Ready
:
\r
+ case HOST_STATE_
Configured
:
\r
/* If a report has been received, read and process it */
\r
ReadNextReport();
\r
\r
/* If a report has been received, read and process it */
\r
ReadNextReport();
\r
\r