diff options
-rw-r--r-- | board/servo_micro/board.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/board/servo_micro/board.c b/board/servo_micro/board.c index a54e5581f8..5887d559ae 100644 --- a/board/servo_micro/board.c +++ b/board/servo_micro/board.c @@ -31,8 +31,8 @@ * Forward UARTs as a USB serial interface. */ -#define USB_STREAM_RX_SIZE 16 -#define USB_STREAM_TX_SIZE 16 +#define USB_STREAM_RX_SIZE 32 +#define USB_STREAM_TX_SIZE 32 /****************************************************************************** * Forward USART2 as a simple USB serial interface. @@ -41,14 +41,17 @@ static struct usart_config const usart2; struct usb_stream_config const usart2_usb; -static struct queue const usart2_to_usb = QUEUE_DIRECT(64, uint8_t, +static struct queue const usart2_to_usb = QUEUE_DIRECT(256, uint8_t, usart2.producer, usart2_usb.consumer); static struct queue const usb_to_usart2 = QUEUE_DIRECT(64, uint8_t, usart2_usb.producer, usart2.consumer); +static struct usart_rx_dma const usart2_rx_dma = + USART_RX_DMA(STM32_DMAC_CH5, 32); + static struct usart_config const usart2 = USART_CONFIG(usart2_hw, - usart_rx_interrupt, + usart2_rx_dma.usart_rx, usart_tx_interrupt, 115200, 0, @@ -73,14 +76,17 @@ USB_STREAM_CONFIG_USART_IFACE(usart2_usb, static struct usart_config const usart3; struct usb_stream_config const usart3_usb; -static struct queue const usart3_to_usb = QUEUE_DIRECT(64, uint8_t, +static struct queue const usart3_to_usb = QUEUE_DIRECT(256, uint8_t, usart3.producer, usart3_usb.consumer); static struct queue const usb_to_usart3 = QUEUE_DIRECT(64, uint8_t, usart3_usb.producer, usart3.consumer); +static struct usart_rx_dma const usart3_rx_dma = + USART_RX_DMA(STM32_DMAC_CH3, 32); + static struct usart_config const usart3 = USART_CONFIG(usart3_hw, - usart_rx_interrupt, + usart3_rx_dma.usart_rx, usart_tx_interrupt, 115200, 0, @@ -105,14 +111,17 @@ USB_STREAM_CONFIG_USART_IFACE(usart3_usb, static struct usart_config const usart4; struct usb_stream_config const usart4_usb; -static struct queue const usart4_to_usb = QUEUE_DIRECT(64, uint8_t, +static struct queue const usart4_to_usb = QUEUE_DIRECT(256, uint8_t, usart4.producer, usart4_usb.consumer); static struct queue const usb_to_usart4 = QUEUE_DIRECT(64, uint8_t, usart4_usb.producer, usart4.consumer); +static struct usart_rx_dma const usart4_rx_dma = + USART_RX_DMA(STM32_DMAC_CH6, 32); + static struct usart_config const usart4 = USART_CONFIG(usart4_hw, - usart_rx_interrupt, + usart4_rx_dma.usart_rx, usart_tx_interrupt, 115200, 0, |