Skip to content

Commit be6d060

Browse files
committed
tests: drivers: audio: pdm_loopback: Align to the new GPPI API
Align test to the new GPPI API. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent dc87d50 commit be6d060

File tree

1 file changed

+6
-11
lines changed
  • tests/drivers/audio/pdm_loopback/src

1 file changed

+6
-11
lines changed

tests/drivers/audio/pdm_loopback/src/main.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,13 @@ ZTEST(pdm_loopback, test_pdm_clk_frequency)
253253

254254
nrfx_timer_enable(&timer_instance);
255255

256-
uint8_t gppi_channel;
256+
nrfx_gppi_handle_t gppi_handle;
257+
uint32_t eep = nrfx_gpiote_in_event_address_get(&gpiote_instance, CLOCK_INPUT_PIN);
258+
uint32_t tep = nrfx_timer_task_address_get(&timer_instance, NRF_TIMER_TASK_COUNT);
257259

258-
ret = nrfx_gppi_channel_alloc(&gppi_channel);
259-
260-
zassert_true(ret == NRFX_SUCCESS,
261-
"GPPI channel allocation failed, return code = 0x%08X", ret);
262-
nrfx_gppi_channel_endpoints_setup(gppi_channel,
263-
nrfx_gpiote_in_event_address_get(&gpiote_instance,
264-
CLOCK_INPUT_PIN),
265-
nrfx_timer_task_address_get(&timer_instance,
266-
NRF_TIMER_TASK_COUNT));
267-
nrfx_gppi_channels_enable(BIT(gppi_channel));
260+
ret = nrfx_gppi_conn_alloc(eep, tep, &gppi_handle);
261+
zassert_equal(ret, 0, "GPPI channel allocation failed, return code = %d", ret);
262+
nrfx_gppi_conn_enable(gppi_handle);
268263

269264
pdm_transfer(pdm_dev, &pdm_cfg, BLOCK_COUNT);
270265

0 commit comments

Comments
 (0)