From 1442386e4456336dad6e69273c73d6917e54f0da Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Thu, 12 Jun 2025 15:33:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0UART=20buff=E7=9A=84?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/systembus/systembus_uart.c | 7 ++++--- src/systembus/systembus_uart.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/systembus/systembus_uart.c b/src/systembus/systembus_uart.c index e9bb943..8739bbc 100644 --- a/src/systembus/systembus_uart.c +++ b/src/systembus/systembus_uart.c @@ -100,8 +100,8 @@ int SysbusUart_Send(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame) { ASSERT(instPtr != NULL); ASSERT(frame != NULL); - uint8_t dLen, checkSum; - uint8_t sendLen; + uint8_t checkSum; + uint16_t dLen, sendLen; uint8_t *sendBuff; if (frame->len > UART_TXBUFF_MAX || frame->len == 0) { @@ -168,7 +168,8 @@ int SysbusUart_Recv(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame) ASSERT(instPtr != NULL); ASSERT(frame != NULL); - uint8_t dLen, dWLen, plLen, checkSum, checkSumCal; + uint16_t dLen, dWLen, plLen; + uint8_t checkSum, checkSumCal; uint8_t *plBuff, *dBuff; dLen = SYSTEMBUS_UART_mReadReg(instPtr->config.baseAddr, UART_RECV_CNT); if (dLen == 0 || dLen > UART_TXBUFF_MAX) diff --git a/src/systembus/systembus_uart.h b/src/systembus/systembus_uart.h index a86c290..b5105de 100644 --- a/src/systembus/systembus_uart.h +++ b/src/systembus/systembus_uart.h @@ -96,7 +96,7 @@ typedef struct uint16_t len; uint8_t checkSum; uint8_t isValid; - uint8_t data[256]; + uint8_t data[1024]; } SYSBUS_UART_FRAME; /************************** Function Prototypes ******************************/