git.droids-corp.org
/
protos
/
xbee-avr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix range_cb command
[protos/xbee-avr.git]
/
main.c
diff --git
a/main.c
b/main.c
index
326ce64
..
11fd442
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-91,7
+91,12
@@
void bootloader(void)
/* return time in milliseconds on unsigned 16 bits */
static uint16_t get_time_ms(void)
{
/* return time in milliseconds on unsigned 16 bits */
static uint16_t get_time_ms(void)
{
- return (uint16_t)global_ms;
+ uint16_t ms;
+ uint8_t flags;
+ IRQ_LOCK(flags);
+ ms = global_ms;
+ IRQ_UNLOCK(flags);
+ return ms;
}
static void main_timer_interrupt(void)
}
static void main_timer_interrupt(void)
@@
-152,7
+157,6
@@
int main(void)
timer0_register_OV_intr(main_timer_interrupt);
callout_mgr_init(&xbeeboard.intr_cm, get_time_ms);
timer0_register_OV_intr(main_timer_interrupt);
callout_mgr_init(&xbeeboard.intr_cm, get_time_ms);
- callout_mgr_init(&xbeeboard.mainloop_cm, get_time_ms);
cmdline_init();
spi_servo_init();
cmdline_init();
spi_servo_init();