mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Added USART baudrate defines into pios_board.h & '#if defined's into pios_board.c
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1646 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
d2bc126e68
commit
82be9117d6
@ -126,17 +126,22 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8
|
||||
#define PIOS_USART_RX_BUFFER_SIZE 1024
|
||||
#define PIOS_USART_TX_BUFFER_SIZE 256
|
||||
|
||||
#define PIOS_COM_TELEM_RF 0
|
||||
#define PIOS_COM_GPS 1
|
||||
#define PIOS_COM_TELEM_USB 2
|
||||
#define PIOS_COM_TELEM_BAUDRATE 57600
|
||||
#define PIOS_COM_GPS_BAUDRATE 57600
|
||||
|
||||
#define PIOS_COM_TELEM_RF 0
|
||||
#define PIOS_COM_GPS 1
|
||||
#define PIOS_COM_TELEM_USB 2
|
||||
|
||||
#ifdef PIOS_ENABLE_AUX_UART
|
||||
#define PIOS_COM_AUX 3
|
||||
#define PIOS_COM_DEBUG PIOS_COM_AUX
|
||||
#define PIOS_COM_AUX_BAUDRATE 57600
|
||||
#define PIOS_COM_AUX 3
|
||||
#define PIOS_COM_DEBUG PIOS_COM_AUX
|
||||
#endif
|
||||
|
||||
#ifdef PIOS_INCLUDE_SPEKTRUM
|
||||
#define PIOS_COM_SPEKTRUM 3
|
||||
#define PIOS_COM_SPEKTRUM_BAUDRATE 115200
|
||||
#define PIOS_COM_SPEKTRUM 3
|
||||
#endif
|
||||
|
||||
//-------------------------
|
||||
|
@ -320,7 +320,11 @@ void USART2_IRQHandler() __attribute__ ((alias ("PIOS_USART_telem_irq_handler"))
|
||||
const struct pios_usart_cfg pios_usart_telem_cfg = {
|
||||
.regs = USART2,
|
||||
.init = {
|
||||
.USART_BaudRate = 57600,
|
||||
#if defined (PIOS_COM_TELEM_BAUDRATE)
|
||||
.USART_BaudRate = PIOS_COM_TELEM_BAUDRATE,
|
||||
#else
|
||||
.USART_BaudRate = 57600,
|
||||
#endif
|
||||
.USART_WordLength = USART_WordLength_8b,
|
||||
.USART_Parity = USART_Parity_No,
|
||||
.USART_StopBits = USART_StopBits_1,
|
||||
@ -363,7 +367,11 @@ const struct pios_usart_cfg pios_usart_gps_cfg = {
|
||||
.regs = USART3,
|
||||
.remap = GPIO_PartialRemap_USART3,
|
||||
.init = {
|
||||
.USART_BaudRate = 57600,
|
||||
#if defined (PIOS_COM_GPS_BAUDRATE)
|
||||
.USART_BaudRate = PIOS_COM_GPS_BAUDRATE,
|
||||
#else
|
||||
.USART_BaudRate = 57600,
|
||||
#endif
|
||||
.USART_WordLength = USART_WordLength_8b,
|
||||
.USART_Parity = USART_Parity_No,
|
||||
.USART_StopBits = USART_StopBits_1,
|
||||
@ -406,7 +414,11 @@ void USART1_IRQHandler() __attribute__ ((alias ("PIOS_USART_aux_irq_handler")));
|
||||
const struct pios_usart_cfg pios_usart_aux_cfg = {
|
||||
.regs = USART1,
|
||||
.init = {
|
||||
.USART_BaudRate = 57600,
|
||||
#if defined (PIOS_COM_AUX_BAUDRATE)
|
||||
.USART_BaudRate = PIOS_COM_AUX_BAUDRATE,
|
||||
#else
|
||||
.USART_BaudRate = 57600,
|
||||
#endif
|
||||
.USART_WordLength = USART_WordLength_8b,
|
||||
.USART_Parity = USART_Parity_No,
|
||||
.USART_StopBits = USART_StopBits_1,
|
||||
@ -451,7 +463,11 @@ void USART1_IRQHandler() __attribute__ ((alias ("PIOS_USART_spektrum_irq_handler
|
||||
const struct pios_usart_cfg pios_usart_spektrum_cfg = {
|
||||
.regs = USART1,
|
||||
.init = {
|
||||
.USART_BaudRate = 115200,
|
||||
#if defined (PIOS_COM_SPEKTRUM_BAUDRATE)
|
||||
.USART_BaudRate = PIOS_COM_SPEKTRUM_BAUDRATE,
|
||||
#else
|
||||
.USART_BaudRate = 115200,
|
||||
#endif
|
||||
.USART_WordLength = USART_WordLength_8b,
|
||||
.USART_Parity = USART_Parity_No,
|
||||
.USART_StopBits = USART_StopBits_1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user