drivers: uart_nrfx_uarte: Remove redundant HW_RX_COUNTING_ENABLED calls
Merge three adjacent `if (HW_RX_COUNTING_ENABLED(data))` blocks into a common one. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
9628ecdc39
commit
595fbf9b97
1 changed files with 0 additions and 4 deletions
|
@ -662,9 +662,7 @@ static int uarte_nrfx_rx_counting_init(const struct device *dev)
|
|||
nrfx_timer_enable(&cfg->timer);
|
||||
nrfx_timer_clear(&cfg->timer);
|
||||
}
|
||||
}
|
||||
|
||||
if (HW_RX_COUNTING_ENABLED(data)) {
|
||||
ret = gppi_channel_alloc(&data->async->rx_cnt.ppi);
|
||||
if (ret != NRFX_SUCCESS) {
|
||||
LOG_ERR("Failed to allocate PPI Channel, "
|
||||
|
@ -672,9 +670,7 @@ static int uarte_nrfx_rx_counting_init(const struct device *dev)
|
|||
data->async->hw_rx_counting = false;
|
||||
nrfx_timer_uninit(&cfg->timer);
|
||||
}
|
||||
}
|
||||
|
||||
if (HW_RX_COUNTING_ENABLED(data)) {
|
||||
#if CONFIG_HAS_HW_NRF_PPI
|
||||
ret = nrfx_ppi_channel_assign(
|
||||
data->async->rx_cnt.ppi,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue