X-Git-Url: http://git.droids-corp.org/?p=protos%2Fxbee-avr.git;a=blobdiff_plain;f=beep.c;h=1a31186da2a2e4ed573f865d37a8edc804bf5a7c;hp=fadd16d805101a9cbea1b1cbc5b4877c39d7f50e;hb=HEAD;hpb=a53014b7f52462e163a7d7ac64866aa75977422f diff --git a/beep.c b/beep.c index fadd16d..1a31186 100644 --- 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); }