From b8c16fe7a5d1a0780d24e1f4ffad51b9554c988d Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Mon, 30 Jan 2012 23:07:57 -0500 Subject: [PATCH] hw defs: move misc defines and non-const data out of board_hw_defs.c The board_hw_defs.c file should only contain static const declarations that only describe the hardware. All other non-const variables should be put into one of the pios_board.c files. --- flight/Revolution/System/pios_board.c | 15 +++++++++++++++ flight/board_hw_defs/revolution/board_hw_defs.c | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/flight/Revolution/System/pios_board.c b/flight/Revolution/System/pios_board.c index ca28999e5..19c0608a2 100644 --- a/flight/Revolution/System/pios_board.c +++ b/flight/Revolution/System/pios_board.c @@ -240,6 +240,21 @@ static const struct pios_flash_jedec_cfg flash_m25p_cfg = { .chip_erase = 0xC7 }; +/* One slot per selectable receiver group. + * eg. PWM, PPM, GCS, SPEKTRUM1, SPEKTRUM2, SBUS + * NOTE: No slot in this map for NONE. + */ +uint32_t pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_NONE]; + +#define PIOS_COM_TELEM_RF_RX_BUF_LEN 512 +#define PIOS_COM_TELEM_RF_TX_BUF_LEN 512 + +#define PIOS_COM_GPS_RX_BUF_LEN 32 + +uint32_t pios_com_aux_id; +uint32_t pios_com_gps_id; +uint32_t pios_com_telem_usb_id; +uint32_t pios_com_telem_rf_id; /** * PIOS_Board_Init() diff --git a/flight/board_hw_defs/revolution/board_hw_defs.c b/flight/board_hw_defs/revolution/board_hw_defs.c index dff3bfc76..8f3ef6bd1 100644 --- a/flight/board_hw_defs/revolution/board_hw_defs.c +++ b/flight/board_hw_defs/revolution/board_hw_defs.c @@ -492,8 +492,6 @@ static const struct pios_usart_cfg pios_usart_gps_cfg = { }, }; -#define PIOS_COM_GPS_RX_BUF_LEN 192 - #endif /* PIOS_INCLUDE_GPS */ #ifdef PIOS_INCLUDE_COM_AUX @@ -590,9 +588,6 @@ static const struct pios_usart_cfg pios_usart_telem_main_cfg = { }, }; -#define PIOS_COM_TELEM_RF_RX_BUF_LEN 512 -#define PIOS_COM_TELEM_RF_TX_BUF_LEN 512 - #endif /* PIOS_COM_TELEM */ #if defined(PIOS_INCLUDE_DSM) @@ -1419,17 +1414,7 @@ static const struct pios_ppm_cfg pios_ppm_cfg = { #if defined(PIOS_INCLUDE_RCVR) #include "pios_rcvr_priv.h" -/* One slot per selectable receiver group. - * eg. PWM, PPM, GCS, SPEKTRUM1, SPEKTRUM2, SBUS - * NOTE: No slot in this map for NONE. - */ -uint32_t pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_NONE]; #endif -extern const struct pios_com_driver pios_usart_com_driver; -uint32_t pios_com_aux_id; -uint32_t pios_com_gps_id; -uint32_t pios_com_telem_usb_id; -uint32_t pios_com_telem_rf_id;