From 2c68cadee6f195a0be04a2bb8fbeb4bad5a91569 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Mon, 18 Nov 2013 11:46:42 +0100 Subject: Dont wait for writes - CPU is halted anyways. --- firmware/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'firmware/main.c') 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 } -- cgit v1.2.3