diff options
author | AJM <poslathian@poslathian.(none)> | 2010-04-25 17:42:34 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2010-05-20 22:09:16 -0400 |
commit | ba9ff3861bbcc17c78086b1887691c324f13ba0e (patch) | |
tree | 15e3203954cc568065b219a576a344ebbeaeefdd /core/usb/usb_callbacks.c | |
parent | fc4b9b386a80d06c73e03d70767643aae3961e2a (diff) | |
download | librambutan-ba9ff3861bbcc17c78086b1887691c324f13ba0e.tar.gz librambutan-ba9ff3861bbcc17c78086b1887691c324f13ba0e.zip |
added a delay to the resrt slide to allow enough time for graceul closures of the serial port
Diffstat (limited to 'core/usb/usb_callbacks.c')
-rw-r--r-- | core/usb/usb_callbacks.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/usb/usb_callbacks.c b/core/usb/usb_callbacks.c index f4c491b..08d62c5 100644 --- a/core/usb/usb_callbacks.c +++ b/core/usb/usb_callbacks.c @@ -232,11 +232,19 @@ RESULT usbNoDataSetup(u8 request) { case DTR_NRTS: if (new_signal == 0) { - systemHardReset(); + /* dont reset here, otherwise + well likely crash the host! */ + reset_state = RESET_NOW; } else { reset_state = START; } break; + case RESET_NEXT: + reset_state = RESET_NOW; + break; + case RESET_NOW: + /* do nothing, wait for reset */ + break; } return USB_SUCCESS; } |