Skip to content

Commit

Permalink
[nrf fromtree] drivers: serial: nrf: add default value for frame time…
Browse files Browse the repository at this point in the history
…out cfg

This is needed to avoid warnings about uninitialized
structure member, which was added in nrfx 3.6.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit 4312805)
  • Loading branch information
nika-nordic authored and carlescufi committed Aug 30, 2024
1 parent c34adde commit 1e3b3f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/serial/uart_nrfx_uarte.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ static int uarte_nrfx_configure(const struct device *dev,
struct uarte_nrfx_data *data = dev->data;
nrf_uarte_config_t uarte_cfg;

#if NRF_UARTE_HAS_FRAME_TIMEOUT
uarte_cfg.frame_timeout = NRF_UARTE_FRAME_TIMEOUT_DIS;
#endif

#if defined(UARTE_CONFIG_STOP_Msk)
switch (cfg->stop_bits) {
case UART_CFG_STOP_BITS_1:
Expand Down
4 changes: 4 additions & 0 deletions drivers/serial/uart_nrfx_uarte2.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,10 @@ static int uarte_nrfx_configure(const struct device *dev,
struct uarte_nrfx_data *data = dev->data;
nrf_uarte_config_t uarte_cfg;

#if NRF_UARTE_HAS_FRAME_TIMEOUT
uarte_cfg.frame_timeout = NRF_UARTE_FRAME_TIMEOUT_DIS;
#endif

#if defined(UARTE_CONFIG_STOP_Msk)
switch (cfg->stop_bits) {
case UART_CFG_STOP_BITS_1:
Expand Down

0 comments on commit 1e3b3f5

Please sign in to comment.