Lines Matching refs:p_reg
56 static int gpio_number_from_ptr(NRF_GPIO_Type const * p_reg){ in gpio_number_from_ptr() argument
57 int i = ( (int)p_reg - (int)&NRF_GPIO_regs[0] ) / sizeof(NRF_GPIO_Type); in gpio_number_from_ptr()
139 void nrf_gpio_port_pin_output_set(NRF_GPIO_Type * p_reg, uint32_t pin_number) in nrf_gpio_port_pin_output_set() argument
150 p_reg->PIN_CNF[pin_number] = cnf; in nrf_gpio_port_pin_output_set()
151 nrf_gpio_regw_sideeffects_PIN_CNF(gpio_number_from_ptr(p_reg), pin_number); in nrf_gpio_port_pin_output_set()
154 void nrf_gpio_port_pin_input_set(NRF_GPIO_Type * p_reg, in nrf_gpio_port_pin_input_set() argument
167 p_reg->PIN_CNF[pin_number] = cnf; in nrf_gpio_port_pin_input_set()
168 nrf_gpio_regw_sideeffects_PIN_CNF(gpio_number_from_ptr(p_reg), pin_number); in nrf_gpio_port_pin_input_set()
206 void nrf_gpio_port_dir_output_set(NRF_GPIO_Type * p_reg, uint32_t out_mask) in nrf_gpio_port_dir_output_set() argument
208 p_reg->DIRSET = out_mask; in nrf_gpio_port_dir_output_set()
209 nrf_gpio_regw_sideeffects_DIRSET(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_dir_output_set()
213 void nrf_gpio_port_dir_input_set(NRF_GPIO_Type * p_reg, uint32_t in_mask) in nrf_gpio_port_dir_input_set() argument
215 p_reg->DIRCLR = in_mask; in nrf_gpio_port_dir_input_set()
216 nrf_gpio_regw_sideeffects_DIRCLR(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_dir_input_set()
219 void nrf_gpio_port_dir_write(NRF_GPIO_Type * p_reg, uint32_t value) in nrf_gpio_port_dir_write() argument
221 p_reg->DIR = value; in nrf_gpio_port_dir_write()
222 nrf_gpio_regw_sideeffects_DIR(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_dir_write()
225 void nrf_gpio_port_out_write(NRF_GPIO_Type * p_reg, uint32_t value) in nrf_gpio_port_out_write() argument
227 p_reg->OUT = value; in nrf_gpio_port_out_write()
228 nrf_gpio_regw_sideeffects_OUT(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_out_write()
231 void nrf_gpio_port_out_set(NRF_GPIO_Type * p_reg, uint32_t set_mask) in nrf_gpio_port_out_set() argument
233 p_reg->OUTSET = set_mask; in nrf_gpio_port_out_set()
234 nrf_gpio_regw_sideeffects_OUTSET(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_out_set()
238 void nrf_gpio_port_out_clear(NRF_GPIO_Type * p_reg, uint32_t clr_mask) in nrf_gpio_port_out_clear() argument
240 p_reg->OUTCLR = clr_mask; in nrf_gpio_port_out_clear()
241 nrf_gpio_regw_sideeffects_OUTCLR(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_out_clear()
244 void nrf_gpio_port_detect_latch_set(NRF_GPIO_Type * p_reg, bool enable) in nrf_gpio_port_detect_latch_set() argument
246 p_reg->DETECTMODE = (enable ? GPIO_DETECTMODE_DETECTMODE_LDETECT : in nrf_gpio_port_detect_latch_set()
248 nrf_gpio_regw_sideeffects_DETECTMODE(gpio_number_from_ptr(p_reg)); in nrf_gpio_port_detect_latch_set()