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 {
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);
}
char prompt[RDLINE_PROMPT_SIZE];
struct callout_mgr intr_cm;
- struct callout spi_timer;
- struct callout beep_timer;
- struct callout xbee_rx_poll_timer;
/* log */
uint8_t logs[NB_LOGS+1];
};
static struct spi_servo_rx spi_servo_rx;
+static struct callout spi_timer;
+
/*
* SPI protocol:
*
SS_HIGH();
- callout_init(&xbeeboard.spi_timer, spi_servo_cb, NULL, SPI_PRIO);
- callout_schedule(&xbeeboard.intr_cm,
- &xbeeboard.spi_timer, 0); /* immediate */
+ callout_init(&spi_timer, spi_servo_cb, NULL, SPI_PRIO);
+ callout_schedule(&xbeeboard.intr_cm, &spi_timer, 0); /* immediate */
spi_servo_set_bypass(1);
}
/* parameters */
int xbee_raw = 0;
+static struct callout xbee_rx_poll_timer;
+
static void __hexdump(const void *buf, unsigned int len)
{
unsigned int i, out, ofs;
void xbeeapp_init(void)
{
- callout_init(&xbeeboard.xbee_rx_poll_timer, xbee_rx_poll_timer_cb,
+ callout_init(&xbee_rx_poll_timer, xbee_rx_poll_timer_cb,
NULL, XBEE_PRIO);
- callout_schedule(&xbeeboard.intr_cm,
- &xbeeboard.xbee_rx_poll_timer, XBEE_POLL_TIMER_MS);
+ callout_schedule(&xbeeboard.intr_cm, &xbee_rx_poll_timer,
+ XBEE_POLL_TIMER_MS);
}