diff options
author | cpldcpu <cpldcpu@gmail.com> | 2013-12-28 13:54:18 +0100 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2013-12-28 13:54:18 +0100 |
commit | c3de9534f78ff338031516e17f94c44480f25fed (patch) | |
tree | dd5a1a04b217d183ddba42719dca7715ecd50f22 /firmware/main.c | |
parent | 1a38f02b1117442b137a4a210ed250ab8fd3de21 (diff) | |
download | micronucleus-c3de9534f78ff338031516e17f94c44480f25fed.tar.gz micronucleus-c3de9534f78ff338031516e17f94c44480f25fed.tar.bz2 micronucleus-c3de9534f78ff338031516e17f94c44480f25fed.zip |
firmware: clean up entrymode
Diffstat (limited to 'firmware/main.c')
-rw-r--r-- | firmware/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/main.c b/firmware/main.c index 88753a8..0ab0682 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -301,8 +301,7 @@ int main(void) { ((uint8_t*)&idlePolls)[1]=((AUTO_EXIT_MS-AUTO_EXIT_NO_USB_MS) * 10UL)>>8; // write only high byte to save 6 bytes #endif -// if (bootLoaderStartCondition()||(pgm_read_byte(BOOTLOADER_ADDRESS - TINYVECTOR_RESET_OFFSET + 1)==0xff)) { - if (bootLoaderStartCondition()) { + if (bootLoaderStartCondition()||(pgm_read_byte(BOOTLOADER_ADDRESS - TINYVECTOR_RESET_OFFSET + 1)==0xff)) { initHardware(); LED_INIT(); @@ -322,9 +321,9 @@ int main(void) { writeFlashPage(); } - LED_MACRO( ((uint8_t*)&idlePolls)[1] ) - + LED_MACRO( ((uint8_t*)&idlePolls)[1] ); idlePolls++; + // Try to execute program if bootloader exit condition is met if (AUTO_EXIT_MS&&(idlePolls>AUTO_EXIT_MS*10)) fireEvent(EVENT_EXECUTE); |