diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-01-20 12:34:56 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-01-20 12:34:56 +0100 |
commit | b0285847fc295b0034aa7e7d3b90d6b70ba37b8e (patch) | |
tree | 4d245dc8c86f2ca32c6707252a7348b2f969c289 /src/display.cc | |
parent | c8f52f8271c5f2a048d8849efe656c5391da29ba (diff) |
excapsulate display and modem state in their respective classes
Diffstat (limited to 'src/display.cc')
-rw-r--r-- | src/display.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/display.cc b/src/display.cc index 30a441f..4b4c22d 100644 --- a/src/display.cc +++ b/src/display.cc @@ -9,6 +9,19 @@ Display display; +Display::Display() +{ + disp_buf[0] = 0xff; + disp_buf[1] = 0xfb; + disp_buf[2] = 0xdd; + disp_buf[3] = 0xfd; + disp_buf[4] = 0xdd; + disp_buf[5] = 0xfb; + disp_buf[6] = 0xff; + disp_buf[7] = 0xff; + char_pos = -1; +} + void Display::disable() { TIMSK0 &= ~_BV(TOIE0); @@ -30,14 +43,7 @@ void Display::enable() void Display::multiplex() { - static uint8_t active_col = 0; - static uint16_t scroll = 0; - - static uint8_t disp_buf[] = {0xff,0xfb,0xdd,0xfd,0xdd,0xfb,0xff,0xff}; - - static uint8_t str_pos = 0; - static int8_t char_pos = -1; - + static uint16_t scroll; uint8_t i, glyph_len; uint8_t *glyph_addr; |