Lines Matching refs:p_reg
46 NRFY_STATIC_INLINE bool __nrfy_internal_i2s_event_handle(NRF_I2S_Type * p_reg,
51 NRFY_STATIC_INLINE uint32_t __nrfy_internal_i2s_events_process(NRF_I2S_Type * p_reg,
55 NRFY_STATIC_INLINE void __nrfy_internal_i2s_event_enabled_clear(NRF_I2S_Type * p_reg,
110 NRFY_STATIC_INLINE void nrfy_i2s_periph_configure(NRF_I2S_Type * p_reg, in nrfy_i2s_periph_configure() argument
113 nrf_i2s_configure(p_reg, &p_config->config); in nrfy_i2s_periph_configure()
116 nrf_i2s_clk_configure(p_reg, p_config->clksrc, p_config->enable_bypass); in nrfy_i2s_periph_configure()
120 nrf_i2s_pins_set(p_reg, &p_config->pins); in nrfy_i2s_periph_configure()
133 NRFY_STATIC_INLINE void nrfy_i2s_int_init(NRF_I2S_Type * p_reg, in nrfy_i2s_int_init() argument
138 __nrfy_internal_i2s_event_enabled_clear(p_reg, mask, NRF_I2S_EVENT_RXPTRUPD); in nrfy_i2s_int_init()
139 __nrfy_internal_i2s_event_enabled_clear(p_reg, mask, NRF_I2S_EVENT_TXPTRUPD); in nrfy_i2s_int_init()
140 __nrfy_internal_i2s_event_enabled_clear(p_reg, mask, NRF_I2S_EVENT_STOPPED); in nrfy_i2s_int_init()
142 __nrfy_internal_i2s_event_enabled_clear(p_reg, mask, NRF_I2S_EVENT_FRAMESTART); in nrfy_i2s_int_init()
146 NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(p_reg), irq_priority); in nrfy_i2s_int_init()
147 NRFX_IRQ_ENABLE(nrfx_get_irq_number(p_reg)); in nrfy_i2s_int_init()
151 nrf_i2s_int_enable(p_reg, mask); in nrfy_i2s_int_init()
161 NRFY_STATIC_INLINE void nrfy_i2s_int_uninit(NRF_I2S_Type * p_reg) in nrfy_i2s_int_uninit() argument
163 NRFX_IRQ_DISABLE(nrfx_get_irq_number(p_reg)); in nrfy_i2s_int_uninit()
179 NRFY_STATIC_INLINE uint32_t nrfy_i2s_events_process(NRF_I2S_Type * p_reg, in nrfy_i2s_events_process() argument
183 uint32_t evt_mask = __nrfy_internal_i2s_events_process(p_reg, mask, p_xfer); in nrfy_i2s_events_process()
197 NRFY_STATIC_INLINE void nrfy_i2s_buffers_set(NRF_I2S_Type * p_reg, in nrfy_i2s_buffers_set() argument
205 nrf_i2s_transfer_set(p_reg, in nrfy_i2s_buffers_set()
223 NRFY_STATIC_INLINE void nrfy_i2s_xfer_start(NRF_I2S_Type * p_reg, in nrfy_i2s_xfer_start() argument
227 nrf_i2s_task_trigger(p_reg, NRF_I2S_TASK_START); in nrfy_i2s_xfer_start()
238 if (__nrfy_internal_i2s_events_process(p_reg, in nrfy_i2s_xfer_start()
244 if (__nrfy_internal_i2s_events_process(p_reg, in nrfy_i2s_xfer_start()
263 NRFY_STATIC_INLINE void nrfy_i2s_abort(NRF_I2S_Type * p_reg, nrfy_i2s_xfer_desc_t const * p_xfer) in nrfy_i2s_abort() argument
265 nrf_i2s_task_trigger(p_reg, NRF_I2S_TASK_STOP); in nrfy_i2s_abort()
270 while (!__nrfy_internal_i2s_events_process(p_reg, evt_mask, p_xfer)) in nrfy_i2s_abort()
283 NRFY_STATIC_INLINE void nrfy_i2s_pins_get(NRF_I2S_Type const * p_reg, in nrfy_i2s_pins_get() argument
288 p_pins->sck_pin = nrf_i2s_sck_pin_get(p_reg), in nrfy_i2s_pins_get()
289 p_pins->lrck_pin = nrf_i2s_lrck_pin_get(p_reg), in nrfy_i2s_pins_get()
290 p_pins->mck_pin = nrf_i2s_mck_pin_get(p_reg), in nrfy_i2s_pins_get()
291 p_pins->sdout_pin = nrf_i2s_sdout_pin_get(p_reg), in nrfy_i2s_pins_get()
292 p_pins->sdin_pin = nrf_i2s_sdin_pin_get(p_reg), in nrfy_i2s_pins_get()
298 NRFY_STATIC_INLINE void nrfy_i2s_task_trigger(NRF_I2S_Type * p_reg, nrf_i2s_task_t task) in nrfy_i2s_task_trigger() argument
300 nrf_i2s_task_trigger(p_reg, task); in nrfy_i2s_task_trigger()
305 NRFY_STATIC_INLINE uint32_t nrfy_i2s_task_address_get(NRF_I2S_Type const * p_reg, in nrfy_i2s_task_address_get() argument
308 return nrf_i2s_task_address_get(p_reg, task); in nrfy_i2s_task_address_get()
312 NRFY_STATIC_INLINE void nrfy_i2s_event_clear(NRF_I2S_Type * p_reg, in nrfy_i2s_event_clear() argument
315 nrf_i2s_event_clear(p_reg, event); in nrfy_i2s_event_clear()
320 NRFY_STATIC_INLINE bool nrfy_i2s_event_check(NRF_I2S_Type const * p_reg, in nrfy_i2s_event_check() argument
324 bool check = nrf_i2s_event_check(p_reg, event); in nrfy_i2s_event_check()
330 NRFY_STATIC_INLINE uint32_t nrfy_i2s_event_address_get(NRF_I2S_Type const * p_reg, in nrfy_i2s_event_address_get() argument
333 return nrf_i2s_event_address_get(p_reg, event); in nrfy_i2s_event_address_get()
337 NRFY_STATIC_INLINE void nrfy_i2s_int_enable(NRF_I2S_Type * p_reg, uint32_t mask) in nrfy_i2s_int_enable() argument
339 nrf_i2s_int_enable(p_reg, mask); in nrfy_i2s_int_enable()
344 NRFY_STATIC_INLINE void nrfy_i2s_int_disable(NRF_I2S_Type * p_reg, uint32_t mask) in nrfy_i2s_int_disable() argument
346 nrf_i2s_int_disable(p_reg, mask); in nrfy_i2s_int_disable()
351 NRFY_STATIC_INLINE uint32_t nrfy_i2s_int_enable_check(NRF_I2S_Type const * p_reg, uint32_t mask) in nrfy_i2s_int_enable_check() argument
354 uint32_t check = nrf_i2s_int_enable_check(p_reg, mask); in nrfy_i2s_int_enable_check()
360 NRFY_STATIC_INLINE void nrfy_i2s_enable(NRF_I2S_Type * p_reg) in nrfy_i2s_enable() argument
362 nrf_i2s_enable(p_reg); in nrfy_i2s_enable()
367 NRFY_STATIC_INLINE void nrfy_i2s_disable(NRF_I2S_Type * p_reg) in nrfy_i2s_disable() argument
369 nrf_i2s_disable(p_reg); in nrfy_i2s_disable()
375 NRFY_STATIC_INLINE void nrfy_i2s_subscribe_set(NRF_I2S_Type * p_reg, in nrfy_i2s_subscribe_set() argument
379 nrf_i2s_subscribe_set(p_reg, task, channel); in nrfy_i2s_subscribe_set()
384 NRFY_STATIC_INLINE void nrfy_i2s_subscribe_clear(NRF_I2S_Type * p_reg, in nrfy_i2s_subscribe_clear() argument
387 nrf_i2s_subscribe_clear(p_reg, task); in nrfy_i2s_subscribe_clear()
392 NRFY_STATIC_INLINE void nrfy_i2s_publish_set(NRF_I2S_Type * p_reg, in nrfy_i2s_publish_set() argument
396 nrf_i2s_publish_set(p_reg, event, channel); in nrfy_i2s_publish_set()
401 NRFY_STATIC_INLINE void nrfy_i2s_publish_clear(NRF_I2S_Type * p_reg, in nrfy_i2s_publish_clear() argument
404 nrf_i2s_publish_clear(p_reg, event); in nrfy_i2s_publish_clear()
410 NRFY_STATIC_INLINE void nrfy_i2s_pins_set(NRF_I2S_Type * p_reg, nrf_i2s_pins_t const * p_pins) in nrfy_i2s_pins_set() argument
412 nrf_i2s_pins_set(p_reg, p_pins); in nrfy_i2s_pins_set()
417 NRFY_STATIC_INLINE uint32_t nrfy_i2s_sck_pin_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_sck_pin_get() argument
420 uint32_t pin = nrf_i2s_sck_pin_get(p_reg); in nrfy_i2s_sck_pin_get()
426 NRFY_STATIC_INLINE uint32_t nrfy_i2s_lrck_pin_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_lrck_pin_get() argument
429 uint32_t pin = nrf_i2s_lrck_pin_get(p_reg); in nrfy_i2s_lrck_pin_get()
435 NRFY_STATIC_INLINE uint32_t nrfy_i2s_mck_pin_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_mck_pin_get() argument
438 uint32_t pin = nrf_i2s_mck_pin_get(p_reg); in nrfy_i2s_mck_pin_get()
444 NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdout_pin_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_sdout_pin_get() argument
447 uint32_t pin = nrf_i2s_sdout_pin_get(p_reg); in nrfy_i2s_sdout_pin_get()
453 NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdin_pin_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_sdin_pin_get() argument
456 uint32_t pin = nrf_i2s_sdin_pin_get(p_reg); in nrfy_i2s_sdin_pin_get()
462 NRFY_STATIC_INLINE void nrfy_i2s_configure(NRF_I2S_Type * p_reg, nrf_i2s_config_t const * p_config) in nrfy_i2s_configure() argument
464 nrf_i2s_configure(p_reg, p_config); in nrfy_i2s_configure()
469 NRFY_STATIC_INLINE void nrfy_i2s_transfer_set(NRF_I2S_Type * p_reg, in nrfy_i2s_transfer_set() argument
474 nrf_i2s_transfer_set(p_reg, size, p_rx_buffer, p_tx_buffer); in nrfy_i2s_transfer_set()
479 NRFY_STATIC_INLINE void nrfy_i2s_rx_buffer_set(NRF_I2S_Type * p_reg, in nrfy_i2s_rx_buffer_set() argument
482 nrf_i2s_rx_buffer_set(p_reg, p_buffer); in nrfy_i2s_rx_buffer_set()
487 NRFY_STATIC_INLINE uint32_t * nrfy_i2s_rx_buffer_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_rx_buffer_get() argument
490 uint32_t * p_buffer = nrf_i2s_rx_buffer_get(p_reg); in nrfy_i2s_rx_buffer_get()
496 NRFY_STATIC_INLINE void nrfy_i2s_tx_buffer_set(NRF_I2S_Type * p_reg, in nrfy_i2s_tx_buffer_set() argument
499 nrf_i2s_tx_buffer_set(p_reg, p_buffer); in nrfy_i2s_tx_buffer_set()
504 NRFY_STATIC_INLINE uint32_t * nrfy_i2s_tx_buffer_get(NRF_I2S_Type const * p_reg) in nrfy_i2s_tx_buffer_get() argument
507 uint32_t * p_buffer = nrf_i2s_tx_buffer_get(p_reg); in nrfy_i2s_tx_buffer_get()
514 NRFY_STATIC_INLINE bool __nrfy_internal_i2s_event_handle(NRF_I2S_Type * p_reg, in __nrfy_internal_i2s_event_handle() argument
519 if ((mask & NRFY_EVENT_TO_INT_BITMASK(event)) && nrf_i2s_event_check(p_reg, event)) in __nrfy_internal_i2s_event_handle()
521 nrf_i2s_event_clear(p_reg, event); in __nrfy_internal_i2s_event_handle()
531 NRFY_STATIC_INLINE uint32_t __nrfy_internal_i2s_events_process(NRF_I2S_Type * p_reg, in __nrfy_internal_i2s_events_process() argument
540 (void)__nrfy_internal_i2s_event_handle(p_reg, mask, NRF_I2S_EVENT_FRAMESTART, &event_mask); in __nrfy_internal_i2s_events_process()
543 (void)__nrfy_internal_i2s_event_handle(p_reg, mask, NRF_I2S_EVENT_TXPTRUPD, &event_mask); in __nrfy_internal_i2s_events_process()
545 if (__nrfy_internal_i2s_event_handle(p_reg, mask, NRF_I2S_EVENT_RXPTRUPD, &event_mask) && in __nrfy_internal_i2s_events_process()
553 if (__nrfy_internal_i2s_event_handle(p_reg, mask, NRF_I2S_EVENT_STOPPED, &event_mask) && in __nrfy_internal_i2s_events_process()
564 NRFY_STATIC_INLINE void __nrfy_internal_i2s_event_enabled_clear(NRF_I2S_Type * p_reg, in __nrfy_internal_i2s_event_enabled_clear() argument
570 nrf_i2s_event_clear(p_reg, event); in __nrfy_internal_i2s_event_enabled_clear()