From 749d925bb87af40c469b0c30744f824e71f13418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Wed, 19 Feb 2020 20:53:06 +0100 Subject: [PATCH] usb/uart: increase tx buffer to cope with the large setup messages --- lib/uart.c | 2 +- lib/usb_cdcacm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uart.c b/lib/uart.c index 18c58c0..40a1fe3 100644 --- a/lib/uart.c +++ b/lib/uart.c @@ -43,7 +43,7 @@ #define UART_BAUDRATE 921600 /**< serial baud rate, in bits per second (with 8N1 8 bits, no parity bit, 1 stop bit settings) */ /* output ring buffer, indexes, and available memory */ -static volatile uint8_t tx_buffer[64] = {0}; /**< ring buffer for data to transmit */ +static volatile uint8_t tx_buffer[255] = {0}; /**< ring buffer for data to transmit */ static volatile uint16_t tx_i = 0; /**< current position of transmitted data */ static volatile uint16_t tx_used = 0; /**< how much data needs to be transmitted */ diff --git a/lib/usb_cdcacm.c b/lib/usb_cdcacm.c index 95c1874..f671316 100644 --- a/lib/usb_cdcacm.c +++ b/lib/usb_cdcacm.c @@ -47,7 +47,7 @@ static usbd_device *usb_device = NULL; /**< structure holding all the info relat static volatile bool first_connection = false; /**< used to detect when the first connection occurred */ /* output ring buffer, index, and available memory */ -static uint8_t tx_buffer[256] = {0}; /**< ring buffer for data to transmit */ +static uint8_t tx_buffer[512] = {0}; /**< ring buffer for data to transmit */ static volatile uint16_t tx_i = 0; /**< current position if transmitted data */ static volatile uint16_t tx_used = 0; /**< how much data needs to be transmitted */ static volatile bool tx_lock = false; /**< if the transmit buffer is currently being written */