DUMP_CONF,
};
+#define MAX_POWER_LEVEL 5
+
/* used for timeouts and xbee rx callback */
struct xbee_ctx {
enum xbee_ctx_type type;
int have_more_command;
int foreground;
int channel;
+ int (*func)(void *frame, unsigned len, void *arg);
+ void *arg;
struct event timeout;
struct xbee_atcmd *atcmd_query;
};
void xbee_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 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);
int xbeeapp_dump_config(const char *filename);