mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #6306 from aabadie/nucleo_f446_uart
boards/nucleo-f446: configure 2 new UARTs using USART3 and USART1
This commit is contained in:
commit
afcdd62816
@ -85,11 +85,43 @@ static const uart_conf_t uart_config[] = {
|
||||
.dma_stream = 6,
|
||||
.dma_chan = 4
|
||||
#endif
|
||||
}
|
||||
},
|
||||
{
|
||||
.dev = USART3,
|
||||
.rcc_mask = RCC_APB1ENR_USART3EN,
|
||||
.rx_pin = GPIO_PIN(PORT_C, 11),
|
||||
.tx_pin = GPIO_PIN(PORT_C, 10),
|
||||
.rx_af = GPIO_AF7,
|
||||
.tx_af = GPIO_AF7,
|
||||
.bus = APB1,
|
||||
.irqn = USART3_IRQn,
|
||||
#ifdef UART_USE_DMA
|
||||
.dma_stream = 5,
|
||||
.dma_chan = 4
|
||||
#endif
|
||||
},
|
||||
{
|
||||
.dev = USART1,
|
||||
.rcc_mask = RCC_APB2ENR_USART1EN,
|
||||
.rx_pin = GPIO_PIN(PORT_A, 10),
|
||||
.tx_pin = GPIO_PIN(PORT_A, 9),
|
||||
.rx_af = GPIO_AF7,
|
||||
.tx_af = GPIO_AF7,
|
||||
.bus = APB2,
|
||||
.irqn = USART1_IRQn,
|
||||
#ifdef UART_USE_DMA
|
||||
.dma_stream = 4,
|
||||
.dma_chan = 4
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
#define UART_0_ISR (isr_usart2)
|
||||
#define UART_0_DMA_ISR (isr_dma1_stream6)
|
||||
#define UART_1_ISR (isr_usart3)
|
||||
#define UART_1_DMA_ISR (isr_dma1_stream5)
|
||||
#define UART_2_ISR (isr_usart1)
|
||||
#define UART_2_DMA_ISR (isr_dma1_stream4)
|
||||
|
||||
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user