From d43e1a62498d1d21e7ca585e2dd6af53f3e42c97 Mon Sep 17 00:00:00 2001 From: Brandon Hurst Date: Sun, 1 Dec 2024 11:03:12 -0800 Subject: [PATCH] Fix bad logic on ME16 UART IDX checking in MXC_UART_SetClockSource. --- Libraries/PeriphDrivers/Source/UART/uart_me16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/PeriphDrivers/Source/UART/uart_me16.c b/Libraries/PeriphDrivers/Source/UART/uart_me16.c index 5d7e058a67..4894caf85b 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_me16.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_me16.c @@ -236,7 +236,7 @@ int MXC_UART_SetClockSource(mxc_uart_regs_t *uart, mxc_uart_clock_t clock) { uint8_t retval = E_NO_ERROR; - if (MXC_UART_GET_IDX(uart) != 0 || MXC_UART_GET_IDX(uart) != 2) { + if (MXC_UART_GET_IDX(uart) != 0 && MXC_UART_GET_IDX(uart) != 2) { return E_BAD_PARAM; }