summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorSebastian Muszytowski <sebastian@muszytowski.net>2016-01-22 18:52:10 +0100
committerSebastian Muszytowski <sebastian@muszytowski.net>2016-01-22 18:52:10 +0100
commit724f650b968e4029dfdd0f355cc8669e098b6880 (patch)
tree939baef3b38c1844d0dc35882b640b3b6def7a94 /src/main.cc
parent6e41844bfa547a69a2fbd8effb09aae15b203bff (diff)
parent84758ec540877a79d2c9a4403b2023aa5d31eb17 (diff)
Merge branch 'master' of github.com:blinkenrocket/firmware
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main.cc b/src/main.cc
index 9558109..4398d02 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -20,13 +20,7 @@ int main (void)
// Enable pull-ups on PC3 and PC7 (button pins)
PORTC |= _BV(PC3) | _BV(PC7);
- display.string[0] = 'O';
- display.string[1] = 'h';
- display.string[2] = 'a';
- display.string[3] = 'i';
- display.string[4] = '!';
- display.string[5] = ' ';
- display.string[6] = 0;
+ display.setString("Ohai! ");
display.enable();
modem.enable();
@@ -37,9 +31,14 @@ int main (void)
// 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 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();
+ display.update();
}
return 0;