}
-int xbee_dev_send(char c, FILE* f)
-{
- (void)f;
- uart_send(XBEE_UART, c);
- return 0;
-}
-
-int xbee_dev_recv(FILE* f)
-{
- int16_t c;
-
- (void)f;
- c = uart_recv_nowait(XBEE_UART);
- if (c < 0)
- return _FDEV_EOF;
-
- return c;
-}
-
void cmdline_valid_buffer(const char *buf, uint8_t size)
{
int8_t ret;
#define _CMDLINE_H_
#define CMDLINE_UART 1
-#define XBEE_UART 0
void cmdline_init(void);
void cmdline_write_char(char c);
void cmdline_valid_buffer(const char *buf, uint8_t size);
-int xbee_dev_send(char c, FILE* f);
-int xbee_dev_recv(FILE* f);
-
static inline uint8_t cmdline_keypressed(void)
{
return (uart_recv_nowait(CMDLINE_UART) != -1);
static const char PROGMEM uart_log[] = "uart";
static const char PROGMEM i2c_log[] = "i2c";
static const char PROGMEM default_log[] = "default";
-static const char PROGMEM xbee_log[] = "xbee";
static const char PROGMEM rc_proto_log[] = "rc_proto";
struct log_name_and_num {
{ uart_log, E_UART },
{ i2c_log, E_I2C },
{ default_log, E_USER_DEFAULT },
- { xbee_log, E_USER_XBEE },
{ rc_proto_log, E_USER_RC_PROTO },
};
const parse_token_string_t PROGMEM cmd_log_arg1_type = TOKEN_STRING_INITIALIZER(struct cmd_log_type_result, arg1, str_log_arg1_type);
/* keep it sync with log_name_and_num above */
const char PROGMEM str_log_arg2_type[] =
- "uart#i2c#i2cproto#default#xbee#rc_proto";
+ "uart#i2c#i2cproto#default#rc_proto";
const parse_token_string_t PROGMEM cmd_log_arg2_type = TOKEN_STRING_INITIALIZER(struct cmd_log_type_result, arg2, str_log_arg2_type);
const char PROGMEM str_log_arg3[] = "on#off";
const parse_token_string_t PROGMEM cmd_log_arg3 = TOKEN_STRING_INITIALIZER(struct cmd_log_type_result, arg3, str_log_arg3);
struct imuboard imuboard;
volatile uint32_t global_ms;
-/* global xbee device */
-struct xbee_dev *xbee_dev;
-
void bootloader(void)
{
#define BOOTLOADER_ADDR 0x3f000