Lines Matching refs:pin_number

383     uint32_t             pin_number,
404 NRF_STATIC_INLINE void nrf_gpio_reconfigure(uint32_t pin_number,
419 NRF_STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number);
430 NRF_STATIC_INLINE void nrf_gpio_port_pin_output_set(NRF_GPIO_Type * p_reg, uint32_t pin_number);
441 NRF_STATIC_INLINE void nrf_gpio_cfg_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config);
454 uint32_t pin_number,
462 NRF_STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number);
470 NRF_STATIC_INLINE void nrf_gpio_cfg_watcher(uint32_t pin_number);
477 NRF_STATIC_INLINE void nrf_gpio_input_disconnect(uint32_t pin_number);
488 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t pin_number,
498 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_set(uint32_t pin_number,
507 NRF_STATIC_INLINE void nrf_gpio_pin_dir_set(uint32_t pin_number, nrf_gpio_pin_dir_t direction);
514 NRF_STATIC_INLINE void nrf_gpio_pin_set(uint32_t pin_number);
521 NRF_STATIC_INLINE void nrf_gpio_pin_clear(uint32_t pin_number);
528 NRF_STATIC_INLINE void nrf_gpio_pin_toggle(uint32_t pin_number);
538 NRF_STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value);
550 uint32_t pin_number,
562 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number);
574 NRF_STATIC_INLINE bool nrf_gpio_port_pin_read(NRF_GPIO_Type const * p_reg, uint32_t pin_number);
583 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_out_read(uint32_t pin_number);
592 NRF_STATIC_INLINE nrf_gpio_pin_sense_t nrf_gpio_pin_sense_get(uint32_t pin_number);
601 NRF_STATIC_INLINE nrf_gpio_pin_dir_t nrf_gpio_pin_dir_get(uint32_t pin_number);
610 NRF_STATIC_INLINE nrf_gpio_pin_input_t nrf_gpio_pin_input_get(uint32_t pin_number);
619 NRF_STATIC_INLINE nrf_gpio_pin_pull_t nrf_gpio_pin_pull_get(uint32_t pin_number);
768 NRF_STATIC_INLINE bool nrf_gpio_pin_retain_check(uint32_t pin_number);
793 NRF_STATIC_INLINE void nrf_gpio_pin_retain_enable(uint32_t pin_number);
800 NRF_STATIC_INLINE void nrf_gpio_pin_retain_disable(uint32_t pin_number);
861 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_latch_get(uint32_t pin_number);
870 NRF_STATIC_INLINE void nrf_gpio_pin_latch_clear(uint32_t pin_number);
882 NRF_STATIC_INLINE void nrf_gpio_pin_control_select(uint32_t pin_number, nrf_gpio_pin_sel_t ctrl);
894 NRF_STATIC_INLINE void nrf_gpio_pin_clock_set(uint32_t pin_number, bool enable);
906 NRF_STATIC_INLINE bool nrf_gpio_pin_clock_check(uint32_t pin_number);
917 NRF_STATIC_INLINE bool nrf_gpio_pin_present_check(uint32_t pin_number);
980 uint32_t pin_number, in nrf_gpio_cfg() argument
987 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_cfg()
988 uint32_t cnf = reg->PIN_CNF[pin_number]; in nrf_gpio_cfg()
1013 reg->PIN_CNF[pin_number] = cnf; in nrf_gpio_cfg()
1016 NRF_STATIC_INLINE void nrf_gpio_reconfigure(uint32_t pin_number, in nrf_gpio_reconfigure() argument
1023 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_reconfigure()
1024 uint32_t cnf = reg->PIN_CNF[pin_number]; in nrf_gpio_reconfigure()
1047 reg->PIN_CNF[pin_number] = cnf; in nrf_gpio_reconfigure()
1050 NRF_STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number) in nrf_gpio_cfg_output() argument
1053 pin_number, in nrf_gpio_cfg_output()
1061 NRF_STATIC_INLINE void nrf_gpio_port_pin_output_set(NRF_GPIO_Type * p_reg, uint32_t pin_number) in nrf_gpio_port_pin_output_set() argument
1072 p_reg->PIN_CNF[pin_number] = cnf; in nrf_gpio_port_pin_output_set()
1075 NRF_STATIC_INLINE void nrf_gpio_cfg_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config) in nrf_gpio_cfg_input() argument
1078 pin_number, in nrf_gpio_cfg_input()
1087 uint32_t pin_number, in nrf_gpio_port_pin_input_set() argument
1099 p_reg->PIN_CNF[pin_number] = cnf; in nrf_gpio_port_pin_input_set()
1103 NRF_STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number) in nrf_gpio_cfg_default() argument
1106 pin_number, in nrf_gpio_cfg_default()
1115 NRF_STATIC_INLINE void nrf_gpio_cfg_watcher(uint32_t pin_number) in nrf_gpio_cfg_watcher() argument
1119 nrf_gpio_reconfigure(pin_number, NULL, &input, NULL, NULL, NULL); in nrf_gpio_cfg_watcher()
1123 NRF_STATIC_INLINE void nrf_gpio_input_disconnect(uint32_t pin_number) in nrf_gpio_input_disconnect() argument
1127 nrf_gpio_reconfigure(pin_number, NULL, &input, NULL, NULL, NULL); in nrf_gpio_input_disconnect()
1131 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t pin_number, in nrf_gpio_cfg_sense_input() argument
1136 pin_number, in nrf_gpio_cfg_sense_input()
1145 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_set(uint32_t pin_number, in nrf_gpio_cfg_sense_set() argument
1148 nrf_gpio_reconfigure(pin_number, NULL, NULL, NULL, NULL, &sense_config); in nrf_gpio_cfg_sense_set()
1151 NRF_STATIC_INLINE void nrf_gpio_pin_dir_set(uint32_t pin_number, nrf_gpio_pin_dir_t direction) in nrf_gpio_pin_dir_set() argument
1156 pin_number, in nrf_gpio_pin_dir_set()
1165 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_dir_set()
1166 reg->DIRSET = (1UL << pin_number); in nrf_gpio_pin_dir_set()
1171 NRF_STATIC_INLINE void nrf_gpio_pin_set(uint32_t pin_number) in nrf_gpio_pin_set() argument
1173 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_set()
1175 nrf_gpio_port_out_set(reg, 1UL << pin_number); in nrf_gpio_pin_set()
1179 NRF_STATIC_INLINE void nrf_gpio_pin_clear(uint32_t pin_number) in nrf_gpio_pin_clear() argument
1181 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_clear()
1183 nrf_gpio_port_out_clear(reg, 1UL << pin_number); in nrf_gpio_pin_clear()
1187 NRF_STATIC_INLINE void nrf_gpio_pin_toggle(uint32_t pin_number) in nrf_gpio_pin_toggle() argument
1189 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_toggle()
1192 reg->OUTSET = (~pins_state & (1UL << pin_number)); in nrf_gpio_pin_toggle()
1193 reg->OUTCLR = (pins_state & (1UL << pin_number)); in nrf_gpio_pin_toggle()
1197 NRF_STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value) in nrf_gpio_pin_write() argument
1201 nrf_gpio_pin_clear(pin_number); in nrf_gpio_pin_write()
1205 nrf_gpio_pin_set(pin_number); in nrf_gpio_pin_write()
1210 uint32_t pin_number, in nrf_gpio_port_pin_write() argument
1215 nrf_gpio_port_out_clear(p_reg, 1UL << pin_number); in nrf_gpio_port_pin_write()
1219 nrf_gpio_port_out_set(p_reg, 1UL << pin_number); in nrf_gpio_port_pin_write()
1224 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number) in nrf_gpio_pin_read() argument
1226 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_read()
1228 return ((nrf_gpio_port_in_read(reg) >> pin_number) & 1UL); in nrf_gpio_pin_read()
1231 NRF_STATIC_INLINE bool nrf_gpio_port_pin_read(NRF_GPIO_Type const * p_reg, uint32_t pin_number) in nrf_gpio_port_pin_read() argument
1233 return ((nrf_gpio_port_in_read(p_reg) >> pin_number) & 1UL); in nrf_gpio_port_pin_read()
1236 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_out_read(uint32_t pin_number) in nrf_gpio_pin_out_read() argument
1238 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_out_read()
1240 return ((nrf_gpio_port_out_read(reg) >> pin_number) & 1UL); in nrf_gpio_pin_out_read()
1244 NRF_STATIC_INLINE nrf_gpio_pin_sense_t nrf_gpio_pin_sense_get(uint32_t pin_number) in nrf_gpio_pin_sense_get() argument
1246 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_sense_get()
1248 return (nrf_gpio_pin_sense_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_sense_get()
1253 NRF_STATIC_INLINE nrf_gpio_pin_dir_t nrf_gpio_pin_dir_get(uint32_t pin_number) in nrf_gpio_pin_dir_get() argument
1255 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_dir_get()
1257 return (nrf_gpio_pin_dir_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_dir_get()
1261 NRF_STATIC_INLINE nrf_gpio_pin_input_t nrf_gpio_pin_input_get(uint32_t pin_number) in nrf_gpio_pin_input_get() argument
1263 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_input_get()
1265 return (nrf_gpio_pin_input_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_input_get()
1269 NRF_STATIC_INLINE nrf_gpio_pin_pull_t nrf_gpio_pin_pull_get(uint32_t pin_number) in nrf_gpio_pin_pull_get() argument
1271 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_pull_get()
1273 return (nrf_gpio_pin_pull_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_pull_get()
1372 NRF_STATIC_INLINE bool nrf_gpio_pin_retain_check(uint32_t pin_number) in nrf_gpio_pin_retain_check() argument
1374 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_retain_check()
1376 return (nrf_gpio_port_retain_get(reg) & (1UL << pin_number)) != 0U; in nrf_gpio_pin_retain_check()
1391 NRF_STATIC_INLINE void nrf_gpio_pin_retain_enable(uint32_t pin_number) in nrf_gpio_pin_retain_enable() argument
1393 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_retain_enable()
1395 nrf_gpio_port_retain_enable(reg, 1UL << pin_number); in nrf_gpio_pin_retain_enable()
1398 NRF_STATIC_INLINE void nrf_gpio_pin_retain_disable(uint32_t pin_number) in nrf_gpio_pin_retain_disable() argument
1400 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_retain_disable()
1402 nrf_gpio_port_retain_disable(reg, 1UL << pin_number); in nrf_gpio_pin_retain_disable()
1452 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_latch_get(uint32_t pin_number) in nrf_gpio_pin_latch_get() argument
1454 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_latch_get()
1456 return (reg->LATCH & (1 << pin_number)) ? 1 : 0; in nrf_gpio_pin_latch_get()
1460 NRF_STATIC_INLINE void nrf_gpio_pin_latch_clear(uint32_t pin_number) in nrf_gpio_pin_latch_clear() argument
1462 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_latch_clear()
1464 reg->LATCH = (1 << pin_number); in nrf_gpio_pin_latch_clear()
1469 NRF_STATIC_INLINE void nrf_gpio_pin_control_select(uint32_t pin_number, nrf_gpio_pin_sel_t ctrl) in nrf_gpio_pin_control_select() argument
1471 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_control_select()
1473 uint32_t cnf = reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_MCUSEL_Msk; in nrf_gpio_pin_control_select()
1474 reg->PIN_CNF[pin_number] = cnf | (ctrl << GPIO_PIN_CNF_MCUSEL_Pos); in nrf_gpio_pin_control_select()
1476 uint32_t cnf = reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_CTRLSEL_Msk; in nrf_gpio_pin_control_select()
1477 reg->PIN_CNF[pin_number] = cnf | (ctrl << GPIO_PIN_CNF_CTRLSEL_Pos); in nrf_gpio_pin_control_select()
1483 NRF_STATIC_INLINE void nrf_gpio_pin_clock_set(uint32_t pin_number, bool enable) in nrf_gpio_pin_clock_set() argument
1485 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_clock_set()
1487 reg->PIN_CNF[pin_number] = ((reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_CLOCKPIN_Msk) | in nrf_gpio_pin_clock_set()
1492 NRF_STATIC_INLINE bool nrf_gpio_pin_clock_check(uint32_t pin_number) in nrf_gpio_pin_clock_check() argument
1494 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_clock_check()
1496 return (((reg->PIN_CNF[pin_number] & GPIO_PIN_CNF_CLOCKPIN_Msk) >> GPIO_PIN_CNF_CLOCKPIN_Pos) in nrf_gpio_pin_clock_check()
1501 NRF_STATIC_INLINE bool nrf_gpio_pin_present_check(uint32_t pin_number) in nrf_gpio_pin_present_check() argument
1503 uint32_t port = pin_number >> 5; in nrf_gpio_pin_present_check()
1528 pin_number &= 0x1F; in nrf_gpio_pin_present_check()
1530 return (mask & (1UL << pin_number)) ? true : false; in nrf_gpio_pin_present_check()
1535 uint32_t pin_number = *p_pin; in nrf_gpio_pin_port_number_extract() local
1536 *p_pin = NRF_PIN_NUMBER_TO_PIN(pin_number); in nrf_gpio_pin_port_number_extract()
1538 return NRF_PIN_NUMBER_TO_PORT(pin_number); in nrf_gpio_pin_port_number_extract()