Lines Matching refs:pin_number

194     uint32_t             pin_number,
209 NRF_STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number);
220 NRF_STATIC_INLINE void nrf_gpio_cfg_input(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config);
227 NRF_STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number);
235 NRF_STATIC_INLINE void nrf_gpio_cfg_watcher(uint32_t pin_number);
242 NRF_STATIC_INLINE void nrf_gpio_input_disconnect(uint32_t pin_number);
253 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t pin_number,
263 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_set(uint32_t pin_number,
272 NRF_STATIC_INLINE void nrf_gpio_pin_dir_set(uint32_t pin_number, nrf_gpio_pin_dir_t direction);
281 NRF_STATIC_INLINE void nrf_gpio_pin_set(uint32_t pin_number);
290 NRF_STATIC_INLINE void nrf_gpio_pin_clear(uint32_t pin_number);
299 NRF_STATIC_INLINE void nrf_gpio_pin_toggle(uint32_t pin_number);
311 NRF_STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value);
322 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number);
331 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_out_read(uint32_t pin_number);
340 NRF_STATIC_INLINE nrf_gpio_pin_sense_t nrf_gpio_pin_sense_get(uint32_t pin_number);
349 NRF_STATIC_INLINE nrf_gpio_pin_dir_t nrf_gpio_pin_dir_get(uint32_t pin_number);
358 NRF_STATIC_INLINE nrf_gpio_pin_input_t nrf_gpio_pin_input_get(uint32_t pin_number);
367 NRF_STATIC_INLINE nrf_gpio_pin_pull_t nrf_gpio_pin_pull_get(uint32_t pin_number);
485 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_latch_get(uint32_t pin_number);
492 NRF_STATIC_INLINE void nrf_gpio_pin_latch_clear(uint32_t pin_number);
502 NRF_STATIC_INLINE void nrf_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_mcusel_t mcu);
513 NRF_STATIC_INLINE bool nrf_gpio_pin_present_check(uint32_t pin_number);
576 uint32_t pin_number, in nrf_gpio_cfg() argument
583 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_cfg()
585 reg->PIN_CNF[pin_number] = ((uint32_t)dir << GPIO_PIN_CNF_DIR_Pos) in nrf_gpio_cfg()
593 NRF_STATIC_INLINE void nrf_gpio_cfg_output(uint32_t pin_number) in nrf_gpio_cfg_output() argument
596 pin_number, in nrf_gpio_cfg_output()
605 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
608 pin_number, in nrf_gpio_cfg_input()
617 NRF_STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number) in nrf_gpio_cfg_default() argument
620 pin_number, in nrf_gpio_cfg_default()
629 NRF_STATIC_INLINE void nrf_gpio_cfg_watcher(uint32_t pin_number) in nrf_gpio_cfg_watcher() argument
631 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_cfg_watcher()
632 uint32_t cnf = reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_INPUT_Msk; in nrf_gpio_cfg_watcher()
634 reg->PIN_CNF[pin_number] = cnf | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos); in nrf_gpio_cfg_watcher()
638 NRF_STATIC_INLINE void nrf_gpio_input_disconnect(uint32_t pin_number) in nrf_gpio_input_disconnect() argument
640 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_input_disconnect()
641 uint32_t cnf = reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_INPUT_Msk; in nrf_gpio_input_disconnect()
643 reg->PIN_CNF[pin_number] = cnf | (GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos); in nrf_gpio_input_disconnect()
647 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_input(uint32_t pin_number, in nrf_gpio_cfg_sense_input() argument
652 pin_number, in nrf_gpio_cfg_sense_input()
661 NRF_STATIC_INLINE void nrf_gpio_cfg_sense_set(uint32_t pin_number, in nrf_gpio_cfg_sense_set() argument
664 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_cfg_sense_set()
665 uint32_t cnf = reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_SENSE_Msk; in nrf_gpio_cfg_sense_set()
667 reg->PIN_CNF[pin_number] = cnf | (sense_config << GPIO_PIN_CNF_SENSE_Pos); in nrf_gpio_cfg_sense_set()
671 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
676 pin_number, in nrf_gpio_pin_dir_set()
685 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_dir_set()
686 reg->DIRSET = (1UL << pin_number); in nrf_gpio_pin_dir_set()
691 NRF_STATIC_INLINE void nrf_gpio_pin_set(uint32_t pin_number) in nrf_gpio_pin_set() argument
693 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_set()
695 nrf_gpio_port_out_set(reg, 1UL << pin_number); in nrf_gpio_pin_set()
699 NRF_STATIC_INLINE void nrf_gpio_pin_clear(uint32_t pin_number) in nrf_gpio_pin_clear() argument
701 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_clear()
703 nrf_gpio_port_out_clear(reg, 1UL << pin_number); in nrf_gpio_pin_clear()
707 NRF_STATIC_INLINE void nrf_gpio_pin_toggle(uint32_t pin_number) in nrf_gpio_pin_toggle() argument
709 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_toggle()
712 reg->OUTSET = (~pins_state & (1UL << pin_number)); in nrf_gpio_pin_toggle()
713 reg->OUTCLR = (pins_state & (1UL << pin_number)); in nrf_gpio_pin_toggle()
717 NRF_STATIC_INLINE void nrf_gpio_pin_write(uint32_t pin_number, uint32_t value) in nrf_gpio_pin_write() argument
721 nrf_gpio_pin_clear(pin_number); in nrf_gpio_pin_write()
725 nrf_gpio_pin_set(pin_number); in nrf_gpio_pin_write()
730 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_read(uint32_t pin_number) in nrf_gpio_pin_read() argument
732 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_read()
734 return ((nrf_gpio_port_in_read(reg) >> pin_number) & 1UL); in nrf_gpio_pin_read()
738 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_out_read(uint32_t pin_number) in nrf_gpio_pin_out_read() argument
740 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_out_read()
742 return ((nrf_gpio_port_out_read(reg) >> pin_number) & 1UL); in nrf_gpio_pin_out_read()
746 NRF_STATIC_INLINE nrf_gpio_pin_sense_t nrf_gpio_pin_sense_get(uint32_t pin_number) in nrf_gpio_pin_sense_get() argument
748 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_sense_get()
750 return (nrf_gpio_pin_sense_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_sense_get()
755 NRF_STATIC_INLINE nrf_gpio_pin_dir_t nrf_gpio_pin_dir_get(uint32_t pin_number) in nrf_gpio_pin_dir_get() argument
757 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_dir_get()
759 return (nrf_gpio_pin_dir_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_dir_get()
763 NRF_STATIC_INLINE nrf_gpio_pin_input_t nrf_gpio_pin_input_get(uint32_t pin_number) in nrf_gpio_pin_input_get() argument
765 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_input_get()
767 return (nrf_gpio_pin_input_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_input_get()
771 NRF_STATIC_INLINE nrf_gpio_pin_pull_t nrf_gpio_pin_pull_get(uint32_t pin_number) in nrf_gpio_pin_pull_get() argument
773 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_pull_get()
775 return (nrf_gpio_pin_pull_t)((reg->PIN_CNF[pin_number] & in nrf_gpio_pin_pull_get()
884 NRF_STATIC_INLINE uint32_t nrf_gpio_pin_latch_get(uint32_t pin_number) in nrf_gpio_pin_latch_get() argument
886 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_latch_get()
888 return (reg->LATCH & (1 << pin_number)) ? 1 : 0; in nrf_gpio_pin_latch_get()
892 NRF_STATIC_INLINE void nrf_gpio_pin_latch_clear(uint32_t pin_number) in nrf_gpio_pin_latch_clear() argument
894 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_latch_clear()
896 reg->LATCH = (1 << pin_number); in nrf_gpio_pin_latch_clear()
901 NRF_STATIC_INLINE void nrf_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_mcusel_t mcu) in nrf_gpio_pin_mcu_select() argument
903 NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pin_number); in nrf_gpio_pin_mcu_select()
904 uint32_t cnf = reg->PIN_CNF[pin_number] & ~GPIO_PIN_CNF_MCUSEL_Msk; in nrf_gpio_pin_mcu_select()
905 reg->PIN_CNF[pin_number] = cnf | (mcu << GPIO_PIN_CNF_MCUSEL_Pos); in nrf_gpio_pin_mcu_select()
909 NRF_STATIC_INLINE bool nrf_gpio_pin_present_check(uint32_t pin_number) in nrf_gpio_pin_present_check() argument
911 uint32_t port = pin_number >> 5; in nrf_gpio_pin_present_check()
939 pin_number &= 0x1F; in nrf_gpio_pin_present_check()
941 return (mask & (1UL << pin_number)) ? true : false; in nrf_gpio_pin_present_check()
946 uint32_t pin_number = *p_pin; in nrf_gpio_pin_port_number_extract() local
947 *p_pin = pin_number & 0x1F; in nrf_gpio_pin_port_number_extract()
949 return pin_number >> 5; in nrf_gpio_pin_port_number_extract()