Added one-second delay when switching between programmer and bootloader.
Just makes me feel better to ensure the "OK" confirmation arrives at the computer.
This commit is contained in:
parent
7d1888dab8
commit
40cc81446a
|
@ -167,6 +167,10 @@ void USBSerial_HandleWaitingForCommandByte(uint8_t byte)
|
|||
// Enter the bootloader. Wait a bit, then jump to the bootloader location.
|
||||
case EnterBootloader:
|
||||
SendByte(CommandReplyOK);
|
||||
CDC_Device_Flush(&VirtualSerial_CDC_Interface);
|
||||
|
||||
// Insert a small delay to ensure that it arrives before rebooting.
|
||||
_delay_ms(1000);
|
||||
|
||||
// Done with the USB interface -- the bootloader will re-initialize it.
|
||||
USB_Disable();
|
||||
|
|
Loading…
Reference in New Issue