Skip to content

Commit 0070493

Browse files
authored
fix(hal-uart): truncated tx/rx buffer size (uint16_t -> uint32_t)
1 parent cf44890 commit 0070493

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ bool uartSetHwFlowCtrlMode(uart_t *uart, uart_hw_flowcontrol_t mode, uint8_t thr
375375

376376
// This helper function will return true if a new IDF UART driver needs to be restarted and false if the current one can continue its execution
377377
bool _testUartBegin(
378-
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint16_t rx_buffer_size, uint16_t tx_buffer_size, bool inverted,
378+
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint32_t rx_buffer_size, uint32_t tx_buffer_size, bool inverted,
379379
uint8_t rxfifo_full_thrhd
380380
) {
381381
if (uart_nr >= SOC_UART_NUM) {
@@ -397,7 +397,7 @@ bool _testUartBegin(
397397
}
398398

399399
uart_t *uartBegin(
400-
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint16_t rx_buffer_size, uint16_t tx_buffer_size, bool inverted,
400+
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint32_t rx_buffer_size, uint32_t tx_buffer_size, bool inverted,
401401
uint8_t rxfifo_full_thrhd
402402
) {
403403
if (uart_nr >= SOC_UART_NUM) {

Diff for: cores/esp32/esp32-hal-uart.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ struct uart_struct_t;
3333
typedef struct uart_struct_t uart_t;
3434

3535
bool _testUartBegin(
36-
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint16_t rx_buffer_size, uint16_t tx_buffer_size, bool inverted,
36+
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint32_t rx_buffer_size, uint32_t tx_buffer_size, bool inverted,
3737
uint8_t rxfifo_full_thrhd
3838
);
3939
uart_t *uartBegin(
40-
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint16_t rx_buffer_size, uint16_t tx_buffer_size, bool inverted,
40+
uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rxPin, int8_t txPin, uint32_t rx_buffer_size, uint32_t tx_buffer_size, bool inverted,
4141
uint8_t rxfifo_full_thrhd
4242
);
4343
void uartEnd(uint8_t uart_num);

0 commit comments

Comments
 (0)