/* 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;
}
-/* main rx entry point for application */
+/* Main xbee rx entry point for application. It decodes the xbee frame type and
+ * dispatch to the application layer. Then "len" argument does not include the
+ * xbee_hdr structure (delimiter, len, type, id) and checksum. */
int8_t xbeeapp_rx(struct xbee_dev *dev, int channel, int type,
void *frame, unsigned len, void *opaque)
{
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);
}