Skip to content

Commit 48be252

Browse files
nika-nordicmstasiaknordic
authored andcommitted
[nrf fromlist] drivers: serial: nrf: set default frame size and endianess
Setting frame size and endianess is now supported in UARTE HAL, so these settings must have default values configured to avoid compiler warnings about uninitialized fields. Upstream PR #: 86703 Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent e8f8f5f commit 48be252

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/serial/uart_nrfx_uarte.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,12 @@ static int uarte_nrfx_configure(const struct device *dev,
605605
#ifdef UARTE_HAS_FRAME_TIMEOUT
606606
uarte_cfg.frame_timeout = NRF_UARTE_FRAME_TIMEOUT_EN;
607607
#endif
608+
609+
#if NRF_UARTE_HAS_FRAME_SIZE
610+
uarte_cfg.frame_size = NRF_UARTE_FRAME_SIZE_8_BIT;
611+
uarte_cfg.endian = NRF_UARTE_ENDIAN_MSB;
612+
#endif
613+
608614
nrf_uarte_configure(get_uarte_instance(dev), &uarte_cfg);
609615

610616
data->uart_config = *cfg;

0 commit comments

Comments
 (0)