]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
cleanup
authorLeo C <erbl259-lmu@yahoo.de>
Sat, 22 Nov 2014 13:22:17 +0000 (14:22 +0100)
committerLeo C <erbl259-lmu@yahoo.de>
Sat, 22 Nov 2014 13:22:17 +0000 (14:22 +0100)
avr/timer.c

index 6fb19a81b9fa308b18796a001e50c4d8875b7c9d..7907bbad2811598048a1bed29833f18f5b9219de 100644 (file)
@@ -1,20 +1,15 @@
 /*
  */
 
-
 #include "common.h"
-
 #include <avr/interrupt.h>
 #include <util/atomic.h>
-
-//#include <stdio.h>
-
-
 #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;