From 269a04d5f5b42e8f54ba6b3d57dee99ab1fe54ec Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Fri, 27 Jun 2025 13:01:20 -0700 Subject: [PATCH] mbv: fix bug in xuartlite --- mbv/hal/uart/xuartlite.c | 3 +-- mbv/hal/uart/xuartlite_intr.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mbv/hal/uart/xuartlite.c b/mbv/hal/uart/xuartlite.c index 877ac9e..f7e1acf 100644 --- a/mbv/hal/uart/xuartlite.c +++ b/mbv/hal/uart/xuartlite.c @@ -387,8 +387,7 @@ int XUartLite_IsSending(XUartLite *InstancePtr) /* * Read the status register to determine if the transmitter is empty */ - StatusRegister = XUartLite_ReadReg(InstancePtr->RegBaseAddress, - XUL_STATUS_REG_OFFSET); + StatusRegister = XUartLite_GetSR(InstancePtr); /* * If the transmitter is not empty then indicate that the UART is still diff --git a/mbv/hal/uart/xuartlite_intr.c b/mbv/hal/uart/xuartlite_intr.c index f11d9cb..e29adca 100644 --- a/mbv/hal/uart/xuartlite_intr.c +++ b/mbv/hal/uart/xuartlite_intr.c @@ -143,8 +143,7 @@ void XUartLite_InterruptHandler(XUartLite *InstancePtr) * Read the status register to determine which, coulb be both * interrupt is active */ - IsrStatus = XUartLite_ReadReg(InstancePtr->RegBaseAddress, - XUL_STATUS_REG_OFFSET); + IsrStatus = XUartLite_GetSR(InstancePtr); if ((IsrStatus & (XUL_SR_RX_FIFO_FULL | XUL_SR_RX_FIFO_VALID_DATA)) != 0) {