Lines Matching refs:p_reg
14 static int uart_number_from_ptr(NRF_UART_Type * p_reg){ in uart_number_from_ptr() argument
15 int i = ( (int)p_reg - (int)NRF_UARTE_regs ) / sizeof(NRF_UARTE_Type); in uart_number_from_ptr()
19 void nrf_uart_task_trigger(NRF_UART_Type * p_reg, nrf_uart_task_t task) in nrf_uart_task_trigger() argument
21 *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL; in nrf_uart_task_trigger()
23 int i = uart_number_from_ptr(p_reg); in nrf_uart_task_trigger()
41 void nrf_uart_int_enable(NRF_UART_Type * p_reg, uint32_t mask) in nrf_uart_int_enable() argument
43 int i = uart_number_from_ptr(p_reg); in nrf_uart_int_enable()
44 p_reg->INTENSET = mask; in nrf_uart_int_enable()
48 void nrf_uart_int_disable(NRF_UART_Type * p_reg, uint32_t mask) in nrf_uart_int_disable() argument
50 int i = uart_number_from_ptr(p_reg); in nrf_uart_int_disable()
51 p_reg->INTENCLR = mask; in nrf_uart_int_disable()
55 void nrf_uart_event_clear(NRF_UART_Type * p_reg, nrf_uart_event_t event) in nrf_uart_event_clear() argument
57 *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL; in nrf_uart_event_clear()
58 int i = uart_number_from_ptr(p_reg); in nrf_uart_event_clear()
62 uint32_t nrf_uart_errorsrc_get_and_clear(NRF_UART_Type * p_reg) in nrf_uart_errorsrc_get_and_clear() argument
64 int i = uart_number_from_ptr(p_reg); in nrf_uart_errorsrc_get_and_clear()
68 uint8_t nrf_uart_rxd_get(NRF_UART_Type const * p_reg) in nrf_uart_rxd_get() argument
70 int i = uart_number_from_ptr((NRF_UART_Type *)p_reg); in nrf_uart_rxd_get()
74 void nrf_uart_txd_set(NRF_UART_Type * p_reg, uint8_t txd) in nrf_uart_txd_set() argument
76 p_reg->TXD = txd; in nrf_uart_txd_set()
77 int i = uart_number_from_ptr(p_reg); in nrf_uart_txd_set()
81 void nrf_uart_disable(NRF_UART_Type * p_reg) in nrf_uart_disable() argument
83 int i = uart_number_from_ptr(p_reg); in nrf_uart_disable()
84 p_reg->ENABLE = UART_ENABLE_ENABLE_Disabled; in nrf_uart_disable()
88 void nrf_uart_enable(NRF_UART_Type * p_reg) in nrf_uart_enable() argument
90 int i = uart_number_from_ptr(p_reg); in nrf_uart_enable()
91 p_reg->ENABLE = UART_ENABLE_ENABLE_Enabled; in nrf_uart_enable()
95 void nrf_uart_configure(NRF_UART_Type * p_reg, in nrf_uart_configure() argument
98 int i = uart_number_from_ptr(p_reg); in nrf_uart_configure()
99 p_reg->CONFIG = (uint32_t)p_cfg->parity in nrf_uart_configure()
112 static void nrf_uart_subscribe_common(NRF_UART_Type * p_reg, in nrf_uart_subscribe_common() argument
115 int i = uart_number_from_ptr(p_reg); in nrf_uart_subscribe_common()
134 void nrf_uart_subscribe_set(NRF_UART_Type * p_reg, in nrf_uart_subscribe_set() argument
138 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) task + 0x80uL)) = in nrf_uart_subscribe_set()
140 nrf_uart_subscribe_common(p_reg, task); in nrf_uart_subscribe_set()
143 void nrf_uart_subscribe_clear(NRF_UART_Type * p_reg, in nrf_uart_subscribe_clear() argument
146 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) task + 0x80uL)) = 0; in nrf_uart_subscribe_clear()
147 nrf_uart_subscribe_common(p_reg, task); in nrf_uart_subscribe_clear()