diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/discovery-stm32f072/board.c | 6 | ||||
-rw-r--r-- | board/discovery/board.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/board/discovery-stm32f072/board.c b/board/discovery-stm32f072/board.c index 5aa185ffc3..360f970001 100644 --- a/board/discovery-stm32f072/board.c +++ b/board/discovery-stm32f072/board.c @@ -14,6 +14,7 @@ #include "task.h" #include "usart-stm32f0.h" #include "usart_tx_dma.h" +#include "usart_rx_dma.h" #include "usb_gpio.h" #include "usb_spi.h" #include "usb-stream.h" @@ -53,12 +54,15 @@ static struct queue const loopback_queue = loopback_usart.producer, loopback_usart.consumer); +static struct usart_rx_dma const loopback_rx_dma = + USART_RX_DMA(STM32_DMAC_CH3, 8); + static struct usart_tx_dma const loopback_tx_dma = USART_TX_DMA(STM32_DMAC_CH2, 16); static struct usart_config const loopback_usart = USART_CONFIG(usart1_hw, - usart_rx_interrupt, + loopback_rx_dma.usart_rx, loopback_tx_dma.usart_tx, 115200, loopback_queue, diff --git a/board/discovery/board.c b/board/discovery/board.c index eb58434aa7..81fe437850 100644 --- a/board/discovery/board.c +++ b/board/discovery/board.c @@ -11,6 +11,7 @@ #include "registers.h" #include "task.h" #include "usart-stm32f0.h" +#include "usart_rx_dma.h" #include "usart_tx_dma.h" #include "util.h" @@ -43,12 +44,15 @@ static struct queue const loopback_queue = loopback_usart.producer, loopback_usart.consumer); +static struct usart_rx_dma const loopback_rx_dma = + USART_RX_DMA(STM32_DMAC_CH6, 32); + static struct usart_tx_dma const loopback_tx_dma = USART_TX_DMA(STM32_DMAC_CH7, 16); static struct usart_config const loopback_usart = USART_CONFIG(usart2_hw, - usart_rx_interrupt, + loopback_rx_dma.usart_rx, loopback_tx_dma.usart_tx, 115200, loopback_queue, |