beep when GPS ready
[protos/xbee-avr.git] / beep.c
diff --git a/beep.c b/beep.c
index fadd16d..1a31186 100644 (file)
--- a/beep.c
+++ b/beep.c
@@ -42,6 +42,8 @@ static struct cirbuf beep_fifo;
 static char beep_fifo_buf[16];
 volatile uint8_t beep_mask = 1; /* init beep */
 
+static struct callout beep_timer;
+
 union beep_t {
        uint8_t u08;
        struct {
@@ -102,7 +104,6 @@ void beep(uint8_t tone, uint8_t len, uint8_t pause)
 void beep_init(void)
 {
        cirbuf_init(&beep_fifo, beep_fifo_buf, 0, sizeof(beep_fifo_buf));
-       callout_init(&xbeeboard.beep_timer, beep_cb, NULL, BEEP_PRIO);
-       callout_schedule(&xbeeboard.intr_cm, &xbeeboard.beep_timer,
-               BEEP_PERIOD_MS);
+       callout_init(&beep_timer, beep_cb, NULL, BEEP_PRIO);
+       callout_schedule(&xbeeboard.intr_cm, &beep_timer, BEEP_PERIOD_MS);
 }