1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-05 21:52:10 +01:00

Fixed UART-1 structure definition error (pios_usart_cfg pios_usart_serial_cfg)

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1368 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-08-22 08:59:00 +00:00 committed by pip
parent e27adf700b
commit 78868216ca
3 changed files with 20 additions and 14 deletions

View File

@ -133,10 +133,15 @@ TIM8 | | | |
//------------------------- //-------------------------
// PIOS_USART // PIOS_USART
//------------------------- //-------------------------
#define PIOS_USART_RX_BUFFER_SIZE 256
#define PIOS_USART_RX_BUFFER_SIZE 512
#define PIOS_USART_TX_BUFFER_SIZE 256 #define PIOS_USART_TX_BUFFER_SIZE 256
#define PIOS_COM_COM 0
#define PIOS_COM_DEBUG PIOS_COM_COM #define PIOS_COM_SERIAL 0
#define PIOS_COM_DEBUG PIOS_COM_SERIAL
//-------------------------
#if 0 #if 0
//------------------------- //-------------------------

View File

@ -166,11 +166,12 @@ void PIOS_SPI_perif_irq_handler(void)
#include <pios_usart_priv.h> #include <pios_usart_priv.h>
/* /*
* AUX USART * SERIAL USART
*/ */
void PIOS_USART_com_irq_handler(void); void PIOS_USART_serial_irq_handler(void);
void USART3_IRQHandler() __attribute__ ((alias ("PIOS_USART_com_irq_handler"))); void USART1_IRQHandler() __attribute__ ((alias ("PIOS_USART_serial_irq_handler")));
const struct pios_usart_cfg pios_usart_com_cfg =
const struct pios_usart_cfg pios_usart_serial_cfg =
{ {
.regs = USART1, .regs = USART1,
.init = .init =
@ -184,7 +185,7 @@ const struct pios_usart_cfg pios_usart_com_cfg =
}, },
.irq = .irq =
{ {
.handler = PIOS_USART_com_irq_handler, .handler = PIOS_USART_serial_irq_handler,
.init = .init =
{ {
.NVIC_IRQChannel = USART1_IRQn, .NVIC_IRQChannel = USART1_IRQn,
@ -220,17 +221,17 @@ const struct pios_usart_cfg pios_usart_com_cfg =
*/ */
struct pios_usart_dev pios_usart_devs[] = struct pios_usart_dev pios_usart_devs[] =
{ {
#define PIOS_USART_COM 0 #define PIOS_USART_SERIAL 0
{ {
.cfg = &pios_usart_com_cfg, .cfg = &pios_usart_serial_cfg,
}, },
}; };
uint8_t pios_usart_num_devices = NELEMENTS(pios_usart_devs); uint8_t pios_usart_num_devices = NELEMENTS(pios_usart_devs);
void PIOS_USART_com_irq_handler(void) void PIOS_USART_serial_irq_handler(void)
{ {
PIOS_USART_IRQ_Handler(PIOS_USART_COM); PIOS_USART_IRQ_Handler(PIOS_USART_SERIAL);
} }
#endif /* PIOS_INCLUDE_USART */ #endif /* PIOS_INCLUDE_USART */
@ -250,7 +251,7 @@ extern const struct pios_com_driver pios_usart_com_driver;
struct pios_com_dev pios_com_devs[] = struct pios_com_dev pios_com_devs[] =
{ {
{ {
.id = PIOS_USART_COM, .id = PIOS_USART_SERIAL,
.driver = &pios_usart_com_driver, .driver = &pios_usart_com_driver,
}, },
}; };

View File

@ -58,7 +58,7 @@ int main()
PIOS_DELAY_Init(); PIOS_DELAY_Init();
// UART communication system // UART communication system
//PIOS_COM_Init(); // TODO: Find problem when enabling this PIOS_COM_Init();
// ADC system // ADC system
PIOS_ADC_Init(); PIOS_ADC_Init();