diff options
| author | cpldcpu <cpldcpu@gmail.com> | 2013-12-29 18:48:45 +0100 | 
|---|---|---|
| committer | cpldcpu <cpldcpu@gmail.com> | 2013-12-29 18:48:45 +0100 | 
| commit | 67039d6a1334e65db2e7dd4d5e97a81474d0ee71 (patch) | |
| tree | 51217de29c047569b44b573b1deabedb62547cbd | |
| parent | e7d1d1347cd6c220af783972a064d782047e2c56 (diff) | |
| download | micronucleus-67039d6a1334e65db2e7dd4d5e97a81474d0ee71.tar.gz micronucleus-67039d6a1334e65db2e7dd4d5e97a81474d0ee71.tar.bz2 micronucleus-67039d6a1334e65db2e7dd4d5e97a81474d0ee71.zip | |
fireware: Bugfix: no slowndown after timer overflow
| -rw-r--r-- | firmware/main.c | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/firmware/main.c b/firmware/main.c index 8394e7e..4673384 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -304,17 +304,18 @@ int main(void) {        clearEvents();        usbPoll(); -            +             idlePolls++;        // Try to execute program if bootloader exit condition is met -      if (AUTO_EXIT_MS&&(idlePolls>AUTO_EXIT_MS*10L)) fireEvent(EVENT_EXECUTE); +      if (AUTO_EXIT_MS&&(idlePolls==AUTO_EXIT_MS*10L)) fireEvent(EVENT_EXECUTE); +         LED_MACRO( ((uint8_t*)&idlePolls)[1] );        // Wait for USB traffic to finish before a blocking event is executed        // All events will render the MCU unresponsive to USB traffic for a while.        if (events) _delay_ms(2); - +         if (isEvent(EVENT_ERASE_APPLICATION)) eraseApplication();        if (isEvent(EVENT_WRITE_PAGE))        writeFlashPage();   | 
