X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/c5038f1bf44aea75f1ae1ed035cb7d523ccfdacb..18b0d408a9e68cbc1ce36da89d74a799d7fc31de:/Bootloaders/DFU/BootloaderDFU.c?ds=sidebyside diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index fb326a1d9..4184b190c 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -92,6 +92,7 @@ uint16_t StartAddr = 0x0000; */ uint16_t EndAddr = 0x0000; + /** Main program entry point. This routine configures the hardware required by the bootloader, then continuously * runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start * the loaded application code. @@ -141,15 +142,6 @@ void ResetHardware(void) MCUCR = 0; } -/** Event handler for the USB_Disconnect event. This indicates that the bootloader should exit and the user - * application started. - */ -void EVENT_USB_Device_Disconnect(void) -{ - /* Upon disconnection, run user application */ - RunBootloader = false; -} - /** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific * control requests that are not handled internally by the USB library (including the DFU commands, which are * all issued via the control endpoint), so that they can be handled appropriately for the application. @@ -698,11 +690,7 @@ static void ProcessReadCommand(void) uint8_t DataIndexToRead = SentCommand.Data[1]; if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Read bootloader info - { - ResponseByte = BootloaderInfo[DataIndexToRead]; - } + ResponseByte = BootloaderInfo[DataIndexToRead]; else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Read signature byte - { - ResponseByte = SignatureInfo[DataIndexToRead - 0x30]; - } + ResponseByte = SignatureInfo[DataIndexToRead - 0x30]; }