X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/cce8760b9169dffe1a126e221f4b4c48c83192b9..01fecac0a70b02ccb197091935052fcfc9955b26:/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c index cd6bf59ee..1b905b114 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); +}