下面只针对这两种MCU库函数操作端口进行说明
一、端口功能说明
STM32F0系列
typedef struct
{
uint32_t GPIO_Pin; //引脚配置
GPIOMode_TypeDef GPIO_Mode; //端口模式
GPIOSpeed_TypeDef GPIO_Speed; //引脚速率
GPIOOType_TypeDef GPIO_OType; //输出设置
GPIOPuPd_TypeDef GPIO_PuPd; //管脚设置
}GPIO_InitTypeDef;
typedef enum
{
GPIO_Mode_IN = 0x00, //输入
GPIO_Mode_OUT = 0x01, //输出
GPIO_Mode_AF = 0x02, //浮空输入
GPIO_Mode_AN = 0x03 //模拟输入
一、端口功能说明
STM32F0系列
typedef struct
{
uint32_t GPIO_Pin; //引脚配置
GPIOMode_TypeDef GPIO_Mode; //端口模式
GPIOSpeed_TypeDef GPIO_Speed; //引脚速率
GPIOOType_TypeDef GPIO_OType; //输出设置
GPIOPuPd_TypeDef GPIO_PuPd; //管脚设置
}GPIO_InitTypeDef;
typedef enum
{
GPIO_Mode_IN = 0x00, //输入
GPIO_Mode_OUT = 0x01, //输出
GPIO_Mode_AF = 0x02, //浮空输入
GPIO_Mode_AN = 0x03 //模拟输入