X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/2ee9fc707784e115d744dbc229bdc893f4bb6bc1..23f3c3deee8bd153d59f2ac4e659c71ee75915f7:/Demos/OTG/TestApp/TestEvents.c diff --git a/Demos/OTG/TestApp/TestEvents.c b/Demos/OTG/TestApp/TestEvents.c index a444cc6a6..9b091472f 100644 --- a/Demos/OTG/TestApp/TestEvents.c +++ b/Demos/OTG/TestApp/TestEvents.c @@ -31,7 +31,7 @@ /** \file * * This file contains dummy handlers for all the possible USB events passed to the - * application by the library (see \ref Group_Events documentation for more details on USB events). + * application by the library (see library documentation for more details on USB events). * * Each event is caught and printed to the USART so that they may be monitored. */ @@ -79,9 +79,6 @@ void EVENT_USB_VBUSDisconnect(void) void EVENT_USB_Connect(void) { puts_P(PSTR(EVENT_PREFIX "USB +\r\n")); - LEDs_SetAllLEDs(LEDS_LED2 | LEDS_LED3 | LEDS_LED4); - - Scheduler_SetTaskMode(USB_USBTask, TASK_RUN); } /** @@ -90,24 +87,19 @@ void EVENT_USB_Connect(void) */ void EVENT_USB_Disconnect(void) { - Scheduler_SetTaskMode(USB_USBTask, TASK_STOP); - puts_P(PSTR(EVENT_PREFIX "USB -\r\n")); - LEDs_SetAllLEDs(LEDS_LED2 | LEDS_LED3 | LEDS_LED3); } /** Event handler for the USB_Suspend event. When fired, the event is logged to the USART. */ void EVENT_USB_Suspend(void) { puts_P(PSTR(EVENT_PREFIX ESC_BG_YELLOW "USB Sleep\r\n")); - LEDs_SetAllLEDs(LEDS_ALL_LEDS); } /** Event handler for the USB_WakeUp event. When fired, the event is logged to the USART. */ void EVENT_USB_WakeUp(void) { puts_P(PSTR(EVENT_PREFIX ESC_BG_GREEN "USB Wakeup\r\n")); - LEDs_SetAllLEDs(LEDS_LED2 | LEDS_LED4); } /** Event handler for the USB_Reset event. When fired, the event is logged to the USART. */ @@ -129,8 +121,6 @@ void EVENT_USB_UIDChange(void) ModeStrPtr = PSTR("DEVICE"); else ModeStrPtr = PSTR("N/A"); - - LEDs_SetAllLEDs(LEDS_LED2 | LEDS_LED3); printf_P(PSTR(" -- New Mode %S\r\n"), ModeStrPtr); } @@ -179,18 +169,6 @@ void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t Su printf_P(PSTR(" -- In State %d\r\n"), USB_HostState); } -/** - * Event handler for the USB_DeviceError event. When fired, the event is logged to the USART and the program - * execution aborted. - */ -void EVENT_USB_DeviceError(const uint8_t ErrorCode) -{ - puts_P(PSTR(EVENT_PREFIX ESC_BG_RED "Device Mode Error\r\n")); - printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode); - - Abort_Program(); -} - /** Event handler for the USB_UnhandledControlPacket event. When fired, the event is logged to the USART. */ void EVENT_USB_UnhandledControlPacket(void) { @@ -204,16 +182,12 @@ void EVENT_USB_UnhandledControlPacket(void) void EVENT_USB_ConfigurationChanged(void) { puts_P(PSTR(EVENT_PREFIX "Configuration Number Changed\r\n")); - - LEDs_SetAllLEDs(LEDS_LED2 | LEDS_LED4); } /** Event handler for the USB_DeviceAttached event. When fired, the event is logged to the USART. */ void EVENT_USB_DeviceAttached(void) { puts_P(PSTR(EVENT_PREFIX ESC_BG_GREEN "Device +\r\n")); - - Scheduler_SetTaskMode(USB_USBTask, TASK_RUN); } /** Event handler for the USB_DeviceUnattached event. When fired, the event is logged to the USART. */