Skip to content

Commit 254ed62

Browse files
committed
fix nrf52832 build error
1 parent 8a979d3 commit 254ed62

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

lib/sdk/components/drivers_nrf/uart/nrf_drv_uart.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,23 @@ __STATIC_INLINE void apply_config(nrf_drv_uart_t const * p_instance, nrf_drv_uar
119119
nrf_gpio_cfg_input(p_config->pselrxd, NRF_GPIO_PIN_NOPULL);
120120
}
121121

122+
nrf_uarte_config_t uarte_cfg =
123+
{
124+
.hwfc = (nrf_uarte_hwfc_t) p_config->hwfc,
125+
.parity = (nrf_uarte_parity_t) p_config->parity
126+
};
127+
128+
nrf_uart_config_t uart_cfg =
129+
{
130+
.hwfc = (nrf_uart_hwfc_t) p_config->hwfc,
131+
.parity = (nrf_uart_parity_t) p_config->parity
132+
};
133+
122134
CODE_FOR_UARTE
123135
(
124136
nrf_uarte_baudrate_set(p_instance->reg.p_uarte, (nrf_uarte_baudrate_t)p_config->baudrate);
125-
nrf_uarte_configure(p_instance->reg.p_uarte, (nrf_uarte_parity_t)p_config->parity,
126-
(nrf_uarte_hwfc_t)p_config->hwfc);
137+
// nrf_uarte_configure(p_instance->reg.p_uarte, (nrf_uarte_parity_t)p_config->parity, (nrf_uarte_hwfc_t)p_config->hwfc);
138+
nrf_uarte_configure(p_instance->reg.p_uarte, &uarte_cfg);
127139
nrf_uarte_txrx_pins_set(p_instance->reg.p_uarte, p_config->pseltxd, p_config->pselrxd);
128140
if (p_config->hwfc == NRF_UART_HWFC_ENABLED)
129141
{
@@ -142,7 +154,8 @@ __STATIC_INLINE void apply_config(nrf_drv_uart_t const * p_instance, nrf_drv_uar
142154
CODE_FOR_UART
143155
(
144156
nrf_uart_baudrate_set(p_instance->reg.p_uart, p_config->baudrate);
145-
nrf_uart_configure(p_instance->reg.p_uart, p_config->parity, p_config->hwfc);
157+
// nrf_uart_configure(p_instance->reg.p_uart, p_config->parity, p_config->hwfc);
158+
nrf_uart_configure(p_instance->reg.p_uart, &uart_cfg);
146159
nrf_uart_txrx_pins_set(p_instance->reg.p_uart, p_config->pseltxd, p_config->pselrxd);
147160
if (p_config->hwfc == NRF_UART_HWFC_ENABLED)
148161
{

0 commit comments

Comments
 (0)