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
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 (uint32_t)NRF_DPPIC
3333#elif defined(NRF54L_SERIES )
34- #define RADIO_DOMAIN_NRFX_DPPI_INSTANCE NRFX_DPPI_INSTANCE(10)
34+ #define RADIO_DOMAIN_NRF_DPPI (uint32_t)NRF_DPPIC10
3535#else
3636#error Unsupported SoC type.
3737#endif
@@ -357,25 +357,23 @@ int8_t fem_default_tx_output_power_get(void)
357357}
358358
359359#if defined(DPPI_PRESENT )
360- static nrfx_err_t radio_domain_nrfx_dppi_channel_alloc (uint8_t * channel )
360+ static int 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 ;
364363
365- err = nrfx_dppi_channel_alloc (& radio_domain_nrfx_dppi , channel );
364+ ch = nrfx_gppi_channel_alloc (nrfx_gppi_domain_id_get (RADIO_DOMAIN_NRF_DPPI ), channel );
365+ if (ch < 0 ) {
366+ return ch ;
367+ }
368+
369+ * channel = (uint8_t )ch ;
366370
367- return err ;
371+ return 0 ;
368372}
369373
370374static 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
@@ -389,11 +387,11 @@ int fem_init(NRF_TIMER_Type *timer_instance, uint8_t compare_channel_mask)
389387 fem_activate_event .event .timer .compare_channel_mask = compare_channel_mask ;
390388
391389#if defined(DPPI_PRESENT )
392- nrfx_err_t err ;
390+ int err ;
393391 uint8_t fem_dppi_ch ;
394392
395393 err = radio_domain_nrfx_dppi_channel_alloc (& fem_dppi_ch );
396- if (err != NRFX_SUCCESS ) {
394+ if (err < 0 ) {
397395 printk ("radio_domain_nrfx_dppi_channel_alloc failed with: %d\n" , err );
398396 return - ENODEV ;
399397 }
0 commit comments