summaryrefslogtreecommitdiff
path: root/ao_timer.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-17 23:38:14 -0700
committerKeith Packard <keithp@keithp.com>2009-04-17 23:38:14 -0700
commit022f83ca6fd589005d8eb3e25e633950fef69fa7 (patch)
tree4a081c02188cadbc93de00c96cd2f6a8f2b59d53 /ao_timer.c
parent5e2393eb6b1a6d7b180bd63d5165ee7b7ff5f9e0 (diff)
Add gps, debug dongle support and pressure alt tables
GPS also pulled in serial support. The altitude tables take raw 11-bit pressure sample numbers and convert them to standard pressure altitude values. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao_timer.c')
-rw-r--r--ao_timer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ao_timer.c b/ao_timer.c
index 702159b7..2bd47af1 100644
--- a/ao_timer.c
+++ b/ao_timer.c
@@ -21,12 +21,10 @@ static volatile __data uint16_t ao_tick_count;
uint16_t ao_time(void)
{
- volatile bit ea_save;
__data uint16_t ret;
-
- ea_save = EA;
- ret = ao_tick_count;
- EA = ea_save;
+ __critical {
+ ret = ao_tick_count;
+ }
return ret;
}