diff options
author | cpldcpu <cpldcpu@gmail.com> | 2013-10-07 00:19:01 +0200 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2013-10-07 00:19:01 +0200 |
commit | 191d0c1957b92eb26b1553eba3e7ebc988d58b5e (patch) | |
tree | b54fde50b3f03122c430a8bb633068adfc85d11f | |
parent | 839fd47f9bb8c8195c337cf752a95b1a39bcb1e6 (diff) | |
download | micronucleus-191d0c1957b92eb26b1553eba3e7ebc988d58b5e.tar.gz micronucleus-191d0c1957b92eb26b1553eba3e7ebc988d58b5e.tar.bz2 micronucleus-191d0c1957b92eb26b1553eba3e7ebc988d58b5e.zip |
A single write is sufficient to invalidate magic word - saves 4 bytes
-rw-r--r-- | firmware/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/main.c b/firmware/main.c index d9f9949..6bc20d5 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -369,8 +369,8 @@ static inline void leaveBootloader(void) { USB_INTR_CFG = 0; /* also reset config bits */ // clear magic word from bottom of stack before jumping to the app - *(uint8_t*)(RAMEND) = 0x00; - *(uint8_t*)(RAMEND-1) = 0x00; + *(uint8_t*)(RAMEND) = 0x00; // A single write is sufficient to invalidate magic word + // *(uint8_t*)(RAMEND-1) = 0x00; // adjust clock to previous calibration value, so user program always starts with same calibration // as when it was uploaded originally |