From 9e0cfa1b8260fe657351ecd144b54743289c83a2 Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Mon, 16 Dec 2024 20:40:52 +0800 Subject: [PATCH] fix(systembus): add default init value. --- src/systembus/systembus_psuart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/systembus/systembus_psuart.c b/src/systembus/systembus_psuart.c index 5c3f4a6..f65082c 100644 --- a/src/systembus/systembus_psuart.c +++ b/src/systembus/systembus_psuart.c @@ -96,6 +96,10 @@ int SysbusPSUart_Init(SYSBUS_PSUART **instPtr, const SYSBUS_PSUART_CONFIG *confi if (NULL == (*instPtr)->hwConfig) { return FAILURE; } + (*instPtr)->currTxMsg = 0; + (*instPtr)->currRxMsg = 0; + (*instPtr)->txCnt = 0; + (*instPtr)->rxCnt = 0; (*instPtr)->txDone = false; (*instPtr)->rxDone = false;