diff options
author | cpldcpu <cpldcpu@gmail.com> | 2013-11-18 11:46:42 +0100 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2013-11-18 11:46:42 +0100 |
commit | 2c68cadee6f195a0be04a2bb8fbeb4bad5a91569 (patch) | |
tree | 0b1940a7d0fa17f5c72566d9b4b8f618e0844f40 /firmware/main.c | |
parent | a9c9f4d6329df9b958e5b78d25edfa1c6ea292f4 (diff) | |
download | micronucleus-2c68cadee6f195a0be04a2bb8fbeb4bad5a91569.tar.gz micronucleus-2c68cadee6f195a0be04a2bb8fbeb4bad5a91569.tar.bz2 micronucleus-2c68cadee6f195a0be04a2bb8fbeb4bad5a91569.zip |
Dont wait for writes - CPU is halted anyways.
Diffstat (limited to 'firmware/main.c')
-rw-r--r-- | firmware/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/main.c b/firmware/main.c index ad08895..bd936e0 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -137,7 +137,7 @@ static inline void eraseApplication(void) { ptr -= SPM_PAGESIZE; boot_page_erase(ptr); - boot_spm_busy_wait(); + // boot_spm_busy_wait(); // CPU is halted anyways } currentAddress = 0; @@ -150,7 +150,8 @@ static void writeFlashPage(void) { uint8_t previous_sreg = SREG; // backup current interrupt setting cli(); boot_page_write(currentAddress - 2); - boot_spm_busy_wait(); // Wait until the memory is written. + // boot_spm_busy_wait(); // Wait until the memory is written. + // CPU is halted anyways SREG = previous_sreg; // restore interrupts to previous state } |