Commit eb996924 authored by Krzysztof Chruściński's avatar Krzysztof Chruściński Committed by Dan Kalowsky
Browse files

drivers: serial: nrfx_uarte: use ifdef instead of IS_ENABLED

In certain configurations timeout field is not present in the
data structure so preprocessor ifdef must be used instead of
compiler check.

Signed-off-by: default avatarKrzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
parent 72dc0e5f
Loading
Loading
Loading
Loading
+2 −2
Changes for drivers/serial/uart_nrfx_uarte.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1611,11 +1611,11 @@ static void endrx_isr(const struct device *dev)
		}

		irq_unlock(key);
		if (IS_ENABLED(UARTE_HAS_FRAME_TIMEOUT)) {
#ifdef UARTE_HAS_FRAME_TIMEOUT
		if (start_timeout && !K_TIMEOUT_EQ(async_rx->timeout, K_NO_WAIT)) {
			k_timer_start(&async_rx->timer, async_rx->timeout, K_NO_WAIT);
		}
		}
#endif
	}

#if !defined(CONFIG_UART_NRFX_UARTE_ENHANCED_RX)