Lines Matching full:pins
18 int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintptr_t reg) in pinctrl_configure_pins() argument
22 for (i = 0; i < pin_cnt; i++, pins++) { in pinctrl_configure_pins()
23 uint8_t port = (pins->config >> CH32V003_PINCTRL_PORT_SHIFT) & 0x03; in pinctrl_configure_pins()
24 uint8_t pin = (pins->config >> CH32V003_PINCTRL_PIN_SHIFT) & 0x0F; in pinctrl_configure_pins()
25 uint8_t bit0 = (pins->config >> CH32V003_PINCTRL_RM_BASE_SHIFT) & 0x1F; in pinctrl_configure_pins()
26 uint8_t remap = (pins->config >> CH32V003_PINCTRL_RM_SHIFT) & 0x3; in pinctrl_configure_pins()
35 if (pins->output_high || pins->output_low) { in pinctrl_configure_pins()
36 cfg |= (pins->slew_rate + 1); in pinctrl_configure_pins()
37 if (pins->drive_open_drain) { in pinctrl_configure_pins()
43 if (pins->bias_pull_up || pins->bias_pull_down) { in pinctrl_configure_pins()
49 if (pins->output_high) { in pinctrl_configure_pins()
52 } else if (pins->output_low) { in pinctrl_configure_pins()
58 if (pins->bias_pull_up) { in pinctrl_configure_pins()
61 if (pins->bias_pull_down) { in pinctrl_configure_pins()