diff options
author | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-06-03 15:48:16 +0200 |
---|---|---|
committer | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-06-03 15:48:16 +0200 |
commit | 7c56be8a724e2b0647e5a6cbd55c7b0eb948206b (patch) | |
tree | 26cd8f60a780b03a04c92503775c08eaa29dd6c2 /src/main.cc | |
parent | 2bf8aede5419574a785ad89ffa0e4c87a9fff71d (diff) |
initial commit of all data
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..9e37b59 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2016 by Daniel Friesel + * + * License: You may use, redistribute and/or modify this file under the terms + * of either: + * * The GNU LGPL v3 (see COPYING and COPYING.LESSER), or + * * The 3-clause BSD License (see COPYING.BSD) + * + */ + +#include <avr/io.h> +#include <stdlib.h> + +#include "system.h" + +int main (void) +{ + rocket.initialize(); + + while (1) { + // nothing to do here, go to idle to save power + SMCR = _BV(SE); + asm("sleep"); + /* + * The display timer causes a wakeup after 256µs. Run the system + * loop after the timer's ISR is done. + * The Modem also causes wakeups, which is pretty convenient since + * it means we can immediately process the received data. + */ + rocket.loop(); + } + + return 0; +} |