diff options
Diffstat (limited to 'src/display.cc')
-rw-r--r-- | src/display.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/display.cc b/src/display.cc index 4215983..30a441f 100644 --- a/src/display.cc +++ b/src/display.cc @@ -9,8 +9,6 @@ Display display; -uint8_t teststr[] = {'O', 'h', 'a', 'i', '!', 0}; - void Display::disable() { TIMSK0 &= ~_BV(TOIE0); @@ -30,15 +28,7 @@ void Display::enable() TIMSK0 = _BV(TOIE0); } -/* - * Draws a single display column. This function should be called at least once - * per millisecond. - * - * Current configuration: - * Called every 256 microseconds. The whole display is refreshed every 2048us, - * giving a refresh rate of ~500Hz - */ -ISR(TIMER0_OVF_vect) +void Display::multiplex() { static uint8_t active_col = 0; static uint16_t scroll = 0; @@ -89,3 +79,16 @@ ISR(TIMER0_OVF_vect) } } } + +/* + * Draws a single display column. This function should be called at least once + * per millisecond. + * + * Current configuration: + * Called every 256 microseconds. The whole display is refreshed every 2048us, + * giving a refresh rate of ~500Hz + */ +ISR(TIMER0_OVF_vect) +{ + display.multiplex(); +} |