aboutsummaryrefslogtreecommitdiff
path: root/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-09-19 05:46:17 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-09-19 05:46:17 +0000
commit19c64c52cdbc6189366921445861333689b1f603 (patch)
tree70077edc3850e20b9e680ba533155bada92cf079 /Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
parentc833b03ef0447798cdb28bc41c9e44cf926c0262 (diff)
Ensure device address latch bit is not set at the same time as the new address, as per datasheet.
Minor documentation fixes. Fix broken USB host mode due to the USB frame counter not being updated during the early enumeration steps, causing USB_Host_DelayMS() to spinloop forever. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1485 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c')
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
index cd6bf59e..1b905b11 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
@@ -82,3 +82,12 @@ void SetupHardware(void)
Buttons_Init();
USB_Init(USB_MODE_UID);
}
+
+/** Event handler for the library USB mode change event. */
+void EVENT_USB_UIDChange(void)
+{
+ printf_P(PSTR(ESC_FG_YELLOW "UID Change to %S mode\r\n" ESC_FG_WHITE),
+ (USB_CurrentMode == USB_MODE_DEVICE) ? PSTR("Device") : PSTR("Host"));
+
+ LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+}