Home
last modified time | relevance | path

Searched refs:pin_idx (Results 1 – 2 of 2) sorted by relevance

/Zephyr-latest/drivers/pinctrl/
Dpinctrl_numaker.c18 #define SLEWCTL_PIN_SHIFT(pin_idx) ((pin_idx) * 2) argument
19 #define SLEWCTL_MASK(pin_idx) (3 << SLEWCTL_PIN_SHIFT(pin_idx)) argument
20 #define DINOFF_PIN_SHIFT(pin_idx) (pin_idx + GPIO_DINOFF_DINOFF0_Pos) argument
21 #define DINOFF_MASK(pin_idx) (1 << DINOFF_PIN_SHIFT(pin_idx)) argument
23 static void gpio_configure(const pinctrl_soc_pin_t *pin, uint8_t port_idx, uint8_t pin_idx) in gpio_configure() argument
29 port->SMTEN = (port->SMTEN & ~BIT(pin_idx)) | in gpio_configure()
30 ((pin->schmitt_enable ? 1 : 0) << pin_idx); in gpio_configure()
31 port->SLEWCTL = (port->SLEWCTL & ~SLEWCTL_MASK(pin_idx)) | in gpio_configure()
32 (pin->slew_rate << SLEWCTL_PIN_SHIFT(pin_idx)); in gpio_configure()
33 port->DINOFF = (port->DINOFF & ~DINOFF_MASK(pin_idx)) | in gpio_configure()
[all …]
Dpinctrl_numicro.c54 uint8_t port_idx, pin_idx; in gpio_configure() local
63 pin_idx = NUMICRO_PIN(pin->pinmux); in gpio_configure()
73 port->MODE = (port->MODE & ~MODE_MASK(pin_idx)) | in gpio_configure()
74 ((pin->open_drain ? 2 : 0) << MODE_PIN_SHIFT(pin_idx)); in gpio_configure()
75 port->DBEN = (port->DBEN & ~BIT(pin_idx)) | in gpio_configure()
76 ((pin->input_debounce ? 1 : 0) << pin_idx); in gpio_configure()
77 port->SMTEN = (port->SMTEN & ~BIT(pin_idx)) | in gpio_configure()
78 ((pin->schmitt_trigger ? 1 : 0) << pin_idx); in gpio_configure()
79 port->DINOFF = (port->SMTEN & ~DINOFF_MASK(pin_idx)) | in gpio_configure()
80 ((pin->input_disable ? 1 : 0) << DINOFF_PIN_SHIFT(pin_idx)); in gpio_configure()
[all …]