usbuart: Further refined the buffer sizing definition process
This commit is contained in:
parent
39df8fa6a6
commit
52e9065426
|
@ -28,14 +28,16 @@ void debug_uart_run(void);
|
|||
#define TX_LED_ACT (1 << 0)
|
||||
#define RX_LED_ACT (1 << 1)
|
||||
|
||||
#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32F4)
|
||||
/* XXX: Does the st_usbfs_v2_usb_driver work on F3 with 128 byte buffers? */
|
||||
#if defined(STM32F1) || defined(STM32F3) || defined(STM32F4)
|
||||
#define USART_DMA_BUF_SIZE 128
|
||||
#define USART_DMA_BUF_SHIFT 7U
|
||||
#elif defined(STM32F0)
|
||||
/* The st_usbfs_v2_usb_driver only works with up to 64-byte buffers on the F0 parts */
|
||||
#define USART_DMA_BUF_SIZE 64
|
||||
#define USART_DMA_BUF_SHIFT 6U
|
||||
#endif
|
||||
|
||||
#define USART_DMA_BUF_SIZE (1U << USART_DMA_BUF_SHIFT)
|
||||
#define RX_FIFO_SIZE (USART_DMA_BUF_SIZE)
|
||||
#define TX_BUF_SIZE (USART_DMA_BUF_SIZE)
|
||||
|
||||
|
|
Loading…
Reference in New Issue