Skip to content

Commit abb5221

Browse files
committed
lib: fem_al: Use GPPI instead of nrfx_dppi
nrfx_dppi is deprecated. Use GPPI helper instead. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 95247f9 commit abb5221

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

lib/fem_al/fem_al.c

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <hal/nrf_radio.h>
1111
#include <hal/nrf_timer.h>
1212
#ifdef DPPI_PRESENT
13-
#include <nrfx_dppi.h>
13+
#include <helpers/nrfx_gppi.h>
1414
#endif
1515
#include <nrfx.h>
1616

@@ -29,9 +29,9 @@
2929

3030
#ifdef DPPI_PRESENT
3131
#if defined(NRF53_SERIES)
32-
#define RADIO_DOMAIN_NRFX_DPPI_INSTANCE NRFX_DPPI_INSTANCE(0)
32+
#define RADIO_DOMAIN_NRF_DPPI NRF_DPPIC
3333
#elif defined(NRF54L_SERIES)
34-
#define RADIO_DOMAIN_NRFX_DPPI_INSTANCE NRFX_DPPI_INSTANCE(10)
34+
#define RADIO_DOMAIN_NRF_DPPI NRF_DPPIC10
3535
#else
3636
#error Unsupported SoC type.
3737
#endif
@@ -359,23 +359,21 @@ int8_t fem_default_tx_output_power_get(void)
359359
#if defined(DPPI_PRESENT)
360360
static nrfx_err_t radio_domain_nrfx_dppi_channel_alloc(uint8_t *channel)
361361
{
362-
nrfx_err_t err;
363-
nrfx_dppi_t radio_domain_nrfx_dppi = RADIO_DOMAIN_NRFX_DPPI_INSTANCE;
362+
int ch;
363+
364+
ch = nrfx_gppi_channel_alloc(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI), channel);
365+
if (ch < 0) {
366+
return ch;
367+
}
364368

365-
err = nrfx_dppi_channel_alloc(&radio_domain_nrfx_dppi, channel);
369+
*channel = (uint8_t)ch;
366370

367371
return err;
368372
}
369373

370374
static void radio_domain_nrfx_dppi_channel_enable(uint8_t channel)
371375
{
372-
nrfx_err_t err;
373-
nrfx_dppi_t radio_domain_nrfx_dppi = RADIO_DOMAIN_NRFX_DPPI_INSTANCE;
374-
375-
err = nrfx_dppi_channel_enable(&radio_domain_nrfx_dppi, channel);
376-
377-
__ASSERT_NO_MSG(err == NRFX_SUCCESS);
378-
(void)err;
376+
nrfx_gppi_channels_enable(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI), BIT(channel));
379377
}
380378
#endif
381379

0 commit comments

Comments
 (0)