Lines Matching refs:p_reg
44 NRFY_STATIC_INLINE void __nrfy_internal_comp_event_enabled_clear(NRF_COMP_Type * p_reg,
48 NRFY_STATIC_INLINE bool __nrfy_internal_comp_event_handle(NRF_COMP_Type * p_reg,
53 NRFY_STATIC_INLINE uint32_t __nrfy_internal_comp_events_process(NRF_COMP_Type * p_reg,
91 NRFY_STATIC_INLINE void nrfy_comp_periph_configure(NRF_COMP_Type * p_reg, in nrfy_comp_periph_configure() argument
94 nrf_comp_ref_set(p_reg, p_config->reference); in nrfy_comp_periph_configure()
97 nrf_comp_ext_ref_set(p_reg, p_config->ext_ref); in nrfy_comp_periph_configure()
99 nrf_comp_th_set(p_reg, p_config->threshold); in nrfy_comp_periph_configure()
100 nrf_comp_main_mode_set(p_reg, p_config->main_mode); in nrfy_comp_periph_configure()
101 nrf_comp_speed_mode_set(p_reg, p_config->speed_mode); in nrfy_comp_periph_configure()
102 nrf_comp_hysteresis_set(p_reg, p_config->hyst); in nrfy_comp_periph_configure()
104 nrf_comp_isource_set(p_reg, p_config->isource); in nrfy_comp_periph_configure()
106 nrf_comp_input_select(p_reg, p_config->input); in nrfy_comp_periph_configure()
118 NRFY_STATIC_INLINE void nrfy_comp_int_init(NRF_COMP_Type * p_reg, in nrfy_comp_int_init() argument
124 __nrfy_internal_comp_event_enabled_clear(p_reg, mask, NRF_COMP_EVENT_READY); in nrfy_comp_int_init()
125 __nrfy_internal_comp_event_enabled_clear(p_reg, mask, NRF_COMP_EVENT_DOWN); in nrfy_comp_int_init()
126 __nrfy_internal_comp_event_enabled_clear(p_reg, mask, NRF_COMP_EVENT_UP); in nrfy_comp_int_init()
127 __nrfy_internal_comp_event_enabled_clear(p_reg, mask, NRF_COMP_EVENT_CROSS); in nrfy_comp_int_init()
130 NRFY_IRQ_PRIORITY_SET(nrfx_get_irq_number(p_reg), irq_priority); in nrfy_comp_int_init()
131 NRFY_IRQ_ENABLE(nrfx_get_irq_number(p_reg)); in nrfy_comp_int_init()
134 nrf_comp_int_enable(p_reg, mask); in nrfy_comp_int_init()
144 NRFY_STATIC_INLINE void nrfy_comp_int_uninit(NRF_COMP_Type * p_reg) in nrfy_comp_int_uninit() argument
146 NRFY_IRQ_DISABLE(nrfx_get_irq_number(p_reg)); in nrfy_comp_int_uninit()
159 NRFY_STATIC_INLINE uint32_t nrfy_comp_events_process(NRF_COMP_Type * p_reg, in nrfy_comp_events_process() argument
162 uint32_t evt_mask = __nrfy_internal_comp_events_process(p_reg, mask); in nrfy_comp_events_process()
175 NRFY_STATIC_INLINE uint32_t nrfy_comp_sample(NRF_COMP_Type * p_reg) in nrfy_comp_sample() argument
177 nrf_comp_task_trigger(p_reg, NRF_COMP_TASK_SAMPLE); in nrfy_comp_sample()
179 uint32_t sample = nrf_comp_result_get(p_reg); in nrfy_comp_sample()
185 NRFY_STATIC_INLINE void nrfy_comp_enable(NRF_COMP_Type * p_reg) in nrfy_comp_enable() argument
187 nrf_comp_enable(p_reg); in nrfy_comp_enable()
192 NRFY_STATIC_INLINE void nrfy_comp_disable(NRF_COMP_Type * p_reg) in nrfy_comp_disable() argument
194 nrf_comp_disable(p_reg); in nrfy_comp_disable()
199 NRFY_STATIC_INLINE bool nrfy_comp_enable_check(NRF_COMP_Type const * p_reg) in nrfy_comp_enable_check() argument
202 bool check = nrf_comp_enable_check(p_reg); in nrfy_comp_enable_check()
208 NRFY_STATIC_INLINE void nrfy_comp_ref_set(NRF_COMP_Type * p_reg, nrf_comp_ref_t reference) in nrfy_comp_ref_set() argument
210 nrf_comp_ref_set(p_reg, reference); in nrfy_comp_ref_set()
215 NRFY_STATIC_INLINE void nrfy_comp_ext_ref_set(NRF_COMP_Type * p_reg, nrf_comp_ext_ref_t ext_ref) in nrfy_comp_ext_ref_set() argument
217 nrf_comp_ext_ref_set(p_reg, ext_ref); in nrfy_comp_ext_ref_set()
222 NRFY_STATIC_INLINE void nrfy_comp_th_set(NRF_COMP_Type * p_reg, nrf_comp_th_t threshold) in nrfy_comp_th_set() argument
224 nrf_comp_th_set(p_reg, threshold); in nrfy_comp_th_set()
229 NRFY_STATIC_INLINE void nrfy_comp_main_mode_set(NRF_COMP_Type * p_reg, in nrfy_comp_main_mode_set() argument
232 nrf_comp_main_mode_set(p_reg, main_mode); in nrfy_comp_main_mode_set()
237 NRFY_STATIC_INLINE void nrfy_comp_speed_mode_set(NRF_COMP_Type * p_reg, in nrfy_comp_speed_mode_set() argument
240 nrf_comp_speed_mode_set(p_reg, speed_mode); in nrfy_comp_speed_mode_set()
245 NRFY_STATIC_INLINE void nrfy_comp_hysteresis_set(NRF_COMP_Type * p_reg, nrf_comp_hyst_t hyst) in nrfy_comp_hysteresis_set() argument
247 nrf_comp_hysteresis_set(p_reg, hyst); in nrfy_comp_hysteresis_set()
253 NRFY_STATIC_INLINE void nrfy_comp_isource_set(NRF_COMP_Type * p_reg, nrf_isource_t isource) in nrfy_comp_isource_set() argument
255 nrf_comp_isource_set(p_reg, isource); in nrfy_comp_isource_set()
261 NRFY_STATIC_INLINE void nrfy_comp_input_select(NRF_COMP_Type * p_reg, nrf_comp_input_t input) in nrfy_comp_input_select() argument
263 nrf_comp_input_select(p_reg, input); in nrfy_comp_input_select()
268 NRFY_STATIC_INLINE uint32_t nrfy_comp_result_get(NRF_COMP_Type const * p_reg) in nrfy_comp_result_get() argument
271 uint32_t result = nrf_comp_result_get(p_reg); in nrfy_comp_result_get()
277 NRFY_STATIC_INLINE void nrfy_comp_int_enable(NRF_COMP_Type * p_reg, uint32_t mask) in nrfy_comp_int_enable() argument
279 nrf_comp_int_enable(p_reg, mask); in nrfy_comp_int_enable()
284 NRFY_STATIC_INLINE void nrfy_comp_int_disable(NRF_COMP_Type * p_reg, uint32_t mask) in nrfy_comp_int_disable() argument
286 nrf_comp_int_disable(p_reg, mask); in nrfy_comp_int_disable()
291 NRFY_STATIC_INLINE uint32_t nrfy_comp_int_enable_check(NRF_COMP_Type const * p_reg, uint32_t mask) in nrfy_comp_int_enable_check() argument
294 uint32_t check = nrf_comp_int_enable_check(p_reg, mask); in nrfy_comp_int_enable_check()
300 NRFY_STATIC_INLINE uint32_t nrfy_comp_task_address_get(NRF_COMP_Type const * p_reg, in nrfy_comp_task_address_get() argument
303 return nrf_comp_task_address_get(p_reg, task); in nrfy_comp_task_address_get()
307 NRFY_STATIC_INLINE uint32_t nrfy_comp_event_address_get(NRF_COMP_Type const * p_reg, in nrfy_comp_event_address_get() argument
310 return nrf_comp_event_address_get(p_reg, event); in nrfy_comp_event_address_get()
314 NRFY_STATIC_INLINE void nrfy_comp_shorts_enable(NRF_COMP_Type * p_reg, uint32_t mask) in nrfy_comp_shorts_enable() argument
316 nrf_comp_shorts_enable(p_reg, mask); in nrfy_comp_shorts_enable()
321 NRFY_STATIC_INLINE void nrfy_comp_shorts_disable(NRF_COMP_Type * p_reg, uint32_t mask) in nrfy_comp_shorts_disable() argument
323 nrf_comp_shorts_disable(p_reg, mask); in nrfy_comp_shorts_disable()
328 NRFY_STATIC_INLINE void nrfy_comp_task_trigger(NRF_COMP_Type * p_reg, nrf_comp_task_t task) in nrfy_comp_task_trigger() argument
330 nrf_comp_task_trigger(p_reg, task); in nrfy_comp_task_trigger()
335 NRFY_STATIC_INLINE void nrfy_comp_event_clear(NRF_COMP_Type * p_reg, nrf_comp_event_t event) in nrfy_comp_event_clear() argument
337 nrf_comp_event_clear(p_reg, event); in nrfy_comp_event_clear()
342 NRFY_STATIC_INLINE bool nrfy_comp_event_check(NRF_COMP_Type const * p_reg, nrf_comp_event_t event) in nrfy_comp_event_check() argument
345 bool check = nrf_comp_event_check(p_reg, event); in nrfy_comp_event_check()
352 NRFY_STATIC_INLINE void __nrfy_internal_comp_event_enabled_clear(NRF_COMP_Type * p_reg, in __nrfy_internal_comp_event_enabled_clear() argument
358 nrf_comp_event_clear(p_reg, event); in __nrfy_internal_comp_event_enabled_clear()
362 NRFY_STATIC_INLINE bool __nrfy_internal_comp_event_handle(NRF_COMP_Type * p_reg, in __nrfy_internal_comp_event_handle() argument
367 if ((mask & NRFY_EVENT_TO_INT_BITMASK(event)) && nrf_comp_event_check(p_reg, event)) in __nrfy_internal_comp_event_handle()
369 nrf_comp_event_clear(p_reg, event); in __nrfy_internal_comp_event_handle()
379 NRFY_STATIC_INLINE uint32_t __nrfy_internal_comp_events_process(NRF_COMP_Type * p_reg, in __nrfy_internal_comp_events_process() argument
385 (void)__nrfy_internal_comp_event_handle(p_reg, in __nrfy_internal_comp_events_process()
389 (void)__nrfy_internal_comp_event_handle(p_reg, in __nrfy_internal_comp_events_process()
393 (void)__nrfy_internal_comp_event_handle(p_reg, in __nrfy_internal_comp_events_process()
397 (void)__nrfy_internal_comp_event_handle(p_reg, in __nrfy_internal_comp_events_process()