move xbee user code in a separate file
[protos/xbee-avr.git] / main.h
diff --git a/main.h b/main.h
index 30a9262..001ecc0 100644 (file)
--- a/main.h
+++ b/main.h
@@ -35,9 +35,9 @@
 #include <rdline.h>
 #include <timer.h>
 #include <xbee.h>
+#include <callout.h>
 
 #include "cmdline.h"
-#include "callout.h"
 #include "rc_proto.h"
 #include "spi_servo.h"
 
@@ -84,39 +84,7 @@ struct xbeeboard {
 };
 extern struct xbeeboard xbeeboard;
 
-
-/* used for timeouts and xbee rx callback */
-struct xbee_ctx {
-       int foreground;
-       int channel;
-       char atcmd_query[2];
-       int (*func)(void *frame, unsigned len, void *arg);
-       void *arg;
-       struct callout timeout;
-};
-
-//extern cmdline_parse_ctx_t main_ctx;
-extern struct xbee_dev *xbee_dev;
-extern int xbee_raw;
-extern int xbee_hexdump;
-extern int xbee_debug;
 extern volatile uint32_t global_ms;
 
 void bootloader(void);
 
-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),
-                      void *arg);
-int xbeeapp_send_msg(uint64_t addr, void *data,
-                    unsigned data_len, int foreground);
-
-void xbee_stdin_enable(void);
-void xbee_stdin_disable(void);
-
-void xbee_load_timeout(struct xbee_ctx *ctx);
-void xbee_unload_timeout(struct xbee_ctx *ctx);
-
-void xbee_mainloop(void);