prevent going in raw mode when monitor/range is running
[protos/xbee-avr.git] / main.h
diff --git a/main.h b/main.h
index 9ba70de..30a9262 100644 (file)
--- a/main.h
+++ b/main.h
 #include <aversive/error.h>
 
 #include <uart.h>
-#include <scheduler.h>
-#include <clock_time.h>
 #include <parse.h>
 #include <rdline.h>
 #include <timer.h>
+#include <xbee.h>
 
-#include "xbee_neighbor.h"
-#include "xbee_atcmd.h"
-#include "xbee_stats.h"
-#include "xbee_buf.h"
-#include "xbee_proto.h"
-#include "xbee.h"
 #include "cmdline.h"
 #include "callout.h"
 #include "rc_proto.h"
 #include "spi_servo.h"
 
-extern volatile uint16_t global_ms;
-
 #define NB_LOGS 4
 
 /** ERROR NUMS */
@@ -81,6 +72,11 @@ struct xbeeboard {
        struct rdline rdl;
        char prompt[RDLINE_PROMPT_SIZE];
 
+       struct callout_mgr mainloop_cm;
+       struct callout_mgr intr_cm;
+       struct callout spi_timer;
+       struct callout beep_timer;
+
        /* log */
        uint8_t logs[NB_LOGS+1];
        uint8_t log_level;
@@ -104,14 +100,12 @@ extern struct xbee_dev *xbee_dev;
 extern int xbee_raw;
 extern int xbee_hexdump;
 extern int xbee_debug;
-
-extern struct callout_manager cm;
-
+extern volatile uint32_t global_ms;
 
 void bootloader(void);
 
-void xbee_rx(struct xbee_dev *dev, int channel, int type,
-            void *frame, unsigned len, void *opaque);
+int8_t xbeeapp_rx(struct xbee_dev *dev, int channel, int type,
+                 void *frame, unsigned len, void *opaque);
 int xbeeapp_send_atcmd(const char *atcmd_str,
                       void *param, unsigned param_len, int foreground,
                       int (*func)(void *frame, unsigned len, void *arg),