Skip to content

Commit 92d8d08

Browse files
committed
drivers: serial: nrfx_uarte: use ifdef instead of IS_ENABLED
In certain configurations timeout field is not present in the data structure so ifdef must be used instead of compile-time check. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
1 parent 39b2451 commit 92d8d08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/serial/uart_nrfx_uarte.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,11 +1611,11 @@ static void endrx_isr(const struct device *dev)
16111611
}
16121612

16131613
irq_unlock(key);
1614-
if (IS_ENABLED(UARTE_HAS_FRAME_TIMEOUT)) {
1615-
if (start_timeout && !K_TIMEOUT_EQ(async_rx->timeout, K_NO_WAIT)) {
1616-
k_timer_start(&async_rx->timer, async_rx->timeout, K_NO_WAIT);
1617-
}
1614+
#ifdef UARTE_HAS_FRAME_TIMEOUT
1615+
if (start_timeout && !K_TIMEOUT_EQ(async_rx->timeout, K_NO_WAIT)) {
1616+
k_timer_start(&async_rx->timer, async_rx->timeout, K_NO_WAIT);
16181617
}
1618+
#endif
16191619
}
16201620

16211621
#if !defined(CONFIG_UART_NRFX_UARTE_ENHANCED_RX)

0 commit comments

Comments
 (0)