From 4141c43682e4ad9de63b866f63755549ec402f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Wed, 19 Feb 2020 21:07:58 +0100 Subject: [PATCH] uart: increase index type to allow larger buffer --- lib/uart.c | 6 +++--- lib/uart.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/uart.c b/lib/uart.c index 946e531..18c58c0 100644 --- a/lib/uart.c +++ b/lib/uart.c @@ -12,7 +12,7 @@ * along with this program. If not, see . * */ -/** library for UART communication (code) +/** library for UART communication * @file * @author King Kévin * @date 2016-2020 @@ -44,8 +44,8 @@ /* 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_i = 0; /**< current position of transmitted data */ -static volatile uint8_t tx_used = 0; /**< how much data needs to be transmitted */ +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 */ void uart_setup(void) { diff --git a/lib/uart.h b/lib/uart.h index 59e0bf3..3e4f5ce 100644 --- a/lib/uart.h +++ b/lib/uart.h @@ -12,7 +12,7 @@ * along with this program. If not, see . * */ -/** library for UART communication (API) +/** library for UART communication * @file * @author King Kévin * @date 2016-2020