diff options
| author | cpldcpu <cpldcpu@gmail.com> | 2014-03-06 11:32:18 +0100 | 
|---|---|---|
| committer | cpldcpu <cpldcpu@gmail.com> | 2014-03-06 11:32:18 +0100 | 
| commit | 7a1beac2f9daf4e538453b86db2311f85038ccb0 (patch) | |
| tree | a27be2169c7abc522665e591476b8e297ae9a4e2 | |
| parent | f920c73ff3f855a8b52cae07bffef752cc496c64 (diff) | |
| download | micronucleus-7a1beac2f9daf4e538453b86db2311f85038ccb0.tar.gz micronucleus-7a1beac2f9daf4e538453b86db2311f85038ccb0.tar.bz2 micronucleus-7a1beac2f9daf4e538453b86db2311f85038ccb0.zip  | |
firmware: Extend timeout with any USB traffic, set timeout to 6s
fixed weird bug with USB3.0 hub where MN is only recognized after 5s
| -rw-r--r-- | firmware/bootloaderconfig.h | 2 | ||||
| -rw-r--r-- | firmware/main.c | 5 | 
2 files changed, 3 insertions, 4 deletions
diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index d52fa8c..3c1fba5 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -149,7 +149,7 @@   */  #define AUTO_EXIT_NO_USB_MS    0 -#define AUTO_EXIT_MS           5000 +#define AUTO_EXIT_MS           6000   /*   *  Defines the setting of the RC-oscillator calibration after quitting the bootloader. (OSCCAL) diff --git a/firmware/main.c b/firmware/main.c index 59e4616..1c265c7 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -176,8 +176,6 @@ static void writeWordToPageBuffer(uint16_t data) {  static uint8_t usbFunctionSetup(uint8_t data[8]) {    usbRequest_t *rq = (void *)data; -  idlePolls.b[1]=0; // reset idle polls when we get usb traffic -    if (rq->bRequest == cmd_device_info) { // get device info      usbMsgPtr = (usbMsgPtr_t)configurationReply;      return sizeof(configurationReply);       @@ -281,7 +279,8 @@ int main(void) {          if (USB_INTR_PENDING & (1<<USB_INTR_PENDING_BIT)) {            USB_INTR_VECTOR();  // clears INT_PENDING (See se0: in asmcommon.inc) -          break; +          idlePolls.b[1]=0; // reset idle polls when we get usb traffic +         break;          }        } while(--fastctr);       | 
