altos: Make ao_tick_count visible
authorKeith Packard <keithp@keithp.com>
Mon, 16 Jul 2012 22:24:21 +0000 (15:24 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 16 Jul 2012 22:24:21 +0000 (15:24 -0700)
Necessary to fetch it when interrupts are already disabled as we can't
call ao_time then.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/avr/ao_timer.c
src/cc1111/ao_timer.c
src/core/ao.h
src/stm/ao_timer.c

index eef14345dda7d5bf96a09881c61c6b27915c4975..cd81b163bc37bf657971095de81f8f83a774d053 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "ao.h"
 
-static volatile __data uint16_t ao_tick_count;
+volatile __data uint16_t ao_tick_count;
 
 uint16_t ao_time(void)
 {
index aadee71e239e324a8b7644fe70872148e615f5d9..602f98c8276720c047751d95baff9c4fd14fbecc 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "ao.h"
 
-static volatile __data uint16_t ao_tick_count;
+volatile __data uint16_t ao_tick_count;
 
 uint16_t ao_time(void) __critical
 {
index d4be3be436755a7d4642c19046647d114c122b2f..65b9eb18f409a33a6b32a7e67d68879bc6b558be 100644 (file)
@@ -125,6 +125,8 @@ ao_panic(uint8_t reason);
  * ao_timer.c
  */
 
+extern volatile __data uint16_t ao_tick_count;
+
 /* Our timer runs at 100Hz */
 #define AO_HERTZ               100
 #define AO_MS_TO_TICKS(ms)     ((ms) / (1000 / AO_HERTZ))
index 936dc88121e572a68a62255dee59c6378b7035fe..ebe753668e6036cb376bf1d82d5a55de7d53b479 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "ao.h"
 
-static volatile __data uint16_t ao_tick_count;
+volatile __data uint16_t ao_tick_count;
 
 uint16_t ao_time(void)
 {