usbuart: Moved the last of the AUX serial definitions into aux_serial.h
This commit is contained in:
parent
a424a17317
commit
6427b987bf
|
@ -24,6 +24,21 @@
|
|||
#include <libopencm3/usb/usbd.h>
|
||||
#include <libopencm3/usb/cdc.h>
|
||||
|
||||
#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_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_SHIFT 6U
|
||||
#endif
|
||||
|
||||
#define USART_DMA_BUF_SIZE (1U << USART_DMA_BUF_SHIFT)
|
||||
#define AUX_UART_BUFFER_SIZE (USART_DMA_BUF_SIZE)
|
||||
#elif defined(LM4F)
|
||||
#define AUX_UART_BUFFER_SIZE 128
|
||||
#endif
|
||||
|
||||
void aux_serial_init(void);
|
||||
void aux_serial_set_encoding(struct usb_cdc_line_coding *coding);
|
||||
|
||||
|
|
|
@ -28,19 +28,4 @@ uint32_t debug_serial_fifo_send(const char *const fifo, const uint32_t fifo_begi
|
|||
#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_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_SHIFT 6U
|
||||
#endif
|
||||
|
||||
#define USART_DMA_BUF_SIZE (1U << USART_DMA_BUF_SHIFT)
|
||||
#define AUX_UART_BUFFER_SIZE (USART_DMA_BUF_SIZE)
|
||||
#elif defined(LM4F)
|
||||
#define AUX_UART_BUFFER_SIZE 128
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue