Lines Matching refs:p_reg
44 NRFY_STATIC_INLINE void __nrfy_internal_lpcomp_event_enabled_clear(NRF_LPCOMP_Type * p_reg,
48 NRFY_STATIC_INLINE bool __nrfy_internal_lpcomp_event_handle(NRF_LPCOMP_Type * p_reg,
53 NRFY_STATIC_INLINE uint32_t __nrfy_internal_lpcomp_events_process(NRF_LPCOMP_Type * p_reg,
82 NRFY_STATIC_INLINE void nrfy_lpcomp_periph_configure(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_periph_configure() argument
85 nrf_lpcomp_ref_set(p_reg, p_config->reference); in nrfy_lpcomp_periph_configure()
88 nrf_lpcomp_ext_ref_set(p_reg, p_config->ext_ref); in nrfy_lpcomp_periph_configure()
90 nrf_lpcomp_detection_set(p_reg, p_config->detection); in nrfy_lpcomp_periph_configure()
92 nrf_lpcomp_hysteresis_set(p_reg, p_config->hyst); in nrfy_lpcomp_periph_configure()
95 nrf_lpcomp_input_select(p_reg, p_config->input); in nrfy_lpcomp_periph_configure()
107 NRFY_STATIC_INLINE void nrfy_lpcomp_int_init(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_int_init() argument
112 __nrfy_internal_lpcomp_event_enabled_clear(p_reg, mask, NRF_LPCOMP_EVENT_READY); in nrfy_lpcomp_int_init()
113 __nrfy_internal_lpcomp_event_enabled_clear(p_reg, mask, NRF_LPCOMP_EVENT_DOWN); in nrfy_lpcomp_int_init()
114 __nrfy_internal_lpcomp_event_enabled_clear(p_reg, mask, NRF_LPCOMP_EVENT_UP); in nrfy_lpcomp_int_init()
115 __nrfy_internal_lpcomp_event_enabled_clear(p_reg, mask, NRF_LPCOMP_EVENT_CROSS); in nrfy_lpcomp_int_init()
118 NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(p_reg), irq_priority); in nrfy_lpcomp_int_init()
119 NRFX_IRQ_ENABLE(nrfx_get_irq_number(p_reg)); in nrfy_lpcomp_int_init()
122 nrf_lpcomp_int_enable(p_reg, mask); in nrfy_lpcomp_int_init()
132 NRFY_STATIC_INLINE void nrfy_lpcomp_int_uninit(NRF_LPCOMP_Type * p_reg) in nrfy_lpcomp_int_uninit() argument
134 NRFX_IRQ_DISABLE(nrfx_get_irq_number(p_reg)); in nrfy_lpcomp_int_uninit()
147 NRFY_STATIC_INLINE uint32_t nrfy_lpcomp_events_process(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_events_process() argument
150 uint32_t evt_mask = __nrfy_internal_lpcomp_events_process(p_reg, mask); in nrfy_lpcomp_events_process()
163 NRFY_STATIC_INLINE uint32_t nrfy_lpcomp_sample(NRF_LPCOMP_Type * p_reg) in nrfy_lpcomp_sample() argument
165 nrf_lpcomp_task_trigger(p_reg, NRF_LPCOMP_TASK_SAMPLE); in nrfy_lpcomp_sample()
167 uint32_t sample = nrf_lpcomp_result_get(p_reg); in nrfy_lpcomp_sample()
180 NRFY_STATIC_INLINE bool nrfy_lpcomp_sample_check(NRF_LPCOMP_Type * p_reg) in nrfy_lpcomp_sample_check() argument
182 return (bool)nrfy_lpcomp_sample(p_reg); in nrfy_lpcomp_sample_check()
186 NRFY_STATIC_INLINE void nrfy_lpcomp_ref_set(NRF_LPCOMP_Type * p_reg, nrf_lpcomp_ref_t reference) in nrfy_lpcomp_ref_set() argument
188 nrf_lpcomp_ref_set(p_reg, reference); in nrfy_lpcomp_ref_set()
193 NRFY_STATIC_INLINE void nrfy_lpcomp_ext_ref_set(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_ext_ref_set() argument
196 nrf_lpcomp_ext_ref_set(p_reg, ext_ref); in nrfy_lpcomp_ext_ref_set()
201 NRFY_STATIC_INLINE void nrfy_lpcomp_detection_set(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_detection_set() argument
204 nrf_lpcomp_detection_set(p_reg, detection); in nrfy_lpcomp_detection_set()
210 NRFY_STATIC_INLINE void nrfy_lpcomp_hysteresis_set(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_hysteresis_set() argument
213 nrf_lpcomp_hysteresis_set(p_reg, hyst); in nrfy_lpcomp_hysteresis_set()
219 NRFY_STATIC_INLINE void nrfy_lpcomp_configure(NRF_LPCOMP_Type * p_reg, in nrfy_lpcomp_configure() argument
222 nrf_lpcomp_configure(p_reg, p_config); in nrfy_lpcomp_configure()
227 NRFY_STATIC_INLINE void nrfy_lpcomp_input_select(NRF_LPCOMP_Type * p_reg, nrf_lpcomp_input_t input) in nrfy_lpcomp_input_select() argument
229 nrf_lpcomp_input_select(p_reg, input); in nrfy_lpcomp_input_select()
234 NRFY_STATIC_INLINE void nrfy_lpcomp_enable(NRF_LPCOMP_Type * p_reg) in nrfy_lpcomp_enable() argument
236 nrf_lpcomp_enable(p_reg); in nrfy_lpcomp_enable()
241 NRFY_STATIC_INLINE void nrfy_lpcomp_disable(NRF_LPCOMP_Type * p_reg) in nrfy_lpcomp_disable() argument
243 nrf_lpcomp_disable(p_reg); in nrfy_lpcomp_disable()
248 NRFY_STATIC_INLINE uint32_t nrfy_lpcomp_result_get(NRF_LPCOMP_Type const * p_reg) in nrfy_lpcomp_result_get() argument
251 uint32_t result = nrf_lpcomp_result_get(p_reg); in nrfy_lpcomp_result_get()
257 NRFY_STATIC_INLINE void nrfy_lpcomp_int_enable(NRF_LPCOMP_Type * p_reg, uint32_t mask) in nrfy_lpcomp_int_enable() argument
259 nrf_lpcomp_int_enable(p_reg, mask); in nrfy_lpcomp_int_enable()
264 NRFY_STATIC_INLINE void nrfy_lpcomp_int_disable(NRF_LPCOMP_Type * p_reg, uint32_t mask) in nrfy_lpcomp_int_disable() argument
266 nrf_lpcomp_int_disable(p_reg, mask); in nrfy_lpcomp_int_disable()
271 NRFY_STATIC_INLINE uint32_t nrfy_lpcomp_int_enable_check(NRF_LPCOMP_Type const * p_reg, in nrfy_lpcomp_int_enable_check() argument
275 uint32_t check = nrf_lpcomp_int_enable_check(p_reg, mask); in nrfy_lpcomp_int_enable_check()
281 NRFY_STATIC_INLINE uint32_t nrfy_lpcomp_task_address_get(NRF_LPCOMP_Type const * p_reg, in nrfy_lpcomp_task_address_get() argument
284 return nrf_lpcomp_task_address_get(p_reg, task); in nrfy_lpcomp_task_address_get()
288 NRFY_STATIC_INLINE uint32_t nrfy_lpcomp_event_address_get(NRF_LPCOMP_Type const * p_reg, in nrfy_lpcomp_event_address_get() argument
291 return nrf_lpcomp_event_address_get(p_reg, event); in nrfy_lpcomp_event_address_get()
295 NRFY_STATIC_INLINE void nrfy_lpcomp_shorts_enable(NRF_LPCOMP_Type * p_reg, uint32_t mask) in nrfy_lpcomp_shorts_enable() argument
297 nrf_lpcomp_shorts_enable(p_reg, mask); in nrfy_lpcomp_shorts_enable()
302 NRFY_STATIC_INLINE void nrfy_lpcomp_shorts_disable(NRF_LPCOMP_Type * p_reg, uint32_t mask) in nrfy_lpcomp_shorts_disable() argument
304 nrf_lpcomp_shorts_disable(p_reg, mask); in nrfy_lpcomp_shorts_disable()
309 NRFY_STATIC_INLINE void nrfy_lpcomp_task_trigger(NRF_LPCOMP_Type * p_reg, nrf_lpcomp_task_t task) in nrfy_lpcomp_task_trigger() argument
311 nrf_lpcomp_task_trigger(p_reg, task); in nrfy_lpcomp_task_trigger()
316 NRFY_STATIC_INLINE void nrfy_lpcomp_event_clear(NRF_LPCOMP_Type * p_reg, nrf_lpcomp_event_t event) in nrfy_lpcomp_event_clear() argument
318 nrf_lpcomp_event_clear(p_reg, event); in nrfy_lpcomp_event_clear()
323 NRFY_STATIC_INLINE bool nrfy_lpcomp_event_check(NRF_LPCOMP_Type const * p_reg, in nrfy_lpcomp_event_check() argument
327 bool check = nrf_lpcomp_event_check(p_reg, event); in nrfy_lpcomp_event_check()
334 NRFY_STATIC_INLINE void __nrfy_internal_lpcomp_event_enabled_clear(NRF_LPCOMP_Type * p_reg, in __nrfy_internal_lpcomp_event_enabled_clear() argument
340 nrf_lpcomp_event_clear(p_reg, event); in __nrfy_internal_lpcomp_event_enabled_clear()
344 NRFY_STATIC_INLINE bool __nrfy_internal_lpcomp_event_handle(NRF_LPCOMP_Type * p_reg, in __nrfy_internal_lpcomp_event_handle() argument
349 if ((mask & NRFY_EVENT_TO_INT_BITMASK(event)) && nrf_lpcomp_event_check(p_reg, event)) in __nrfy_internal_lpcomp_event_handle()
351 nrf_lpcomp_event_clear(p_reg, event); in __nrfy_internal_lpcomp_event_handle()
361 NRFY_STATIC_INLINE uint32_t __nrfy_internal_lpcomp_events_process(NRF_LPCOMP_Type * p_reg, in __nrfy_internal_lpcomp_events_process() argument
366 (void)__nrfy_internal_lpcomp_event_handle(p_reg, in __nrfy_internal_lpcomp_events_process()
370 (void)__nrfy_internal_lpcomp_event_handle(p_reg, in __nrfy_internal_lpcomp_events_process()
374 (void)__nrfy_internal_lpcomp_event_handle(p_reg, in __nrfy_internal_lpcomp_events_process()
378 (void)__nrfy_internal_lpcomp_event_handle(p_reg, in __nrfy_internal_lpcomp_events_process()