Skip to content

Commit 770a3d2

Browse files
committed
gazell: gzll_glue: Use GPPI for PPI resource allocation
Use GPPI instead of nrfx_ppi which is deprecated. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 0493af8 commit 770a3d2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

subsys/gazell/gzll_glue.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include <nrf_gzll_glue.h>
1313
#include <gzll_glue.h>
14-
#include <nrfx_ppi.h>
15-
14+
#include <helpers/nrfx_gppi.h>
15+
#include <hal/nrf_ppi.h>
1616

1717
#if defined(CONFIG_GAZELL_ZERO_LATENCY_IRQS)
1818
#define GAZELL_HIGH_IRQ_FLAGS IRQ_ZERO_LATENCY
@@ -93,8 +93,9 @@ bool gzll_glue_init(void)
9393
{
9494
bool is_ok = true;
9595
const struct device *clkctrl = DEVICE_DT_GET_ONE(nordic_nrf_clock);
96-
nrfx_err_t err_code;
96+
int err;
9797
nrf_ppi_channel_t ppi_channel[3];
98+
nrfx_gppi_handle_t handle;
9899
uint8_t i;
99100

100101
irq_disable(RADIO_IRQn);
@@ -127,11 +128,12 @@ bool gzll_glue_init(void)
127128
}
128129

129130
for (i = 0; i < 3; i++) {
130-
err_code = nrfx_ppi_channel_alloc(&ppi_channel[i]);
131-
if (err_code != NRFX_SUCCESS) {
131+
err = nrfx_gppi_domain_conn_alloc(0, 0, &handle);
132+
if (err < 0) {
132133
is_ok = false;
133134
break;
134135
}
136+
ppi_channel[i] = (nrf_ppi_channel_t)handle;
135137
}
136138

137139
if (is_ok) {

0 commit comments

Comments
 (0)