Ooops - TeensyHID bootloader makefile should use a 16MHz FCPU, not 8MHz.
[pub/USBasp.git] / Projects / XPLAINBridge / XPLAINBridge.c
index 68cca54..bd684b3 100644 (file)
@@ -8,7 +8,6 @@
 \r
 /*\r
   Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-  Copyright 2009  John Steggall (steggall.j@gmail.com)\r
 \r
   Permission to use, copy, modify, and distribute this software\r
   and its documentation for any purpose and without fee is hereby\r
@@ -117,13 +116,19 @@ void SetupHardware(void)
 \r
        /* Hardware Initialization */\r
        SoftUART_Init();\r
+       LEDs_Init();\r
        USB_Init();\r
+       \r
+       PORTD |= (1 << 5); // PD5 is connected to the XMEGA /RESET, enable pullup\r
 }\r
 \r
 /** Event handler for the library USB Configuration Changed event. */\r
 void EVENT_USB_Device_ConfigurationChanged(void)\r
 {\r
-       CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);\r
+       LEDs_SetAllLEDs(LEDS_LED1);\r
+\r
+       if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface)))\r
+               LEDs_SetAllLEDs(LEDS_NO_LEDS);\r
 }\r
 \r
 /** Event handler for the library USB Unhandled Control Request event. */\r