summaryrefslogtreecommitdiffstats
path: root/firmware/main.c
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2013-11-18 11:46:42 +0100
committercpldcpu <cpldcpu@gmail.com>2013-11-18 11:46:42 +0100
commit2c68cadee6f195a0be04a2bb8fbeb4bad5a91569 (patch)
tree0b1940a7d0fa17f5c72566d9b4b8f618e0844f40 /firmware/main.c
parenta9c9f4d6329df9b958e5b78d25edfa1c6ea292f4 (diff)
downloadmicronucleus-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.c5
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
}