Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 847 → Rev 848

/trunk/uart1.c
93,7 → 93,7
#define FALSE 0
#define TRUE 1
 
const u32 BAUDRATES[MAX_BD_RATES] = {1200,2400,4800,9600,14400,19200,28800,38400,57600};
const u32 BAUDRATES[MAX_BD_RATES] = {1200,2400,4800,9600,14400,19200,28800,38400,57600,115200,256000};
 
#define ABO_TIMEOUT 8000 // disable abo after 8 seconds
u32 UART1_AboTimeOut = 0;
143,7 → 143,7
u8 NaviData_Flags_SpeakHoTT_Processed = 0;
u8 NewExternalControlFrame = 0; // flag that sends the Frame to FC
u16 UART1_BaudrateFallbackTimeout = 0;
u16 Uart1Baudrate = UART1_BAUD_RATE;
u32 Uart1Baudrate = UART1_BAUD_RATE;
 
SerialChannel_t SerialChannel;
u8 NewSerialChannelFrame = 0; // flag that sends the Frame to FC
247,9 → 247,11
 
void GetBaudrateFromSdCard(u32 oldBd)
{
if(Settings_GetParamValue(PID_BAUDRATE,&Uart1Baudrate))
u16 baud;
if(Settings_GetParamValue(PID_BAUDRATE,&baud))
{
u8 i;
Uart1Baudrate = baud * 100;
for(i=0;i<MAX_BD_RATES;i++) if(Uart1Baudrate == BAUDRATES[i]) break; // search the index and check if it is a valid baudrate
if(i == 0 || i >= MAX_BD_RATES)
{
/trunk/uart1.h
17,9 → 17,9
 
#define DISABLE_FC_UART GPIO_WriteBit(GPIO3, GPIO_Pin_7, Bit_SET);
#define ENABLE_FC_UART GPIO_WriteBit(GPIO3, GPIO_Pin_7, Bit_RESET);
extern u16 Uart1Baudrate;
extern u32 Uart1Baudrate;
 
#define MAX_BD_RATES 9
#define MAX_BD_RATES 11
extern const u32 BAUDRATES[MAX_BD_RATES];
 
typedef struct