Lines Matching refs:p_reg
53 NRFY_STATIC_INLINE void __nrfy_internal_uarte_event_enabled_clear(NRF_UARTE_Type * p_reg,
57 NRFY_STATIC_INLINE bool __nrfy_internal_uarte_event_handle(NRF_UARTE_Type * p_reg,
63 uint32_t __nrfy_internal_uarte_events_process(NRF_UARTE_Type * p_reg,
113 NRFY_STATIC_INLINE void nrfy_uarte_periph_configure(NRF_UARTE_Type * p_reg, in nrfy_uarte_periph_configure() argument
116 nrf_uarte_baudrate_set(p_reg, p_config->baudrate); in nrfy_uarte_periph_configure()
117 nrf_uarte_configure(p_reg, &p_config->config); in nrfy_uarte_periph_configure()
120 nrf_uarte_txrx_pins_set(p_reg, p_config->pins.txd_pin, p_config->pins.rxd_pin); in nrfy_uarte_periph_configure()
125 nrf_uarte_hwfc_pins_set(p_reg, p_config->pins.rts_pin, p_config->pins.cts_pin); in nrfy_uarte_periph_configure()
138 NRFY_STATIC_INLINE void nrfy_uarte_int_init(NRF_UARTE_Type * p_reg, in nrfy_uarte_int_init() argument
143 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_CTS); in nrfy_uarte_int_init()
144 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_NCTS); in nrfy_uarte_int_init()
145 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_RXDRDY); in nrfy_uarte_int_init()
146 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_ENDRX); in nrfy_uarte_int_init()
147 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_TXDRDY); in nrfy_uarte_int_init()
148 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_ENDTX); in nrfy_uarte_int_init()
149 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_ERROR); in nrfy_uarte_int_init()
150 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_RXTO); in nrfy_uarte_int_init()
151 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_RXSTARTED); in nrfy_uarte_int_init()
152 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_TXSTARTED); in nrfy_uarte_int_init()
153 __nrfy_internal_uarte_event_enabled_clear(p_reg, mask, NRF_UARTE_EVENT_TXSTOPPED); in nrfy_uarte_int_init()
156 NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(p_reg), irq_priority); in nrfy_uarte_int_init()
157 NRFX_IRQ_ENABLE(nrfx_get_irq_number(p_reg)); in nrfy_uarte_int_init()
160 nrf_uarte_int_enable(p_reg, mask); in nrfy_uarte_int_init()
170 NRFY_STATIC_INLINE void nrfy_uarte_int_uninit(NRF_UARTE_Type * p_reg) in nrfy_uarte_int_uninit() argument
172 NRFX_IRQ_DISABLE(nrfx_get_irq_number(p_reg)); in nrfy_uarte_int_uninit()
187 NRFY_STATIC_INLINE uint32_t nrfy_uarte_events_process(NRF_UARTE_Type * p_reg, in nrfy_uarte_events_process() argument
191 uint32_t evt_mask = __nrfy_internal_uarte_events_process(p_reg, mask, p_xfer); in nrfy_uarte_events_process()
202 NRFY_STATIC_INLINE void nrfy_uarte_tx_abort(NRF_UARTE_Type * p_reg, in nrfy_uarte_tx_abort() argument
205 nrf_uarte_event_clear(p_reg, NRF_UARTE_EVENT_TXSTOPPED); in nrfy_uarte_tx_abort()
207 nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STOPTX); in nrfy_uarte_tx_abort()
211 while (!nrf_uarte_event_check(p_reg, NRF_UARTE_EVENT_TXSTOPPED)) in nrfy_uarte_tx_abort()
223 NRFY_STATIC_INLINE void nrfy_uarte_stop(NRF_UARTE_Type * p_reg, in nrfy_uarte_stop() argument
226 nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STOPTX); in nrfy_uarte_stop()
228 while (!__nrfy_internal_uarte_events_process(p_reg, in nrfy_uarte_stop()
234 nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STOPRX); in nrfy_uarte_stop()
236 while (!__nrfy_internal_uarte_events_process(p_reg, in nrfy_uarte_stop()
252 NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_start(NRF_UARTE_Type * p_reg, in nrfy_uarte_tx_start() argument
256 nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STARTTX); in nrfy_uarte_tx_start()
263 evt_mask = nrfy_uarte_events_process(p_reg, mask, NULL); in nrfy_uarte_tx_start()
280 NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_start(NRF_UARTE_Type * p_reg, in nrfy_uarte_rx_start() argument
284 nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STARTRX); in nrfy_uarte_rx_start()
292 evt_mask = nrfy_uarte_events_process(p_reg, mask, p_xfer); in nrfy_uarte_rx_start()
305 NRFY_STATIC_INLINE void nrfy_uarte_pins_get(NRF_UARTE_Type const * p_reg, in nrfy_uarte_pins_get() argument
309 p_pins->txd_pin = nrf_uarte_tx_pin_get(p_reg); in nrfy_uarte_pins_get()
310 p_pins->rxd_pin = nrf_uarte_rx_pin_get(p_reg); in nrfy_uarte_pins_get()
311 p_pins->rts_pin = nrf_uarte_rts_pin_get(p_reg); in nrfy_uarte_pins_get()
312 p_pins->cts_pin = nrf_uarte_cts_pin_get(p_reg); in nrfy_uarte_pins_get()
321 NRFY_STATIC_INLINE void nrfy_uarte_pins_disconnect(NRF_UARTE_Type * p_reg) in nrfy_uarte_pins_disconnect() argument
323 nrf_uarte_txrx_pins_disconnect(p_reg); in nrfy_uarte_pins_disconnect()
324 nrf_uarte_hwfc_pins_disconnect(p_reg); in nrfy_uarte_pins_disconnect()
329 NRFY_STATIC_INLINE void nrfy_uarte_event_clear(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event) in nrfy_uarte_event_clear() argument
331 nrf_uarte_event_clear(p_reg, event); in nrfy_uarte_event_clear()
336 NRFY_STATIC_INLINE bool nrfy_uarte_event_check(NRF_UARTE_Type const * p_reg, in nrfy_uarte_event_check() argument
340 bool check = nrf_uarte_event_check(p_reg, event); in nrfy_uarte_event_check()
346 NRFY_STATIC_INLINE uint32_t nrfy_uarte_event_address_get(NRF_UARTE_Type const * p_reg, in nrfy_uarte_event_address_get() argument
349 return nrf_uarte_event_address_get(p_reg, event); in nrfy_uarte_event_address_get()
353 NRFY_STATIC_INLINE void nrfy_uarte_shorts_set(NRF_UARTE_Type * p_reg, uint32_t mask) in nrfy_uarte_shorts_set() argument
355 nrf_uarte_shorts_set(p_reg, mask); in nrfy_uarte_shorts_set()
360 NRFY_STATIC_INLINE uint32_t nrfy_uarte_shorts_get(NRF_UARTE_Type * p_reg, uint32_t mask) in nrfy_uarte_shorts_get() argument
363 uint32_t ret = nrf_uarte_shorts_get(p_reg, mask); in nrfy_uarte_shorts_get()
370 NRFY_STATIC_INLINE void nrfy_uarte_shorts_enable(NRF_UARTE_Type * p_reg, uint32_t mask) in nrfy_uarte_shorts_enable() argument
372 nrf_uarte_shorts_enable(p_reg, mask); in nrfy_uarte_shorts_enable()
377 NRFY_STATIC_INLINE void nrfy_uarte_shorts_disable(NRF_UARTE_Type * p_reg, uint32_t mask) in nrfy_uarte_shorts_disable() argument
379 nrf_uarte_shorts_disable(p_reg, mask); in nrfy_uarte_shorts_disable()
384 NRFY_STATIC_INLINE void nrfy_uarte_int_enable(NRF_UARTE_Type * p_reg, uint32_t mask) in nrfy_uarte_int_enable() argument
386 nrf_uarte_int_enable(p_reg, mask); in nrfy_uarte_int_enable()
391 NRFY_STATIC_INLINE uint32_t nrfy_uarte_int_enable_check(NRF_UARTE_Type const * p_reg, in nrfy_uarte_int_enable_check() argument
395 uint32_t check = nrf_uarte_int_enable_check(p_reg, mask); in nrfy_uarte_int_enable_check()
401 NRFY_STATIC_INLINE void nrfy_uarte_int_disable(NRF_UARTE_Type * p_reg, uint32_t mask) in nrfy_uarte_int_disable() argument
403 nrf_uarte_int_disable(p_reg, mask); in nrfy_uarte_int_disable()
409 NRFY_STATIC_INLINE void nrfy_uarte_subscribe_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_subscribe_set() argument
413 nrf_uarte_subscribe_set(p_reg, task, channel); in nrfy_uarte_subscribe_set()
418 NRFY_STATIC_INLINE void nrfy_uarte_subscribe_clear(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task) in nrfy_uarte_subscribe_clear() argument
420 nrf_uarte_subscribe_clear(p_reg, task); in nrfy_uarte_subscribe_clear()
425 NRFY_STATIC_INLINE void nrfy_uarte_publish_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_publish_set() argument
429 nrf_uarte_publish_set(p_reg, event, channel); in nrfy_uarte_publish_set()
434 NRFY_STATIC_INLINE void nrfy_uarte_publish_clear(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event) in nrfy_uarte_publish_clear() argument
436 nrf_uarte_publish_clear(p_reg, event); in nrfy_uarte_publish_clear()
442 NRFY_STATIC_INLINE uint32_t nrfy_uarte_errorsrc_get_and_clear(NRF_UARTE_Type * p_reg) in nrfy_uarte_errorsrc_get_and_clear() argument
445 uint32_t errorsrc = nrf_uarte_errorsrc_get(p_reg); in nrfy_uarte_errorsrc_get_and_clear()
447 nrf_uarte_errorsrc_clear(p_reg, errorsrc); in nrfy_uarte_errorsrc_get_and_clear()
453 NRFY_STATIC_INLINE void nrfy_uarte_enable(NRF_UARTE_Type * p_reg) in nrfy_uarte_enable() argument
455 nrf_uarte_enable(p_reg); in nrfy_uarte_enable()
460 NRFY_STATIC_INLINE void nrfy_uarte_disable(NRF_UARTE_Type * p_reg) in nrfy_uarte_disable() argument
462 nrf_uarte_disable(p_reg); in nrfy_uarte_disable()
467 NRFY_STATIC_INLINE bool nrfy_uarte_enable_check(NRF_UARTE_Type * p_reg) in nrfy_uarte_enable_check() argument
470 bool ret = nrf_uarte_enable_check(p_reg); in nrfy_uarte_enable_check()
476 NRFY_STATIC_INLINE void nrfy_uarte_txrx_pins_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_txrx_pins_set() argument
480 nrf_uarte_txrx_pins_set(p_reg, pseltxd, pselrxd); in nrfy_uarte_txrx_pins_set()
485 NRFY_STATIC_INLINE void nrfy_uarte_txrx_pins_disconnect(NRF_UARTE_Type * p_reg) in nrfy_uarte_txrx_pins_disconnect() argument
487 nrf_uarte_txrx_pins_disconnect(p_reg); in nrfy_uarte_txrx_pins_disconnect()
492 NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_pin_get(NRF_UARTE_Type const * p_reg) in nrfy_uarte_tx_pin_get() argument
495 uint32_t pin = nrf_uarte_tx_pin_get(p_reg); in nrfy_uarte_tx_pin_get()
501 NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_pin_get(NRF_UARTE_Type const * p_reg) in nrfy_uarte_rx_pin_get() argument
504 uint32_t pin = nrf_uarte_rx_pin_get(p_reg); in nrfy_uarte_rx_pin_get()
510 NRFY_STATIC_INLINE uint32_t nrfy_uarte_rts_pin_get(NRF_UARTE_Type const * p_reg) in nrfy_uarte_rts_pin_get() argument
513 uint32_t pin = nrf_uarte_rts_pin_get(p_reg); in nrfy_uarte_rts_pin_get()
519 NRFY_STATIC_INLINE uint32_t nrfy_uarte_cts_pin_get(NRF_UARTE_Type const * p_reg) in nrfy_uarte_cts_pin_get() argument
522 uint32_t pin = nrf_uarte_cts_pin_get(p_reg); in nrfy_uarte_cts_pin_get()
528 NRFY_STATIC_INLINE void nrfy_uarte_hwfc_pins_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_hwfc_pins_set() argument
532 nrf_uarte_hwfc_pins_set(p_reg, pselrts, pselcts); in nrfy_uarte_hwfc_pins_set()
537 NRFY_STATIC_INLINE void nrfy_uarte_hwfc_pins_disconnect(NRF_UARTE_Type * p_reg) in nrfy_uarte_hwfc_pins_disconnect() argument
539 nrf_uarte_hwfc_pins_disconnect(p_reg); in nrfy_uarte_hwfc_pins_disconnect()
544 NRFY_STATIC_INLINE void nrfy_uarte_task_trigger(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task) in nrfy_uarte_task_trigger() argument
546 nrf_uarte_task_trigger(p_reg, task); in nrfy_uarte_task_trigger()
551 NRFY_STATIC_INLINE uint32_t nrfy_uarte_task_address_get(NRF_UARTE_Type const * p_reg, in nrfy_uarte_task_address_get() argument
554 return nrf_uarte_task_address_get(p_reg, task); in nrfy_uarte_task_address_get()
558 NRFY_STATIC_INLINE void nrfy_uarte_configure(NRF_UARTE_Type * p_reg, in nrfy_uarte_configure() argument
561 nrf_uarte_configure(p_reg, p_cfg); in nrfy_uarte_configure()
566 NRFY_STATIC_INLINE void nrfy_uarte_baudrate_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_baudrate_set() argument
569 nrf_uarte_baudrate_set(p_reg, baudrate); in nrfy_uarte_baudrate_set()
574 NRFY_STATIC_INLINE void nrfy_uarte_tx_buffer_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_tx_buffer_set() argument
581 nrf_uarte_tx_buffer_set(p_reg, p_buffer, length); in nrfy_uarte_tx_buffer_set()
587 NRFY_STATIC_INLINE uint8_t const * nrfy_uarte_tx_buffer_get(NRF_UARTE_Type * p_reg) in nrfy_uarte_tx_buffer_get() argument
590 uint8_t const * ptr = nrf_uarte_tx_buffer_get(p_reg); in nrfy_uarte_tx_buffer_get()
596 NRFY_STATIC_INLINE uint32_t nrfy_uarte_tx_amount_get(NRF_UARTE_Type const * p_reg) in nrfy_uarte_tx_amount_get() argument
599 uint32_t amount = nrf_uarte_tx_amount_get(p_reg); in nrfy_uarte_tx_amount_get()
605 NRFY_STATIC_INLINE void nrfy_uarte_rx_buffer_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_rx_buffer_set() argument
609 nrf_uarte_rx_buffer_set(p_reg, p_buffer, length); in nrfy_uarte_rx_buffer_set()
614 NRFY_STATIC_INLINE uint32_t nrfy_uarte_rx_amount_get(NRF_UARTE_Type const * p_reg) in nrfy_uarte_rx_amount_get() argument
617 uint32_t amount = nrf_uarte_rx_amount_get(p_reg); in nrfy_uarte_rx_amount_get()
624 NRFY_STATIC_INLINE void nrfy_uarte_frame_timeout_set(NRF_UARTE_Type * p_reg, in nrfy_uarte_frame_timeout_set() argument
628 nrf_uarte_frame_timeout_set(p_reg, timeout); in nrfy_uarte_frame_timeout_set()
634 NRFY_STATIC_INLINE void __nrfy_internal_uarte_event_enabled_clear(NRF_UARTE_Type * p_reg, in __nrfy_internal_uarte_event_enabled_clear() argument
640 nrf_uarte_event_clear(p_reg, event); in __nrfy_internal_uarte_event_enabled_clear()
644 NRFY_STATIC_INLINE bool __nrfy_internal_uarte_event_handle(NRF_UARTE_Type * p_reg, in __nrfy_internal_uarte_event_handle() argument
649 if ((mask & NRFY_EVENT_TO_INT_BITMASK(event)) && nrf_uarte_event_check(p_reg, event)) in __nrfy_internal_uarte_event_handle()
651 nrf_uarte_event_clear(p_reg, event); in __nrfy_internal_uarte_event_handle()
662 uint32_t __nrfy_internal_uarte_events_process(NRF_UARTE_Type * p_reg, in __nrfy_internal_uarte_events_process() argument
669 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_CTS, &evt_mask); in __nrfy_internal_uarte_events_process()
670 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_NCTS, &evt_mask); in __nrfy_internal_uarte_events_process()
671 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_RXDRDY, &evt_mask); in __nrfy_internal_uarte_events_process()
672 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_ENDRX, &evt_mask); in __nrfy_internal_uarte_events_process()
673 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_TXDRDY, &evt_mask); in __nrfy_internal_uarte_events_process()
674 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_ENDTX, &evt_mask); in __nrfy_internal_uarte_events_process()
675 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_ERROR, &evt_mask); in __nrfy_internal_uarte_events_process()
676 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_RXTO, &evt_mask); in __nrfy_internal_uarte_events_process()
677 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_RXSTARTED, &evt_mask); in __nrfy_internal_uarte_events_process()
678 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_TXSTARTED, &evt_mask); in __nrfy_internal_uarte_events_process()
679 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_TXSTOPPED, &evt_mask); in __nrfy_internal_uarte_events_process()
681 (void)__nrfy_internal_uarte_event_handle(p_reg, mask, NRF_UARTE_EVENT_FRAME_TIMEOUT, &evt_mask); in __nrfy_internal_uarte_events_process()
690 size_t size = nrf_uarte_rx_amount_get(p_reg); in __nrfy_internal_uarte_events_process()