From abf69bd53f86300d263d3abeeae81a9e1c3cd5c0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 19 Jan 2016 19:59:51 +0100 Subject: support scrolling arbitrary strings. --- src/main.cc | 52 ++++++---------------------------------------------- 1 file changed, 6 insertions(+), 46 deletions(-) (limited to 'src/main.cc') diff --git a/src/main.cc b/src/main.cc index fbb40c9..f665e18 100644 --- a/src/main.cc +++ b/src/main.cc @@ -9,8 +9,6 @@ #include "modem.h" #include "system.h" -volatile uint8_t disp[8]; - int main (void) { // disable ADC to save power @@ -22,50 +20,12 @@ int main (void) // Enable pull-ups on PC3 and PC7 (button pins) PORTC |= _BV(PC3) | _BV(PC7); - disp[0] = 0x01; - disp[1] = 0x02; - disp[2] = 0x04; - disp[3] = 0x08; - disp[4] = 0x10; - disp[5] = 0x20; - disp[6] = 0x40; - disp[7] = 0x80; - -#if 0 - // smile! - disp[0] = 0x08; - disp[1] = 0x04; - disp[2] = 0x62; - disp[3] = 0x02; - disp[4] = 0x02; - disp[5] = 0x62; - disp[6] = 0x04; - disp[7] = 0x08; - disp[8] = 0x00; - disp[9] = 0x00; - disp[10] = 0x00; - disp[11] = 0x00; - disp[12] = 0x00; - disp[13] = 0x00; - disp[14] = 0x00; - disp[15] = 0x00; - disp[16] = 0x28; - disp[17] = 0x44; - disp[18] = 0x22; - disp[19] = 0x02; - disp[20] = 0x02; - disp[21] = 0x22; - disp[22] = 0x44; - disp[23] = 0x28; - disp[24] = 0x00; - disp[25] = 0x00; - disp[26] = 0x00; - disp[27] = 0x00; - disp[28] = 0x00; - disp[29] = 0x00; - disp[30] = 0x00; - disp[31] = 0x00; -#endif + display.string[0] = 'O'; + display.string[1] = 'h'; + display.string[2] = 'a'; + display.string[3] = 'i'; + display.string[4] = '!'; + display.string[5] = 0; display.enable(); modem.enable(); -- cgit v1.2.3