Skip to content

Commit bf81152

Browse files
masz-nordiccarlescufi
authored andcommitted
samples: peripheral: radio test: align to nrfx 4.0
nrfx functions now return errno.h values. Signed-off-by: Marcin Szymczyk <[email protected]>
1 parent 94c70be commit bf81152

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

samples/peripheral/radio_test/src/radio_test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ static void timer_handler(nrf_timer_event_t event_type, void *context)
12261226

12271227
static void timer_init(const struct radio_test_config *config)
12281228
{
1229-
nrfx_err_t err;
1229+
int err;
12301230
nrfx_timer_config_t timer_cfg = {
12311231
.frequency = NRFX_MHZ_TO_HZ(1),
12321232
.mode = NRF_TIMER_MODE_TIMER,
@@ -1235,7 +1235,7 @@ static void timer_init(const struct radio_test_config *config)
12351235
};
12361236

12371237
err = nrfx_timer_init(&timer, &timer_cfg, timer_handler);
1238-
if (err != NRFX_SUCCESS) {
1238+
if (err != 0) {
12391239
printk("nrfx_timer_init failed with: %d\n", err);
12401240
}
12411241
}
@@ -1293,7 +1293,7 @@ void radio_handler(const void *context)
12931293

12941294
int radio_test_init(struct radio_test_config *config)
12951295
{
1296-
nrfx_err_t nrfx_err;
1296+
int nrfx_err;
12971297
uint32_t rad_domain = nrfx_gppi_domain_id_get((uint32_t)NRF_RADIO);
12981298

12991299
timer_init(config);
@@ -1304,7 +1304,7 @@ int radio_test_init(struct radio_test_config *config)
13041304
irq_enable(RADIO_TEST_RADIO_IRQn);
13051305

13061306
nrfx_err = nrfx_gppi_domain_conn_alloc(rad_domain, rad_domain, &ppi_radio_start);
1307-
if (nrfx_err != NRFX_SUCCESS) {
1307+
if (nrfx_err != 0) {
13081308
printk("Failed to allocate gppi channel.\n");
13091309
return -EFAULT;
13101310
}

0 commit comments

Comments
 (0)