diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-01-31 18:55:17 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-01-31 18:55:17 +0100 |
commit | e0bc7fae75b59324764abf4680a065caddcc70c2 (patch) | |
tree | 15b68e2cf554c59336b5a1c24c4be6d8978f9de4 /src/system.h | |
parent | 49d24d31aebe97a56bb9cb4f1657edbb897ae64b (diff) |
add rocket.initialize() function for initial MCU and peripheral setup
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/system.h b/src/system.h index b36e348..7c0ab80 100644 --- a/src/system.h +++ b/src/system.h @@ -1,7 +1,3 @@ -#include <avr/io.h> -#include <avr/interrupt.h> -#include <avr/wdt.h> -#include <util/delay.h> #include <stdlib.h> #define SHUTDOWN_THRESHOLD 2048 @@ -18,6 +14,14 @@ class System { System() { want_shutdown = 0; }; /** + * Initial MCU setup. Turns off unused peripherals to save power + * and configures the button pins. Also configures all other pins + * and peripherals using the enable function of their respective + * classes. Turns on interrupts once that's done. + */ + void initialize(void); + + /** * System idle loop. Checks for button presses, handles * standby/resume, reads data from the Modem and updates the Display. * |