diff options
author | Dean Camera <[email protected]> | 2011-04-23 03:50:13 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2011-04-23 03:50:13 +0000 |
commit | 0407b92584ead02122f5273fde380dd8a272e83c (patch) | |
tree | ba6f6efc12de94994394606ed9601c93eebdb6fb /Bootloaders/DFU/BootloaderDFU.c | |
parent | 513db46548c4757d912d158d0e261520c9ee608c (diff) | |
download | qmk_firmware-0407b92584ead02122f5273fde380dd8a272e83c.tar.gz qmk_firmware-0407b92584ead02122f5273fde380dd8a272e83c.zip |
Make DFU and CDC class bootloaders also toggle the LEDs on command activity in addition to the periodic flashing.
Diffstat (limited to 'Bootloaders/DFU/BootloaderDFU.c')
-rw-r--r-- | Bootloaders/DFU/BootloaderDFU.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 9f61660758..fdd4d2de61 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: |