结构体GPIO_InitStructure的第一个成员变量GPIO_Pin用来设置是要初始化哪个或者哪些IO口;第二个成员变量GPIO_Mode是用来设置对应IO端口的输出输入模式;第三个参数是IO口速度设置。 GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //PB5端口配置 GPIO_InitStructure.GPIO_Mode = GPIO...
#define IS_GPIO_MODE(MODE) (((MODE) == GPIO_Mode_IN) || ((MODE) == GPIO_Mode_OUT) || \ ((MODE) == GPIO_Mode_AF)|| ((MODE) == GPIO_Mode_AN)) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. GPIO输出类型 /** * @brief GPIO Output type enumeration */ type...
* @brief Configuration Mode enumeration */ typedef enum { GPIO_Mode_AIN = 0x0, //模拟输入 GPIO_Mode_IN_FLOATING = 0x04, //输入浮空 GPIO_Mode_IPD = 0x28, //输入下拉 GPIO_Mode_IPU = 0x48, //输入上拉 GPIO_Mode_Out_OD = 0x14, //开漏输出 GPIO_Mode_Out_PP = 0x10, //推挽输出...
* @brief Configuration Mode enumeration */typedef enum{ GPIO_Mode_AIN = 0x0, // 模拟输入 GPIO_Mode_IN_FLOATING = 0x04, // 输入浮空 GPIO_Mode_IPD = 0x28, // 输入下拉 GPIO_Mode_IPU = 0x48, // 输入上拉 GPIO_Mode_Out_OD = 0x14, // 开漏输出 GPIO_Mode_Out_PP = 0x10, // ...
/* Configuration Mode enumeration ---*/ typedef enum { GPIO_Mode_AIN = 0x0,//AD输入模式 GPIO_Mode_IN_FLOATING = 0x04,//普通输入模式(浮空) GPIO_Mode_IPD = 0x28,//带下拉输入模式 GPIO_Mode_IPU = 0x48,//带上拉输入模式 GPIO_Mode_Out_OD ...
"GPIO_Mode"则是代表该GPIO口工作在哪种工作模式下,配置的值如下: /** * @brief Configuration Mode enumeration */typedefenum{ GPIO_Mode_AIN =0x0,// 模拟输入GPIO_Mode_IN_FLOATING =0x04,// 输入浮空GPIO_Mode_IPD =0x28,// 输入下拉GPIO_Mode_IPU =0x48,// 输入上拉GPIO_Mode_Out_OD =0x14...
* @brief Configuration Mode enumeration */ typedef enum { GPIO_Mode_AIN = 0x0, GPIO_Mode_IN_FLOATING = 0x04, GPIO_Mode_IPD = 0x28, GPIO_Mode_IPU = 0x48, GPIO_Mode_Out_OD = 0x14, GPIO_Mode_Out_PP = 0x10, GPIO_Mode_AF_OD = 0x1C, ...
Use this mode when multiple bidirectional interfaces, such as I2C, are connected to the GPIO output pin in a bus configuration. When all outputs of the connected interfaces are in a high impedance state, the GPIO output pin can be driven to a logic 1 with an external pull-up resistor. An...
* @brief GPIO Configuration Mode enumeration */ typedef enum { GPIO_Mode_IN = 0x00, /*!< GPIO Input Mode */ GPIO_Mode_OUT = 0x01, /*!< GPIO Output Mode */ GPIO_Mode_AF = 0x02, /*!< GPIO Alternate function Mode */ GPIO_Mode_AN = 0x03 /*!< GPIO Analog Mode */ }GPIOMo...
A pointer to a caller-allocatedCLIENT_CONTROLLER_BASIC_INFORMATIONstructure. TheCLIENT_QueryControllerBasicInformationfunction writes the GPIO controller hardware attributes and configuration information into this structure. Return value TheCLIENT_QueryControllerBasicInformationfunction returns ...