From 009ddfd8956e663248ecadb1d76972ade6d3400c Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Tue, 12 Mar 2024 20:39:38 +0800 Subject: [PATCH] fix typo --- df_datalink_sp/src/main.c | 4 ++-- df_datalink_sp/src/systembus/systembus.c | 4 ++-- df_datalink_sp/src/systembus/systembus.h | 4 ++-- df_datalink_sp/src/systembus/systembus_uart.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/df_datalink_sp/src/main.c b/df_datalink_sp/src/main.c index f90e7f0..f865ce0 100644 --- a/df_datalink_sp/src/main.c +++ b/df_datalink_sp/src/main.c @@ -484,7 +484,7 @@ int main(void) while (true) { // System bus handler - if (SystemBus_IsReqPendding(sysbusDescPtr)) + if (SystemBus_IsReqPending(sysbusDescPtr)) { Status = SystemBus_HandleCmd(sysbusDescPtr); if (Status != SUCCESS) @@ -492,7 +492,7 @@ int main(void) DBG_ERROR("SystemBus_HandleCmd exit with ErrorCode: %" PRId32 ".\n", Status); } } - if (SystemBus_IsRsqPendding(sysbusDescPtr) && (!SystemBus_IsTxBusy(sysbusDescPtr))) + if (SystemBus_IsRsqPending(sysbusDescPtr) && (!SystemBus_IsTxBusy(sysbusDescPtr))) { // FIXME: Required by 12 (CASC) udelay(4000); diff --git a/df_datalink_sp/src/systembus/systembus.c b/df_datalink_sp/src/systembus/systembus.c index 55a81d7..6dff0ca 100644 --- a/df_datalink_sp/src/systembus/systembus.c +++ b/df_datalink_sp/src/systembus/systembus.c @@ -203,13 +203,13 @@ extern L2_INST *linkInstPtr; extern L2_CONFIG linkConfig; -inline bool SystemBus_IsReqPendding(SYSBUS *instPtr) +inline bool SystemBus_IsReqPending(SYSBUS *instPtr) { ASSERT(instPtr != NULL); return (!isCircQueueEmpty(instPtr->rxQueue)); } -inline bool SystemBus_IsRsqPendding(SYSBUS *instPtr) +inline bool SystemBus_IsRsqPending(SYSBUS *instPtr) { ASSERT(instPtr != NULL); return (!isCircQueueEmpty(instPtr->txQueue)); diff --git a/df_datalink_sp/src/systembus/systembus.h b/df_datalink_sp/src/systembus/systembus.h index e136735..b4648e2 100644 --- a/df_datalink_sp/src/systembus/systembus.h +++ b/df_datalink_sp/src/systembus/systembus.h @@ -57,8 +57,8 @@ int32_t SystemBus_MakeResp(SYSBUS *instPtr); int32_t SystemBus_TxIntrHandler(SYSBUS *instPtr); int32_t SystemBus_RxIntrHandler(SYSBUS *instPtr); -bool SystemBus_IsReqPendding(SYSBUS *instPtr); -bool SystemBus_IsRsqPendding(SYSBUS *instPtr); +bool SystemBus_IsReqPending(SYSBUS *instPtr); +bool SystemBus_IsRsqPending(SYSBUS *instPtr); bool SystemBus_IsTxBusy(SYSBUS *instPtr); bool SystemBus_IsRxBusy(SYSBUS *instPtr); diff --git a/df_datalink_sp/src/systembus/systembus_uart.c b/df_datalink_sp/src/systembus/systembus_uart.c index 45e3446..8722999 100644 --- a/df_datalink_sp/src/systembus/systembus_uart.c +++ b/df_datalink_sp/src/systembus/systembus_uart.c @@ -30,9 +30,9 @@ #define UART_STATUS_TX_BUSY 0x00010000 #define UART_STATUS_RX_BUSY 0x01000000 // Data buffer register -#define UART_TXBUFF_LOW 1024 +#define UART_TXBUFF_OFFSET 1024 #define UART_TXBUFF_MAX 1024 -#define UART_RXBUFF_LOW 2048 +#define UART_RXBUFF_OFFSET 2048 #define UART_RXBUFF_MAX 1024 // Frame Data offsets @@ -133,7 +133,7 @@ int SysbusUart_Send(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame) free(sendBuff); return FAILURE; } - memcpy((void *)(instPtr->config.baseAddr + UART_TXBUFF_LOW), sendBuff, (sendLen + sizeof(uint32_t) - 1) / sizeof(uint32_t) * sizeof(uint32_t)); + memcpy((void *)(instPtr->config.baseAddr + UART_TXBUFF_OFFSET), sendBuff, (sendLen + sizeof(uint32_t) - 1) / sizeof(uint32_t) * sizeof(uint32_t)); free(sendBuff); // Start Sending SYSTEMBUS_UART_mWriteReg(instPtr->config.baseAddr, UART_SEND_CMD, sendLen); @@ -169,7 +169,7 @@ int SysbusUart_Recv(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame) { return ENOMEM; } - memcpy(dBuff, (void *)(instPtr->config.baseAddr + UART_RXBUFF_LOW), sizeof(uint32_t) * dWLen); + memcpy(dBuff, (void *)(instPtr->config.baseAddr + UART_RXBUFF_OFFSET), sizeof(uint32_t) * dWLen); plBuff = dBuff + FRAME_HEAD_LEN; checkSumCal = 0; checkSum = plBuff[dLen + FRAME_DUMMY_LEN];