X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/c05c7c7df46a0377db8a72cb32f06aa40153d3e1..24f730fce3f2022762011d795c3feada5ef874b3:/Projects/XPLAINBridge/XPLAINBridge.c diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 68cca5446..bd684b39b 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -8,7 +8,6 @@ /* Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Copyright 2009 John Steggall (steggall.j@gmail.com) Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby @@ -117,13 +116,19 @@ void SetupHardware(void) /* Hardware Initialization */ SoftUART_Init(); + LEDs_Init(); USB_Init(); + + PORTD |= (1 << 5); // PD5 is connected to the XMEGA /RESET, enable pullup } /** Event handler for the library USB Configuration Changed event. */ void EVENT_USB_Device_ConfigurationChanged(void) { - CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface); + LEDs_SetAllLEDs(LEDS_LED1); + + if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface))) + LEDs_SetAllLEDs(LEDS_NO_LEDS); } /** Event handler for the library USB Unhandled Control Request event. */