Lines Matching refs:pin
15 #define MODE_PIN_SHIFT(pin) ((pin) * 2) argument
16 #define MODE_MASK(pin) (3 << MODE_PIN_SHIFT(pin)) argument
17 #define DINOFF_PIN_SHIFT(pin) ((pin) + 16) argument
18 #define DINOFF_MASK(pin) (1 << DINOFF_PIN_SHIFT(pin)) argument
19 #define PUSEL_PIN_SHIFT(pin) ((pin) * 2) argument
20 #define PUSEL_MASK(pin) (3 << PUSEL_PIN_SHIFT(pin)) argument
21 #define SLEWCTL_PIN_SHIFT(pin) ((pin) * 2) argument
22 #define SLEWCTL_MASK(pin) (3 << SLEWCTL_PIN_SHIFT(pin)) argument
26 #define REG_MFP(port, pin) (*(volatile uint32_t *)((uint32_t)DT_INST_REG_ADDR_BY_NAME(0, mfp) + \ argument
28 ((pin) > 7 ? 4 : 0)))
33 #define MFP_CTL(pin, mfp) ((mfp) << (((pin) % 8) * 4)) argument
52 static int gpio_configure(const pinctrl_soc_pin_t *pin) in gpio_configure() argument
58 port_idx = NUMICRO_PORT(pin->pinmux); in gpio_configure()
63 pin_idx = NUMICRO_PIN(pin->pinmux); in gpio_configure()
67 if (pin->pull_up != 0) { in gpio_configure()
69 } else if (pin->pull_down != 0) { in gpio_configure()
74 ((pin->open_drain ? 2 : 0) << MODE_PIN_SHIFT(pin_idx)); in gpio_configure()
76 ((pin->input_debounce ? 1 : 0) << pin_idx); in gpio_configure()
78 ((pin->schmitt_trigger ? 1 : 0) << pin_idx); in gpio_configure()
80 ((pin->input_disable ? 1 : 0) << DINOFF_PIN_SHIFT(pin_idx)); in gpio_configure()
84 (pin->slew_rate << SLEWCTL_PIN_SHIFT(pin_idx)); in gpio_configure()
96 uint32_t pin = NUMICRO_PIN(pins[i].pinmux); in pinctrl_configure_pins() local
99 REG_MFP(port, pin) = (REG_MFP(port, pin) & ~MFP_CTL(pin, 0xf)) | in pinctrl_configure_pins()
100 MFP_CTL(pin, mfp); in pinctrl_configure_pins()
103 REG_MFOS(port) |= BIT(pin); in pinctrl_configure_pins()
105 REG_MFOS(port) &= ~BIT(pin); in pinctrl_configure_pins()