Lines Matching refs:p_reg
44 NRFY_STATIC_INLINE bool __nrfy_internal_pwm_event_handle(NRF_PWM_Type * p_reg,
49 NRFY_STATIC_INLINE uint32_t __nrfy_internal_pwm_events_process(NRF_PWM_Type * p_reg, uint32_t mask);
51 NRFY_STATIC_INLINE void __nrfy_internal_pwm_event_enabled_clear(NRF_PWM_Type * p_reg,
90 NRFY_STATIC_INLINE void nrfy_pwm_periph_configure(NRF_PWM_Type * p_reg, in nrfy_pwm_periph_configure() argument
95 nrf_pwm_pins_set(p_reg, p_config->output_pins); in nrfy_pwm_periph_configure()
97 nrf_pwm_configure(p_reg, p_config->base_clock, p_config->count_mode, p_config->top_value); in nrfy_pwm_periph_configure()
98 nrf_pwm_decoder_set(p_reg, p_config->load_mode, p_config->step_mode); in nrfy_pwm_periph_configure()
110 NRFY_STATIC_INLINE void nrfy_pwm_int_init(NRF_PWM_Type * p_reg, in nrfy_pwm_int_init() argument
115 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_LOOPSDONE); in nrfy_pwm_int_init()
116 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_SEQEND0); in nrfy_pwm_int_init()
117 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_SEQEND1); in nrfy_pwm_int_init()
118 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_STOPPED); in nrfy_pwm_int_init()
119 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_SEQSTARTED0); in nrfy_pwm_int_init()
120 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_SEQSTARTED1); in nrfy_pwm_int_init()
121 __nrfy_internal_pwm_event_enabled_clear(p_reg, mask, NRF_PWM_EVENT_PWMPERIODEND); in nrfy_pwm_int_init()
124 NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(p_reg), irq_priority); in nrfy_pwm_int_init()
125 NRFX_IRQ_ENABLE(nrfx_get_irq_number(p_reg)); in nrfy_pwm_int_init()
129 nrf_pwm_int_enable(p_reg, mask); in nrfy_pwm_int_init()
139 NRFY_STATIC_INLINE void nrfy_pwm_int_uninit(NRF_PWM_Type * p_reg) in nrfy_pwm_int_uninit() argument
141 NRFX_IRQ_DISABLE(nrfx_get_irq_number(p_reg)); in nrfy_pwm_int_uninit()
154 NRFY_STATIC_INLINE uint32_t nrfy_pwm_events_process(NRF_PWM_Type * p_reg, uint32_t mask) in nrfy_pwm_events_process() argument
157 uint32_t evt_mask = __nrfy_internal_pwm_events_process(p_reg, mask); in nrfy_pwm_events_process()
169 NRFY_STATIC_INLINE void nrfy_pwm_start(NRF_PWM_Type * p_reg, in nrfy_pwm_start() argument
173 nrf_pwm_task_trigger(p_reg, nrf_pwm_seqstart_task_get(seq_id)); in nrfy_pwm_start()
179 while (!__nrfy_internal_pwm_events_process(p_reg, evt_mask)) in nrfy_pwm_start()
191 NRFY_STATIC_INLINE void nrfy_pwm_abort(NRF_PWM_Type * p_reg, bool wait) in nrfy_pwm_abort() argument
193 nrf_pwm_task_trigger(p_reg, NRF_PWM_TASK_STOP); in nrfy_pwm_abort()
199 while (!__nrfy_internal_pwm_events_process(p_reg, evt_mask)) in nrfy_pwm_abort()
201 (void)__nrfy_internal_pwm_events_process(p_reg, in nrfy_pwm_abort()
209 NRFY_STATIC_INLINE void nrfy_pwm_task_trigger(NRF_PWM_Type * p_reg, in nrfy_pwm_task_trigger() argument
212 nrf_pwm_task_trigger(p_reg, task); in nrfy_pwm_task_trigger()
217 NRFY_STATIC_INLINE uint32_t nrfy_pwm_task_address_get(NRF_PWM_Type const * p_reg, in nrfy_pwm_task_address_get() argument
220 return nrf_pwm_task_address_get(p_reg, task); in nrfy_pwm_task_address_get()
224 NRFY_STATIC_INLINE void nrfy_pwm_event_clear(NRF_PWM_Type * p_reg, in nrfy_pwm_event_clear() argument
227 nrf_pwm_event_clear(p_reg, event); in nrfy_pwm_event_clear()
232 NRFY_STATIC_INLINE bool nrfy_pwm_event_check(NRF_PWM_Type const * p_reg, in nrfy_pwm_event_check() argument
236 bool ret = nrf_pwm_event_check(p_reg, event); in nrfy_pwm_event_check()
242 NRFY_STATIC_INLINE uint32_t nrfy_pwm_event_address_get(NRF_PWM_Type const * p_reg, in nrfy_pwm_event_address_get() argument
245 return nrf_pwm_event_address_get(p_reg, event); in nrfy_pwm_event_address_get()
249 NRFY_STATIC_INLINE void nrfy_pwm_shorts_enable(NRF_PWM_Type * p_reg, in nrfy_pwm_shorts_enable() argument
252 nrf_pwm_shorts_enable(p_reg, mask); in nrfy_pwm_shorts_enable()
257 NRFY_STATIC_INLINE void nrfy_pwm_shorts_disable(NRF_PWM_Type * p_reg, in nrfy_pwm_shorts_disable() argument
260 nrf_pwm_shorts_disable(p_reg, mask); in nrfy_pwm_shorts_disable()
265 NRFY_STATIC_INLINE void nrfy_pwm_shorts_set(NRF_PWM_Type * p_reg, in nrfy_pwm_shorts_set() argument
268 nrf_pwm_shorts_set(p_reg, mask); in nrfy_pwm_shorts_set()
273 NRFY_STATIC_INLINE void nrfy_pwm_int_enable(NRF_PWM_Type * p_reg, in nrfy_pwm_int_enable() argument
276 nrf_pwm_int_enable(p_reg, mask); in nrfy_pwm_int_enable()
281 NRFY_STATIC_INLINE void nrfy_pwm_int_disable(NRF_PWM_Type * p_reg, in nrfy_pwm_int_disable() argument
284 nrf_pwm_int_disable(p_reg, mask); in nrfy_pwm_int_disable()
289 NRFY_STATIC_INLINE void nrfy_pwm_int_set(NRF_PWM_Type * p_reg, in nrfy_pwm_int_set() argument
292 nrf_pwm_int_set(p_reg, mask); in nrfy_pwm_int_set()
297 NRFY_STATIC_INLINE uint32_t nrfy_pwm_int_enable_check(NRF_PWM_Type const * p_reg, uint32_t mask) in nrfy_pwm_int_enable_check() argument
300 uint32_t ret = nrf_pwm_int_enable_check(p_reg, mask); in nrfy_pwm_int_enable_check()
307 NRFY_STATIC_INLINE void nrfy_pwm_subscribe_set(NRF_PWM_Type * p_reg, in nrfy_pwm_subscribe_set() argument
311 nrf_pwm_subscribe_set(p_reg, task, channel); in nrfy_pwm_subscribe_set()
316 NRFY_STATIC_INLINE void nrfy_pwm_subscribe_clear(NRF_PWM_Type * p_reg, in nrfy_pwm_subscribe_clear() argument
319 nrf_pwm_subscribe_clear(p_reg, task); in nrfy_pwm_subscribe_clear()
324 NRFY_STATIC_INLINE void nrfy_pwm_publish_set(NRF_PWM_Type * p_reg, in nrfy_pwm_publish_set() argument
328 nrf_pwm_publish_set(p_reg, event, channel); in nrfy_pwm_publish_set()
333 NRFY_STATIC_INLINE void nrfy_pwm_publish_clear(NRF_PWM_Type * p_reg, in nrfy_pwm_publish_clear() argument
336 nrf_pwm_publish_clear(p_reg, event); in nrfy_pwm_publish_clear()
342 NRFY_STATIC_INLINE void nrfy_pwm_enable(NRF_PWM_Type * p_reg) in nrfy_pwm_enable() argument
344 nrf_pwm_enable(p_reg); in nrfy_pwm_enable()
349 NRFY_STATIC_INLINE void nrfy_pwm_disable(NRF_PWM_Type * p_reg) in nrfy_pwm_disable() argument
351 nrf_pwm_disable(p_reg); in nrfy_pwm_disable()
356 NRFY_STATIC_INLINE bool nrfy_pwm_enable_check(NRF_PWM_Type * p_reg) in nrfy_pwm_enable_check() argument
359 bool enabled = nrf_pwm_enable_check(p_reg); in nrfy_pwm_enable_check()
365 NRFY_STATIC_INLINE void nrfy_pwm_pins_set(NRF_PWM_Type * p_reg, in nrfy_pwm_pins_set() argument
368 nrf_pwm_pins_set(p_reg, out_pins); in nrfy_pwm_pins_set()
373 NRFY_STATIC_INLINE uint32_t nrfy_pwm_pin_get(NRF_PWM_Type const * p_reg, uint8_t channel) in nrfy_pwm_pin_get() argument
376 uint32_t ret = nrf_pwm_pin_get(p_reg, channel); in nrfy_pwm_pin_get()
382 NRFY_STATIC_INLINE void nrfy_pwm_configure(NRF_PWM_Type * p_reg, in nrfy_pwm_configure() argument
387 nrf_pwm_configure(p_reg, base_clock, mode, top_value); in nrfy_pwm_configure()
392 NRFY_STATIC_INLINE void nrfy_pwm_sequence_set(NRF_PWM_Type * p_reg, in nrfy_pwm_sequence_set() argument
397 nrf_pwm_sequence_set(p_reg, seq_id, p_seq); in nrfy_pwm_sequence_set()
402 NRFY_STATIC_INLINE void nrfy_pwm_decoder_set(NRF_PWM_Type * p_reg, in nrfy_pwm_decoder_set() argument
406 nrf_pwm_decoder_set(p_reg, dec_load, dec_step); in nrfy_pwm_decoder_set()
411 NRFY_STATIC_INLINE void nrfy_pwm_loop_set(NRF_PWM_Type * p_reg, uint16_t loop_count) in nrfy_pwm_loop_set() argument
413 nrf_pwm_loop_set(p_reg, loop_count); in nrfy_pwm_loop_set()
431 NRFY_STATIC_INLINE void nrfy_pwm_channel_idle_set(NRF_PWM_Type * p_reg, in nrfy_pwm_channel_idle_set() argument
435 nrf_pwm_channel_idle_set(p_reg, channel, value); in nrfy_pwm_channel_idle_set()
440 NRFY_STATIC_INLINE bool nrfy_pwm_channel_idle_get(NRF_PWM_Type const * p_reg, in nrfy_pwm_channel_idle_get() argument
443 return nrf_pwm_channel_idle_get(p_reg, channel); in nrfy_pwm_channel_idle_get()
449 NRFY_STATIC_INLINE bool __nrfy_internal_pwm_event_handle(NRF_PWM_Type * p_reg, in __nrfy_internal_pwm_event_handle() argument
454 if ((mask & NRFY_EVENT_TO_INT_BITMASK(event)) && nrf_pwm_event_check(p_reg, event)) in __nrfy_internal_pwm_event_handle()
457 nrf_pwm_event_clear(p_reg, event); in __nrfy_internal_pwm_event_handle()
467 NRFY_STATIC_INLINE uint32_t __nrfy_internal_pwm_events_process(NRF_PWM_Type * p_reg, uint32_t mask) in __nrfy_internal_pwm_events_process() argument
471 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_SEQEND0, &evt_mask); in __nrfy_internal_pwm_events_process()
472 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_SEQEND1, &evt_mask); in __nrfy_internal_pwm_events_process()
473 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_LOOPSDONE, &evt_mask); in __nrfy_internal_pwm_events_process()
474 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_STOPPED, &evt_mask); in __nrfy_internal_pwm_events_process()
475 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_SEQSTARTED0, &evt_mask); in __nrfy_internal_pwm_events_process()
476 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_SEQSTARTED1, &evt_mask); in __nrfy_internal_pwm_events_process()
477 (void)__nrfy_internal_pwm_event_handle(p_reg, mask, NRF_PWM_EVENT_PWMPERIODEND, &evt_mask); in __nrfy_internal_pwm_events_process()
482 NRFY_STATIC_INLINE void __nrfy_internal_pwm_event_enabled_clear(NRF_PWM_Type * p_reg, in __nrfy_internal_pwm_event_enabled_clear() argument
488 nrf_pwm_event_clear(p_reg, event); in __nrfy_internal_pwm_event_enabled_clear()