1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

board/nucleo-l073: use LPUART for third UART

This commit is contained in:
Alexandre Abadie 2018-05-21 21:47:18 +02:00
parent 8c6a7bc370
commit 537e93a527
2 changed files with 20 additions and 8 deletions

View File

@ -2,6 +2,7 @@
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_lpuart
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_spi

View File

@ -85,7 +85,9 @@ static const uart_conf_t uart_config[] = {
.rx_af = GPIO_AF4,
.tx_af = GPIO_AF4,
.bus = APB1,
.irqn = USART2_IRQn
.irqn = USART2_IRQn,
.type = STM32_USART,
.clk_src = 0, /* Use APB clock */
},
{
.dev = USART1,
@ -95,23 +97,32 @@ static const uart_conf_t uart_config[] = {
.rx_af = GPIO_AF4,
.tx_af = GPIO_AF4,
.bus = APB2,
.irqn = USART1_IRQn
.irqn = USART1_IRQn,
.type = STM32_USART,
.clk_src = 0, /* Use APB clock */
},
#ifdef MODULE_PERIPH_LPUART
{
.dev = USART4,
.rcc_mask = RCC_APB1ENR_USART4EN,
.dev = LPUART1,
.rcc_mask = RCC_APB1ENR_LPUART1EN,
.rx_pin = GPIO_PIN(PORT_C, 11),
.tx_pin = GPIO_PIN(PORT_C, 10),
.rx_af = GPIO_AF6,
.tx_af = GPIO_AF6,
.rx_af = GPIO_AF0,
.tx_af = GPIO_AF0,
.bus = APB1,
.irqn = USART4_5_IRQn
.irqn = LPUART1_IRQn,
.type = STM32_LPUART,
.clk_src = 0, /* Use APB clock */
},
#endif
};
#define UART_0_ISR (isr_usart2)
#define UART_1_ISR (isr_usart1)
#define UART_2_ISR (isr_usart4_5)
#ifdef MODULE_PERIPH_LPUART
#define UART_2_ISR (isr_rng_lpuart1)
#endif
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
/** @} */