AB153x API----GPIO枚举

2020-08-31 15:06:42 浏览数 (1)

枚举HAL » GPIO

枚举

枚举

hal_gpio_direction_t { HAL_GPIO_DIRECTION_INPUT = 0, HAL_GPIO_DIRECTION_OUTPUT = 1}

该枚举定义了GPIO方向。

枚举

hal_gpio_data_t { HAL_GPIO_DATA_LOW = 0, HAL_GPIO_DATA_HIGH = 1}

该枚举定义了GPIO的数据类型。

枚举

hal_gpio_status_t { HAL_GPIO_STATUS_ERROR_CHECK = -4, HAL_GPIO_STATUS_ERROR = -3, HAL_GPIO_STATUS_ERROR_PIN = -2, HAL_GPIO_STATUS_INVALID_PARAMETER = -1, HAL_GPIO_STATUS_OK = 0 }

该枚举定义了GPIO API的返回类型。

枚举

hal_pinmux_status_t { HAL_PINMUX_STATUS_ERROR_CHECK = -4, HAL_PINMUX_STATUS_ERROR = -3, HAL_PINMUX_STATUS_ERROR_PORT = -2, HAL_PINMUX_STATUS_INVALID_FUNCTION = -1, HAL_PINMUX_STATUS_OK = 0 }

该枚举定义pinmux API的返回类型。

枚举

hal_gpio_driving_current_t { HAL_GPIO_DRIVING_CURRENT_8MA = 0, HAL_GPIO_DRIVING_CURRENT_16MA = 1, HAL_GPIO_DRIVING_CURRENT_24MA = 2, HAL_GPIO_DRIVING_CURRENT_32MA = 3}

该枚举定义了驱动电流。

枚举

hal_pinmux_select_t { HAL_PINMUX_DEFAULT = 0, HAL_PINMUX_PWM1 = 1, HAL_PINMUX_PWM2, HAL_PINMUX_PWM3, HAL_PINMUX_PWM4, HAL_PINMUX_PWM5, HAL_PINMUX_PWM6, HAL_PINMUX_LED3, HAL_PINMUX_LED4, HAL_PINMUX_LED5, HAL_PINMUX_SDIO_LED, HAL_PINMUX_CLK_XO32k, HAL_PINMUX_CLK_XO16m, HAL_PINMUX_CLK_RCO128_64k, HAL_PINMUX_PER_CLK_24m, HAL_PINMUX_CLK_XO16m_divided_by_N, HAL_PINMUX_I2S_MCLK, HAL_PINMUX_UART_NRTS, HAL_PINMUX_SPDIF_TXO, HAL_PINMUX_DMIC_CLK, HAL_PINMUX_MDSP_UART_TX, HAL_PINMUX_CS_1, HAL_PINMUX_CS_2, HAL_PINMUX_CS_3, HAL_PINMUX_SDIO_BUS_PWR_CTL, HAL_PINMUX_I2S0_SDO1, HAL_PINMUX_I2S0_SDO2, HAL_PINMUX_UART2_TX, HAL_PINMUX_DBG_PORT = 31 }

该枚举定义了用于的gpio。

枚举

hal_gpio_pin_t { HAL_GPIO_0 = 0, HAL_GPIO_1 = 1, HAL_GPIO_2 = 2, HAL_GPIO_3 = 3, HAL_GPIO_4 = 4, HAL_GPIO_5 = 5, HAL_GPIO_6 = 6, HAL_GPIO_7 = 7, HAL_GPIO_8 = 8, HAL_GPIO_9 = 9, HAL_GPIO_10 = 10, HAL_GPIO_11 = 11, HAL_GPIO_12 = 12, HAL_GPIO_13 = 13, HAL_GPIO_14 = 14, HAL_GPIO_15 = 15, HAL_GPIO_16 = 16, HAL_GPIO_17 = 17, HAL_GPIO_18= 18, HAL_GPIO_19 = 19, HAL_GPIO_20 = 20, HAL_GPIO_21 = 21, HAL_GPIO_22 = 22, HAL_GPIO_23 = 23, HAL_GPIO_24 = 24, HAL_GPIO_25 = 25, HAL_GPIO_26 = 26, HAL_GPIO_27 = 27, HAL_GPIO_28 = 28, HAL_GPIO_29 = 29, HAL_GPIO_30 = 30 , HAL_GPIO_31 = 31, HAL_GPIO_MAX }

该枚举定义了GPIO端口。该平台总共支持49个具有各种功能的GPIO引脚。

0 人点赞