uart: increase index type to allow larger buffer
This commit is contained in:
parent
becf280d9a
commit
4141c43682
|
@ -12,7 +12,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/** library for UART communication (code)
|
/** library for UART communication
|
||||||
* @file
|
* @file
|
||||||
* @author King Kévin <kingkevin@cuvoodoo.info>
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
||||||
* @date 2016-2020
|
* @date 2016-2020
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
|
|
||||||
/* output ring buffer, indexes, and available memory */
|
/* 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[64] = {0}; /**< ring buffer for data to transmit */
|
||||||
static volatile uint8_t tx_i = 0; /**< current position of transmitted data */
|
static volatile uint16_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_used = 0; /**< how much data needs to be transmitted */
|
||||||
|
|
||||||
void uart_setup(void)
|
void uart_setup(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/** library for UART communication (API)
|
/** library for UART communication
|
||||||
* @file
|
* @file
|
||||||
* @author King Kévin <kingkevin@cuvoodoo.info>
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
||||||
* @date 2016-2020
|
* @date 2016-2020
|
||||||
|
|
Loading…
Reference in New Issue