aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-04-23 03:50:13 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-04-23 03:50:13 +0000
commitc0833c3f91890fbb5b5cb10d3314aa6fa1ae4c56 (patch)
treeba6f6efc12de94994394606ed9601c93eebdb6fb
parent1046622376c63bdaa7857e109b8033cf1d02217a (diff)
Make DFU and CDC class bootloaders also toggle the LEDs on command activity in addition to the periodic flashing.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1744 d5102386-fcda-11dd-9fdb-3debd5008f28
-rw-r--r--Bootloaders/CDC/BootloaderCDC.c3
-rw-r--r--Bootloaders/DFU/BootloaderDFU.c11
2 files changed, 10 insertions, 4 deletions
diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c
index ba0a629b..7695e33d 100644
--- a/Bootloaders/CDC/BootloaderCDC.c
+++ b/Bootloaders/CDC/BootloaderCDC.c
@@ -148,6 +148,9 @@ void EVENT_USB_Device_ControlRequest(void)
return;
}
+ /* Activity - toggle indicator LEDs */
+ LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2);
+
/* Process CDC specific control requests */
switch (USB_ControlRequest.bRequest)
{
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c
index 9f616607..fdd4d2de 100644
--- a/Bootloaders/DFU/BootloaderDFU.c
+++ b/Bootloaders/DFU/BootloaderDFU.c
@@ -181,10 +181,7 @@ ISR(TIMER1_OVF_vect, ISR_BLOCK)
* internally.
*/
void EVENT_USB_Device_ControlRequest(void)
-{
- /* Get the size of the command and data from the wLength value */
- SentCommand.DataSize = USB_ControlRequest.wLength;
-
+{
/* Ignore any requests that aren't directed to the DFU interface */
if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
(REQTYPE_CLASS | REQREC_INTERFACE))
@@ -192,6 +189,12 @@ void EVENT_USB_Device_ControlRequest(void)
return;
}
+ /* Activity - toggle indicator LEDs */
+ LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2);
+
+ /* Get the size of the command and data from the wLength value */
+ SentCommand.DataSize = USB_ControlRequest.wLength;
+
switch (USB_ControlRequest.bRequest)
{
case DFU_REQ_DNLOAD: