Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions applications/nrf5340_audio/src/modules/audio_sync_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static void rtc_isr_handler(nrfx_rtc_int_type_t int_type)
*/
static int audio_sync_timer_init(void)
{
nrfx_err_t ret;
int ret;
nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);

ret = nrfx_timer_init(&audio_sync_hf_timer_instance, &cfg, unused_timer_isr_handler);
Expand All @@ -180,7 +180,7 @@ static int audio_sync_timer_init(void)
}

ret = nrfx_rtc_init(&audio_sync_lf_timer_instance, &rtc_cfg, rtc_isr_handler);
if (ret - NRFX_ERROR_BASE_NUM) {
if (ret != 0) {
LOG_ERR("nrfx rtc init error: %d", ret);
return -ENODEV;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ static uint8_t peri_ppib_ch = INVALID_CHANNEL;

void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_setup(uint32_t cc_channel)
{
nrfx_err_t err;
int err;

err = nrfx_dppi_channel_alloc(&dppi20, &peri_dppi_ch);
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
__ASSERT_NO_MSG(err == 0);

err = nrfx_ppib_channel_alloc(&ppib11_21, &peri_ppib_ch);
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
__ASSERT_NO_MSG(err == 0);

/* {c} PPIB_11 <-- PPIB_21
* One of HW-fixed connections, so nothing to do.
Expand All @@ -273,13 +273,13 @@ void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_setup(uint3

void nrf_802154_platform_sl_lptimer_hw_task_cross_domain_connections_clear(void)
{
nrfx_err_t err;
int err;

err = nrfx_ppib_channel_free(&ppib11_21, peri_ppib_ch);
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
__ASSERT_NO_MSG(err == 0);

err = nrfx_dppi_channel_free(&dppi20, peri_dppi_ch);
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
__ASSERT_NO_MSG(err == 0);

peri_dppi_ch = INVALID_CHANNEL;
peri_ppib_ch = INVALID_CHANNEL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ static uint8_t peri_ppib_ch = INVALID_CHANNEL;

void nrf_802154_platform_timestamper_cross_domain_connections_setup(void)
{
nrfx_err_t err;
int err;

err = nrfx_dppi_channel_alloc(&dppi20, &peri_dppi_ch);
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
__ASSERT_NO_MSG(err == 0);

err = nrfx_ppib_channel_alloc(&ppib11_21, &peri_ppib_ch);
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
__ASSERT_NO_MSG(err == 0);

/* {d} PPIB_21 --> DPPIC_20 */
NRF_DPPI_ENDPOINT_SETUP(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ static int rtc_config(void)
const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG;

ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler);
if (ret != NRFX_SUCCESS) {
printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
if (ret != 0) {
printk("Failed initializing RTC (ret: %d)\n", ret);
return -ENODEV;
}

Expand Down Expand Up @@ -274,7 +274,7 @@ void controller_time_trigger_set(uint64_t timestamp_us)
timer_val = MAX(timer_val, 1);
timer_val = MIN(timer_val, 30);

if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) {
if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) {
printk("Failed setting trigger\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ static int rtc_config(void)
const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG;

ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler);
if (ret != NRFX_SUCCESS) {
printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
if (ret != 0) {
printk("Failed initializing RTC (ret: %d)\n", ret);
return -ENODEV;
}

Expand Down Expand Up @@ -248,7 +248,7 @@ void controller_time_trigger_set(uint64_t timestamp_us)
timer_val = MAX(timer_val, 1);
timer_val = MIN(timer_val, 30);

if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) {
if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) {
printk("Failed setting trigger\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int controller_time_init(void)
int ret;

ret = nrfx_grtc_channel_alloc(&grtc_channel);
if (ret != NRFX_SUCCESS) {
if (ret != 0) {
printk("Failed allocating GRTC channel (ret: %d)\n",
ret - NRFX_ERROR_BASE_NUM);
return -ENODEV;
Expand All @@ -35,7 +35,7 @@ uint64_t controller_time_us_get(void)
uint64_t current_time_us;

ret = nrfx_grtc_syscounter_get(&current_time_us);
if (ret != NRFX_SUCCESS) {
if (ret != 0) {
printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
return 0;
}
Expand All @@ -52,7 +52,7 @@ void controller_time_trigger_set(uint64_t timestamp_us)
};

ret = nrfx_grtc_syscounter_cc_absolute_set(&chan_data, timestamp_us, false);
if (ret != NRFX_SUCCESS) {
if (ret != 0) {
printk("Failed setting CC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
}
}
Expand Down
6 changes: 3 additions & 3 deletions samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ static int rtc_config(void)
const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG;

ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler);
if (ret != NRFX_SUCCESS) {
printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
if (ret != 0) {
printk("Failed initializing RTC (ret: %d)\n", ret);
return -ENODEV;
}

Expand Down Expand Up @@ -274,7 +274,7 @@ void controller_time_trigger_set(uint64_t timestamp_us)
timer_val = MAX(timer_val, 1);
timer_val = MIN(timer_val, 30);

if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) {
if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) {
printk("Failed setting trigger\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ static int rtc_config(void)
const nrfx_rtc_config_t rtc_cfg = NRFX_RTC_DEFAULT_CONFIG;

ret = nrfx_rtc_init(&app_rtc_instance, &rtc_cfg, rtc_isr_handler);
if (ret != NRFX_SUCCESS) {
printk("Failed initializing RTC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
if (ret != 0) {
printk("Failed initializing RTC (ret: %d)\n", ret);
return -ENODEV;
}

Expand Down Expand Up @@ -248,7 +248,7 @@ void controller_time_trigger_set(uint64_t timestamp_us)
timer_val = MAX(timer_val, 1);
timer_val = MIN(timer_val, 30);

if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != NRFX_SUCCESS) {
if (nrfx_rtc_cc_set(&app_rtc_instance, 0, rtc_val, false) != 0) {
printk("Failed setting trigger\n");
}

Expand Down
4 changes: 2 additions & 2 deletions samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ uint64_t controller_time_us_get(void)
uint64_t current_time_us;

ret = nrfx_grtc_syscounter_get(&current_time_us);
if (ret != NRFX_SUCCESS) {
if (ret != 0) {
printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
return 0;
}
Expand All @@ -52,7 +52,7 @@ void controller_time_trigger_set(uint64_t timestamp_us)
};

ret = nrfx_grtc_syscounter_cc_absolute_set(&chan_data, timestamp_us, false);
if (ret != NRFX_SUCCESS) {
if (ret != 0) {
printk("Failed setting CC (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
}
}
Expand Down
2 changes: 1 addition & 1 deletion samples/bluetooth/radio_coex_1wire/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static nrf_ppi_channel_t allocate_gppi_channel(void)
{
nrf_ppi_channel_t channel;

if (nrfx_ppi_channel_alloc(&channel) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_alloc(&channel) != 0) {
__ASSERT(false, "(D)PPI channel allocation error");
}
return channel;
Expand Down
36 changes: 18 additions & 18 deletions subsys/esb/esb_ppi.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,47 +185,47 @@ void esb_ppi_for_wait_for_rx_clear(void)

int esb_ppi_init(void)
{
nrfx_err_t err;
int err;

err = nrfx_ppi_channel_alloc(&egu_ramp_up);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_alloc(&disabled_egu);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_alloc(&egu_timer_start);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_alloc(&radio_address_timer_stop);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_alloc(&timer_compare0_radio_disable);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_alloc(&timer_compare1_radio_txen);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) {
err = nrfx_ppi_channel_alloc(&radio_end_timer_start);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}
}

err = nrfx_ppi_group_alloc(&ramp_up_ppi_group);
if (err != NRFX_SUCCESS) {
if (err != 0) {
LOG_ERR("gppi_group_alloc failed with: %d\n", err);
return -ENODEV;
}
Expand Down Expand Up @@ -258,47 +258,47 @@ void esb_ppi_disable_all(void)

void esb_ppi_deinit(void)
{
nrfx_err_t err;
int err;

err = nrfx_ppi_channel_free(egu_ramp_up);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_free(disabled_egu);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_free(egu_timer_start);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_free(radio_address_timer_stop);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_free(timer_compare0_radio_disable);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

err = nrfx_ppi_channel_free(timer_compare1_radio_txen);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

if (IS_ENABLED(CONFIG_ESB_NEVER_DISABLE_TX)) {
err = nrfx_ppi_channel_free(radio_end_timer_start);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}
}

err = nrfx_ppi_group_free(ramp_up_ppi_group);
if (err != NRFX_SUCCESS) {
if (err != 0) {
goto error;
}

Expand Down
2 changes: 1 addition & 1 deletion subsys/gazell/gzll_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ bool gzll_glue_init(void)

for (i = 0; i < 3; i++) {
err_code = nrfx_ppi_channel_alloc(&ppi_channel[i]);
if (err_code != NRFX_SUCCESS) {
if (err_code != 0) {
is_ok = false;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion subsys/mpsl/hwres/mpsl_hwres.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool mpsl_hwres_ppib_channel_alloc(NRF_PPIB_Type *p_ppib, uint8_t *p_ppib_ch)
return false;
}

return (nrfx_ppib_channel_alloc(ppib_interconnect, p_ppib_ch) == NRFX_SUCCESS);
return (nrfx_ppib_channel_alloc(ppib_interconnect, p_ppib_ch) == 0);
#else
(void)p_ppib;
(void)p_ppib_ch;
Expand Down
16 changes: 8 additions & 8 deletions subsys/mpsl/pin_debug/mpsl_pin_debug_radio_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ static int m_ppi_config(void)
uint8_t ppi_chan_radio_end;
uint8_t ppi_chan_radio_disabled;

if (nrfx_ppi_channel_alloc(&ppi_chan_radio_ready) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_alloc(&ppi_chan_radio_ready) != 0) {
LOG_ERR("Failed allocating PPI chan");
return -ENOMEM;
}

if (nrfx_ppi_channel_alloc(&ppi_chan_radio_address) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_alloc(&ppi_chan_radio_address) != 0) {
LOG_ERR("Failed allocating PPI chan");
return -ENOMEM;
}

if (nrfx_ppi_channel_alloc(&ppi_chan_radio_end) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_alloc(&ppi_chan_radio_end) != 0) {
LOG_ERR("Failed allocating PPI chan");
return -ENOMEM;
}

if (nrfx_ppi_channel_alloc(&ppi_chan_radio_disabled) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_alloc(&ppi_chan_radio_disabled) != 0) {
LOG_ERR("Failed allocating PPI chan");
return -ENOMEM;
}
Expand All @@ -71,19 +71,19 @@ static int m_ppi_config(void)
nrfx_gpiote_clr_task_address_get(&gpiote,
CONFIG_MPSL_PIN_DEBUG_RADIO_ADDRESS_AND_END_PIN));

if (nrfx_ppi_channel_enable(ppi_chan_radio_ready) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_enable(ppi_chan_radio_ready) != 0) {
LOG_ERR("Failed enabling channel");
return -ENOMEM;
}
if (nrfx_ppi_channel_enable(ppi_chan_radio_address) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_enable(ppi_chan_radio_address) != 0) {
LOG_ERR("Failed enabling channel");
return -ENOMEM;
}
if (nrfx_ppi_channel_enable(ppi_chan_radio_end) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_enable(ppi_chan_radio_end) != 0) {
LOG_ERR("Failed enabling channel");
return -ENOMEM;
}
if (nrfx_ppi_channel_enable(ppi_chan_radio_disabled) != NRFX_SUCCESS) {
if (nrfx_ppi_channel_enable(ppi_chan_radio_disabled) != 0) {
LOG_ERR("Failed enabling channel");
return -ENOMEM;
}
Expand Down
Loading
Loading