From 2a43af442460bf5498cd8d6d2d3223be776803a0 Mon Sep 17 00:00:00 2001 From: temi54c1l8 Date: Mon, 3 Jun 2024 14:51:20 +0200 Subject: [PATCH] Cast data after bitwise, for non-8bit CPU compatibility --- 304/CO_SRDO.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/304/CO_SRDO.c b/304/CO_SRDO.c index ab8807e..13f1a22 100644 --- a/304/CO_SRDO.c +++ b/304/CO_SRDO.c @@ -843,7 +843,7 @@ CO_SRDO_process(CO_SRDO_t* SRDO, uint32_t timeDifference_us, uint32_t* timerNext /* Verify, if normal and inverted data matches properly */ for (uint8_t i = 0; i < SRDO->dataLength; i++) { - if (~dataSRDO[0][i] != dataSRDO[1][i]) { + if ( (uint8_t)(~dataSRDO[0][i]) != dataSRDO[1][i]) { data_ok = false; SRDO->internalState = CO_SRDO_state_error_rxNotInverted; break;