From b3d3d2161c2d8ae685390b6d635ccc9e2a5df9aa Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 8 Jan 2012 15:41:11 +0100 Subject: DFU: toggle LED on upload and download --- usb-dfu-experiment/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usb-dfu-experiment') diff --git a/usb-dfu-experiment/main.c b/usb-dfu-experiment/main.c index e9ef876..2fdd981 100644 --- a/usb-dfu-experiment/main.c +++ b/usb-dfu-experiment/main.c @@ -334,7 +334,9 @@ int USBDFU_handle_upload(uint8_t altif, unsigned int offset, if (req_len < real_len) real_len = req_len; + LED_Set(USBD_LEDOTHER); memcpy(buf, addr, real_len); + LED_Clear(USBD_LEDOTHER); return real_len; } @@ -368,7 +370,9 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset, case ALTIF_FPGA: /* SAM3U Errata 46.2.1.3 */ SetFlashWaitState(6); + LED_Set(USBD_LEDOTHER); rc = FLASHD_Write(addr, buf, len); + LED_Clear(USBD_LEDOTHER); /* SAM3U Errata 46.2.1.3 */ SetFlashWaitState(2); if (rc != 0) { -- cgit v1.2.3