Lines Matching refs:p_reg
14 static int uarte_number_from_ptr(NRF_UARTE_Type * p_reg){ in uarte_number_from_ptr() argument
15 int i = ( (int)p_reg - (int)NRF_UARTE_regs ) / sizeof(NRF_UARTE_Type); in uarte_number_from_ptr()
19 void nrf_uarte_task_trigger(NRF_UARTE_Type * p_reg, nrf_uarte_task_t task) in nrf_uarte_task_trigger() argument
21 *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL; in nrf_uarte_task_trigger()
23 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_task_trigger()
51 void nrf_uarte_int_enable(NRF_UARTE_Type * p_reg, uint32_t mask) in nrf_uarte_int_enable() argument
53 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_int_enable()
54 p_reg->INTENSET = mask; in nrf_uarte_int_enable()
58 void nrf_uarte_int_disable(NRF_UARTE_Type * p_reg, uint32_t mask) in nrf_uarte_int_disable() argument
60 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_int_disable()
61 p_reg->INTENCLR = mask; in nrf_uarte_int_disable()
65 void nrf_uarte_event_clear(NRF_UARTE_Type * p_reg, nrf_uarte_event_t event) in nrf_uarte_event_clear() argument
67 *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL; in nrf_uarte_event_clear()
68 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_event_clear()
72 uint32_t nrf_uarte_errorsrc_get_and_clear(NRF_UARTE_Type * p_reg) in nrf_uarte_errorsrc_get_and_clear() argument
74 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_errorsrc_get_and_clear()
78 void nrf_uarte_enable(NRF_UARTE_Type * p_reg) in nrf_uarte_enable() argument
80 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_enable()
81 p_reg->ENABLE = UARTE_ENABLE_ENABLE_Enabled; in nrf_uarte_enable()
85 void nrf_uarte_disable(NRF_UARTE_Type * p_reg) in nrf_uarte_disable() argument
87 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_disable()
88 p_reg->ENABLE = UARTE_ENABLE_ENABLE_Disabled; in nrf_uarte_disable()
92 void nrf_uarte_configure(NRF_UARTE_Type * p_reg, in nrf_uarte_configure() argument
95 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_configure()
96 p_reg->CONFIG = (uint32_t)p_cfg->parity in nrf_uarte_configure()
112 static void nrf_uarte_subscribe_common(NRF_UARTE_Type * p_reg, in nrf_uarte_subscribe_common() argument
115 int i = uarte_number_from_ptr(p_reg); in nrf_uarte_subscribe_common()
144 void nrf_uarte_subscribe_set(NRF_UARTE_Type * p_reg, in nrf_uarte_subscribe_set() argument
148 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) task + 0x80uL)) = in nrf_uarte_subscribe_set()
150 nrf_uarte_subscribe_common(p_reg, task); in nrf_uarte_subscribe_set()
153 void nrf_uarte_subscribe_clear(NRF_UARTE_Type * p_reg, in nrf_uarte_subscribe_clear() argument
156 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) task + 0x80uL)) = 0; in nrf_uarte_subscribe_clear()
157 nrf_uarte_subscribe_common(p_reg, task); in nrf_uarte_subscribe_clear()