1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

OP-1477 - BL fix issue with usart name

This commit is contained in:
Alessio Morale 2014-09-07 22:30:00 +02:00
parent b3a971e91d
commit b4f9c7c2b1
4 changed files with 5 additions and 4 deletions

View File

@ -258,7 +258,7 @@ static const struct pios_usart_cfg pios_usart_generic_main_cfg = {
.regs = USART1,
.remap = GPIO_AF_1,
.init = {
.USART_BaudRate = 57600,
.USART_BaudRate = 115200,
.USART_WordLength = USART_WordLength_8b,
.USART_Parity = USART_Parity_No,
.USART_StopBits = USART_StopBits_1,

View File

@ -206,7 +206,7 @@ uint32_t LedPWM(uint32_t pwm_period, uint32_t pwm_sweep_steps, uint32_t count)
uint8_t processRX()
{
if (PIOS_COM_MSG_Receive(PIOS_COM_TELEM_RF, mReceive_Buffer, sizeof(mReceive_Buffer))) {
if (PIOS_COM_MSG_Receive(PIOS_COM_TELEM_USB, mReceive_Buffer, sizeof(mReceive_Buffer))) {
processComand(mReceive_Buffer);
}
return true;

View File

@ -36,7 +36,7 @@
*/
#include "../board_hw_defs.c"
uint32_t pios_com_telem_rf_id;
uint32_t PIOS_COM_TELEM_USB;
static void setupCom();
/**
@ -72,7 +72,7 @@ void setupCom(){
if (PIOS_USART_Init(&pios_usart_generic_id, &pios_usart_generic_main_cfg)) {
PIOS_Assert(0);
}
if (PIOS_COM_MSG_Init(&pios_com_telem_rf_id, &pios_usart_com_driver, pios_usart_generic_id)) {
if (PIOS_COM_MSG_Init(&PIOS_COM_TELEM_USB, &pios_usart_com_driver, pios_usart_generic_id)) {
PIOS_Assert(0);
}
}

View File

@ -120,6 +120,7 @@ extern uint32_t pios_i2c_gps_adapter_id;
// -------------------------
#define PIOS_COM_MAX_DEVS 1
extern uint32_t pios_com_main_id;
#define PIOS_COM_TELEM_USB pios_com_main_id
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
#define PIOS_COM_DEBUG (pios_com_main_id)