diff options
Diffstat (limited to 'upgrade/upgrade.c')
-rw-r--r-- | upgrade/upgrade.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/upgrade/upgrade.c b/upgrade/upgrade.c index dc5d449..2541f09 100644 --- a/upgrade/upgrade.c +++ b/upgrade/upgrade.c @@ -50,6 +50,8 @@ int main(void) { beep(); + reboot(); + return 0; } @@ -156,6 +158,12 @@ void beep(void) { } } +void reboot(void) { + void (*ptrToFunction)(); // pointer to a function + ptrToFunction = 0x0000; + (*ptrToFunction)(); // reset! +} + ////////////// Add padding to start of program so no program code could reasonably be erased while program is running // this never needs to be called - avr-gcc stuff happening: http://www.nongnu.org/avr-libc/user-manual/mem_sections.html |