From 8afc89be1da70c2776333b3858532c6b753e11ce Mon Sep 17 00:00:00 2001 From: AJM Date: Wed, 9 Jun 2010 15:52:29 -0400 Subject: first approach at modding the reset scheme now we reset from recv bytes. After receiving the DTR/RTS toggle the next byte in from usb is parsed as the program_delay. For now, this just delays the reset for a period to close the serial port gracefully. Later, this delay will perhaps inform the bootloader of how long to live for... --- libmaple/usb/usb_callbacks.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libmaple/usb/usb_callbacks.h') diff --git a/libmaple/usb/usb_callbacks.h b/libmaple/usb/usb_callbacks.h index ed57fa1..d77a9fd 100644 --- a/libmaple/usb/usb_callbacks.h +++ b/libmaple/usb/usb_callbacks.h @@ -34,6 +34,7 @@ typedef enum { } RESET_STATE; extern RESET_STATE reset_state; /* tracks DTR/RTS */ +extern uint8 program_delay; extern volatile uint8 countTx; extern uint8 vcomBufferRx[VCOM_RX_EPSIZE]; /* no reason this has to be VCOM_RX_EPSIZE, could be bigger */ extern volatile uint8 recvBufIn; /* the FIFO in index to the recvbuffer */ -- cgit v1.2.3