From: Leo C Date: Sat, 22 Nov 2014 13:22:17 +0000 (+0100) Subject: cleanup X-Git-Tag: hexrel-4~23 X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/commitdiff_plain/289c32526f98d9637df35ad95ed0b65223cf6770 cleanup --- diff --git a/avr/timer.c b/avr/timer.c index 6fb19a8..7907bba 100644 --- a/avr/timer.c +++ b/avr/timer.c @@ -1,20 +1,15 @@ /* */ - #include "common.h" - #include #include - -//#include - - #include "timer.h" /* timer interrupt/overflow counter */ -volatile uint32_t timestamp; - +/* counts up every ms. */ +static volatile +uint32_t timestamp; /*---------------------------------------------------------*/ /* 1000Hz timer interrupt generated by OC3A */ @@ -38,26 +33,11 @@ ISR(TIMER3_COMPA_vect) disk_timerproc(); } tick_10ms = i; - } - /*--------------------------------------------------------------------------*/ -#if 0 - -void do_10ms(void) -{ - if (to_counter) - to_counter--; -} - -#endif - -/*--------------------------------------------------------------------------*/ - - #if 0 void timer_setup(void) { @@ -74,10 +54,11 @@ void timer_setup(void) } #endif +/*--------------------------------------------------------------------------*/ + uint32_t get_timer(uint32_t base) { uint32_t ret; - ATOMIC_BLOCK(ATOMIC_FORCEON) { ret = timestamp;