diff --git a/flight/AHRS/pios_board.c b/flight/AHRS/pios_board.c index 15c5999c0..2e5fd4430 100644 --- a/flight/AHRS/pios_board.c +++ b/flight/AHRS/pios_board.c @@ -208,11 +208,7 @@ void PIOS_ADC_handler() { static const struct pios_usart_cfg pios_usart_aux_cfg = { .regs = USART3, .init = { -#if defined (PIOS_USART_BAUDRATE) - .USART_BaudRate = PIOS_USART_BAUDRATE, -#else - .USART_BaudRate = 57600, -#endif + .USART_BaudRate = 230400, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index ceaf044bc..62eb6b3a0 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -208,11 +208,7 @@ void PIOS_ADC_handler() { static const struct pios_usart_cfg pios_usart_telem_main_cfg = { .regs = USART1, .init = { - #if defined (PIOS_COM_TELEM_BAUDRATE) - .USART_BaudRate = PIOS_COM_TELEM_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif + .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -249,11 +245,7 @@ static const struct pios_usart_cfg pios_usart_telem_main_cfg = { static const struct pios_usart_cfg pios_usart_telem_flexi_cfg = { .regs = USART3, .init = { - #if defined (PIOS_COM_TELEM_BAUDRATE) - .USART_BaudRate = PIOS_COM_TELEM_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif + .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -295,11 +287,7 @@ static const struct pios_usart_cfg pios_usart_telem_flexi_cfg = { static const struct pios_usart_cfg pios_usart_gps_main_cfg = { .regs = USART1, .init = { - #if defined (PIOS_COM_GPS_BAUDRATE) - .USART_BaudRate = PIOS_COM_GPS_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif + .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -336,11 +324,7 @@ static const struct pios_usart_cfg pios_usart_gps_main_cfg = { static const struct pios_usart_cfg pios_usart_gps_flexi_cfg = { .regs = USART3, .init = { - #if defined (PIOS_COM_GPS_BAUDRATE) - .USART_BaudRate = PIOS_COM_GPS_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif + .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -384,11 +368,7 @@ static const struct pios_usart_cfg pios_usart_gps_flexi_cfg = { static const struct pios_usart_cfg pios_usart_spektrum_main_cfg = { .regs = USART1, .init = { - #if defined (PIOS_COM_SPEKTRUM_BAUDRATE) - .USART_BaudRate = PIOS_COM_SPEKTRUM_BAUDRATE, - #else - .USART_BaudRate = 115200, - #endif + .USART_BaudRate = 115200, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -437,11 +417,7 @@ static const struct pios_spektrum_cfg pios_spektrum_main_cfg = { static const struct pios_usart_cfg pios_usart_spektrum_flexi_cfg = { .regs = USART3, .init = { - #if defined (PIOS_COM_SPEKTRUM_BAUDRATE) - .USART_BaudRate = PIOS_COM_SPEKTRUM_BAUDRATE, - #else - .USART_BaudRate = 115200, - #endif + .USART_BaudRate = 115200, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -498,11 +474,7 @@ static const struct pios_spektrum_cfg pios_spektrum_flexi_cfg = { static const struct pios_usart_cfg pios_usart_sbus_main_cfg = { .regs = USART1, .init = { - #if defined (PIOS_COM_SBUS_BAUDRATE) - .USART_BaudRate = PIOS_COM_SBUS_BAUDRATE, - #else - .USART_BaudRate = 100000, - #endif + .USART_BaudRate = 100000, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_Even, .USART_StopBits = USART_StopBits_2, diff --git a/flight/INS/pios_board.c b/flight/INS/pios_board.c index 7010b7f00..239aa258b 100644 --- a/flight/INS/pios_board.c +++ b/flight/INS/pios_board.c @@ -268,11 +268,7 @@ void PIOS_SPI_accel_irq_handler(void) static const struct pios_usart_cfg pios_usart_gps_cfg = { .regs = USART1, .init = { -#if defined (PIOS_USART_BAUDRATE) - .USART_BaudRate = PIOS_USART_BAUDRATE, -#else .USART_BaudRate = 57600, -#endif .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -316,11 +312,7 @@ static const struct pios_usart_cfg pios_usart_gps_cfg = { static const struct pios_usart_cfg pios_usart_aux_cfg = { .regs = USART4, .init = { -#if defined (PIOS_USART_BAUDRATE) - .USART_BaudRate = PIOS_USART_BAUDRATE, -#else .USART_BaudRate = 57600, -#endif .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, diff --git a/flight/OpenPilot/System/pios_board.c b/flight/OpenPilot/System/pios_board.c index 0aa5b8f5c..516797e5b 100644 --- a/flight/OpenPilot/System/pios_board.c +++ b/flight/OpenPilot/System/pios_board.c @@ -313,11 +313,7 @@ void PIOS_ADC_handler() { static const struct pios_usart_cfg pios_usart_telem_cfg = { .regs = USART2, .init = { - #if defined (PIOS_COM_TELEM_BAUDRATE) - .USART_BaudRate = PIOS_COM_TELEM_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif + .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -358,11 +354,7 @@ static const struct pios_usart_cfg pios_usart_gps_cfg = { .regs = USART3, .remap = GPIO_PartialRemap_USART3, .init = { - #if defined (PIOS_COM_GPS_BAUDRATE) - .USART_BaudRate = PIOS_COM_GPS_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif + .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, @@ -403,11 +395,6 @@ static const struct pios_usart_cfg pios_usart_gps_cfg = { static const struct pios_usart_cfg pios_usart_aux_cfg = { .regs = USART1, .init = { - #if defined (PIOS_COM_AUX_BAUDRATE) - .USART_BaudRate = PIOS_COM_AUX_BAUDRATE, - #else - .USART_BaudRate = 57600, - #endif .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, @@ -482,11 +469,7 @@ void PIOS_RTC_IRQ_Handler (void) static const struct pios_usart_cfg pios_usart_spektrum_cfg = { .regs = USART1, .init = { - #if defined (PIOS_COM_SPEKTRUM_BAUDRATE) - .USART_BaudRate = PIOS_COM_SPEKTRUM_BAUDRATE, - #else - .USART_BaudRate = 115200, - #endif + .USART_BaudRate = 115200, .USART_WordLength = USART_WordLength_8b, .USART_Parity = USART_Parity_No, .USART_StopBits = USART_StopBits_1, diff --git a/flight/PiOS/Boards/STM32103CB_AHRS.h b/flight/PiOS/Boards/STM32103CB_AHRS.h index b407c0f42..611d285fc 100644 --- a/flight/PiOS/Boards/STM32103CB_AHRS.h +++ b/flight/PiOS/Boards/STM32103CB_AHRS.h @@ -120,7 +120,6 @@ extern uint32_t pios_i2c_main_adapter_id; #define PIOS_USART_MAX_DEVS 2 #define PIOS_USART_RX_BUFFER_SIZE 256 #define PIOS_USART_TX_BUFFER_SIZE 256 -#define PIOS_USART_BAUDRATE 230400 //------------------------- // PIOS_COM diff --git a/flight/PiOS/Boards/STM32103CB_CC_Rev1.h b/flight/PiOS/Boards/STM32103CB_CC_Rev1.h index b83114e8a..5929bf536 100644 --- a/flight/PiOS/Boards/STM32103CB_CC_Rev1.h +++ b/flight/PiOS/Boards/STM32103CB_CC_Rev1.h @@ -141,13 +141,11 @@ extern uint32_t pios_i2c_main_adapter_id; //------------------------- #define PIOS_COM_MAX_DEVS 4 -#define PIOS_COM_TELEM_BAUDRATE 57600 extern uint32_t pios_com_telem_rf_id; #define PIOS_COM_TELEM_RF (pios_com_telem_rf_id) #define PIOS_COM_DEBUG PIOS_COM_TELEM_RF #if defined(PIOS_INCLUDE_GPS) -#define PIOS_COM_GPS_BAUDRATE 57600 extern uint32_t pios_com_gps_id; #define PIOS_COM_GPS (pios_com_gps_id) #endif /* PIOS_INCLUDE_GPS */ @@ -156,13 +154,11 @@ extern uint32_t pios_com_telem_usb_id; #define PIOS_COM_TELEM_USB (pios_com_telem_usb_id) #ifdef PIOS_INCLUDE_SPEKTRUM -#define PIOS_COM_SPEKTRUM_BAUDRATE 115200 extern uint32_t pios_com_spektrum_id; #define PIOS_COM_SPEKTRUM (pios_com_spektrum_id) #endif #ifdef PIOS_INCLUDE_SBUS -#define PIOS_COM_SBUS_BAUDRATE 100000 extern uint32_t pios_com_sbus_id; #define PIOS_COM_SBUS (pios_com_sbus_id) #endif diff --git a/flight/PiOS/Boards/STM3210E_INS.h b/flight/PiOS/Boards/STM3210E_INS.h index d0c988b21..505db9bb6 100644 --- a/flight/PiOS/Boards/STM3210E_INS.h +++ b/flight/PiOS/Boards/STM3210E_INS.h @@ -135,12 +135,10 @@ extern uint32_t pios_i2c_gyro_adapter_id; //------------------------- #define PIOS_COM_MAX_DEVS 2 -#define PIOS_COM_GPS_BAUDRATE 57600 extern uint32_t pios_com_gps_id; #define PIOS_COM_GPS (pios_com_gps_id) #ifdef PIOS_ENABLE_AUX_UART -#define PIOS_COM_AUX_BAUDRATE 57600 extern uint32_t pios_com_aux_id; #define PIOS_COM_AUX (pios_com_aux_id) #define PIOS_COM_DEBUG PIOS_COM_AUX diff --git a/flight/PiOS/Boards/STM3210E_OP.h b/flight/PiOS/Boards/STM3210E_OP.h index dc598cf4b..823f83a6e 100644 --- a/flight/PiOS/Boards/STM3210E_OP.h +++ b/flight/PiOS/Boards/STM3210E_OP.h @@ -149,11 +149,9 @@ extern uint32_t pios_i2c_main_adapter_id; //------------------------- #define PIOS_COM_MAX_DEVS 4 -#define PIOS_COM_TELEM_BAUDRATE 57600 extern uint32_t pios_com_telem_rf_id; #define PIOS_COM_TELEM_RF (pios_com_telem_rf_id) -#define PIOS_COM_GPS_BAUDRATE 57600 extern uint32_t pios_com_gps_id; #define PIOS_COM_GPS (pios_com_gps_id) @@ -161,20 +159,17 @@ extern uint32_t pios_com_telem_usb_id; #define PIOS_COM_TELEM_USB (pios_com_telem_usb_id) #ifdef PIOS_ENABLE_AUX_UART -#define PIOS_COM_AUX_BAUDRATE 57600 extern uint32_t pios_com_aux_id; #define PIOS_COM_AUX (pios_com_aux_id) #define PIOS_COM_DEBUG PIOS_COM_AUX #endif #ifdef PIOS_INCLUDE_SPEKTRUM -#define PIOS_COM_SPEKTRUM_BAUDRATE 115200 extern uint32_t pios_com_spektrum_id; #define PIOS_COM_SPEKTRUM (pios_com_spektrum_id) #endif #ifdef PIOS_INCLUDE_SBUS -#define PIOS_COM_SBUS_BAUDRATE 100000 extern uint32_t pios_com_sbus_id; #define PIOS_COM_SBUS (pios_com_sbus_id) #endif