From 58a461b6a8678fe93dccc00a4475892637ff13e5 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Wed, 20 May 2015 23:35:02 +0200 Subject: [PATCH] imuboard: remove references to xbee --- imuboard/cmdline.c | 19 ------------------- imuboard/cmdline.h | 4 ---- imuboard/commands.c | 1 - imuboard/commands_gen.c | 4 +--- imuboard/main.c | 3 --- imuboard/main.h | 2 -- 6 files changed, 1 insertion(+), 32 deletions(-) diff --git a/imuboard/cmdline.c b/imuboard/cmdline.c index 4eee061..2386110 100644 --- a/imuboard/cmdline.c +++ b/imuboard/cmdline.c @@ -63,25 +63,6 @@ int cmdline_dev_recv(FILE* f) } -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; diff --git a/imuboard/cmdline.h b/imuboard/cmdline.h index 0adfa0e..1586fde 100644 --- a/imuboard/cmdline.h +++ b/imuboard/cmdline.h @@ -24,7 +24,6 @@ #define _CMDLINE_H_ #define CMDLINE_UART 1 -#define XBEE_UART 0 void cmdline_init(void); @@ -42,9 +41,6 @@ int cmdline_dev_recv(FILE* f); 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); diff --git a/imuboard/commands.c b/imuboard/commands.c index c42eed4..2d7b700 100644 --- a/imuboard/commands.c +++ b/imuboard/commands.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include "main.h" diff --git a/imuboard/commands_gen.c b/imuboard/commands_gen.c index d62fbdf..b675cc4 100644 --- a/imuboard/commands_gen.c +++ b/imuboard/commands_gen.c @@ -157,7 +157,6 @@ struct cmd_log_result { 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 { @@ -169,7 +168,6 @@ static const struct log_name_and_num 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 }, }; @@ -327,7 +325,7 @@ const char PROGMEM str_log_arg1_type[] = "type"; 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); diff --git a/imuboard/main.c b/imuboard/main.c index 2de634a..5410074 100644 --- a/imuboard/main.c +++ b/imuboard/main.c @@ -70,9 +70,6 @@ struct imuboard imuboard; volatile uint32_t global_ms; -/* global xbee device */ -struct xbee_dev *xbee_dev; - void bootloader(void) { #define BOOTLOADER_ADDR 0x3f000 diff --git a/imuboard/main.h b/imuboard/main.h index e172287..4152e0f 100644 --- a/imuboard/main.h +++ b/imuboard/main.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "cmdline.h" @@ -46,7 +45,6 @@ /** ERROR NUMS */ #define E_USER_DEFAULT 194 -#define E_USER_XBEE 195 #define E_USER_RC_PROTO 196 #define LED1_ON() sbi(PORTB, 3) -- 2.39.5