Lines Matching full:pin
12 static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin) in pinctrl_configure_pin() argument
17 pin_config.uFuncSel = pin->alt_func; in pinctrl_configure_pin()
19 pin->input_enable ? AM_HAL_GPIO_PIN_INPUT_ENABLE : AM_HAL_GPIO_PIN_INPUT_NONE; in pinctrl_configure_pin()
20 pin_config.eGPOutcfg = pin->push_pull ? AM_HAL_GPIO_PIN_OUTCFG_PUSHPULL in pinctrl_configure_pin()
21 : pin->open_drain ? AM_HAL_GPIO_PIN_OUTCFG_OPENDRAIN in pinctrl_configure_pin()
22 : pin->tristate ? AM_HAL_GPIO_PIN_OUTCFG_TRISTATE in pinctrl_configure_pin()
24 pin_config.eDriveStrength = pin->drive_strength; in pinctrl_configure_pin()
25 pin_config.uNCE = pin->iom_nce; in pinctrl_configure_pin()
27 pin_config.bIomMSPIn = pin->iom_mspi; in pinctrl_configure_pin()
29 pin_config.uIOMnum = pin->iom_num; in pinctrl_configure_pin()
31 if (pin->bias_pull_up) { in pinctrl_configure_pin()
32 pin_config.ePullup = pin->ambiq_pull_up_ohms + AM_HAL_GPIO_PIN_PULLUP_1_5K; in pinctrl_configure_pin()
33 } else if (pin->bias_pull_down) { in pinctrl_configure_pin()
37 pin_config.GP.cfg_b.uFuncSel = pin->alt_func; in pinctrl_configure_pin()
39 pin->input_enable ? AM_HAL_GPIO_PIN_INPUT_ENABLE : AM_HAL_GPIO_PIN_INPUT_NONE; in pinctrl_configure_pin()
40 pin_config.GP.cfg_b.eGPOutCfg = pin->push_pull ? AM_HAL_GPIO_PIN_OUTCFG_PUSHPULL in pinctrl_configure_pin()
41 : pin->open_drain ? AM_HAL_GPIO_PIN_OUTCFG_OPENDRAIN in pinctrl_configure_pin()
42 : pin->tristate ? AM_HAL_GPIO_PIN_OUTCFG_TRISTATE in pinctrl_configure_pin()
44 pin_config.GP.cfg_b.eDriveStrength = pin->drive_strength; in pinctrl_configure_pin()
45 pin_config.GP.cfg_b.uSlewRate = pin->slew_rate; in pinctrl_configure_pin()
46 pin_config.GP.cfg_b.uNCE = pin->iom_nce; in pinctrl_configure_pin()
47 pin_config.GP.cfg_b.eIntDir = pin->interrupt_direction; in pinctrl_configure_pin()
49 if (pin->bias_pull_up) { in pinctrl_configure_pin()
50 pin_config.GP.cfg_b.ePullup = pin->ambiq_pull_up_ohms + AM_HAL_GPIO_PIN_PULLUP_1_5K; in pinctrl_configure_pin()
51 } else if (pin->bias_pull_down) { in pinctrl_configure_pin()
55 am_hal_gpio_pinconfig(pin->pin_num, pin_config); in pinctrl_configure_pin()