nrf_saadc_task_address_get new API with NRF_SAADC_Type

Hello, I'm trying to implement timer-driven ADC acquisition with the nrfx library. I previously configured some timer-drive GPIOs like in the following code 

    err = nrfx_ppi_channel_assign(ppi_ch,
        nrfx_timer_event_address_get(&timer, NRF_TIMER_EVENT_COMPARE0),
        nrfx_gpiote_clr_task_address_get(&gpiote, GPIO_LED_RED));

I'm having some issues getting the correct task address for the SAADC peripheral due to what seems to be a change in API.
The example that is often linked is this one, where the task is determined with nrf_saadc_task_address_get(NRF_SAADC_TASK_SAMPLE));

https://github.com/NordicPlayground/nRF52-ADC-examples/blob/de612912a7e006052e59035adfaf1aa4f06cb1a9/nrfx_saadc_multi_channel_ppi/main.c#L131

 However, this API also requires a second parameter: NRF_SAADC_Type const * p_reg as visible here

https://github.com/NordicSemiconductor/nrfx/blob/4620e7ccfebc08dbd4c039bc7d530b62c4c68ca8/hal/nrf_saadc.h#L430

How do I get this (since I'm working in zephyr, ideally from the device tree), and where is this documented? I feel this nrfx API is quite inconsistent across devices.

Thanks!

Parents Reply Children
Related