F103系列
typedef struct
{
uint16_t GPIO_Pin; /*!< Specifies the GPIO pins to be configured.
This parameter can be any value of @ref GPIO_pins_define */
GPIOSpeed_TypeDef GPIO_Speed; /*!< Specifies the speed for the selected pins.
This parameter can be a value of @ref GPIOSpeed_TypeDef */
GPIOMode_TypeDef GPIO_Mode; /*!< Specifies the operating mode for the selected pins.
This parameter can be a value of @ref GPIOMode_TypeDef */
}GPIO_InitTypeDef;
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,
GPIO_Mode_AF_PP = 0x18
}GPIOMode_TypeDef;
F407系列
typedef struct
{
uint32_t GPIO_Pin; /*!< Specifies the GPIO pins to be configured.
This parameter can be any value of @ref GPIO_pins_define */
GPIOMode_TypeDef GPIO_Mode; /*!< Specifies the operating mode for the selected pins.
This parameter can be a value of @ref GPIOMode_TypeDef */
GPIOSpeed_TypeDef GPIO_Speed; /*!< Specifies the speed for the selected pins.
This parameter can be a value of @ref GPIOSpeed_TypeDef */
GPIOOType_TypeDef GPIO_OType; /*!< Specifies the operating output type for the selected pins.
This parameter can be a value of @ref GPIOOType_TypeDef */
GPIOPuPd_TypeDef GPIO_PuPd; /*!< Specifies the operating Pull-up/Pull down for the selected pins.
This parameter can be a value of @ref GPIOPuPd_TypeDef */
}GPIO_InitTypeDef;
GPIO模式类型
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 */
}GPIOMode_TypeDef;
GPIO 输出类型
typedef enum
{
GPIO_OType_PP = 0x00,
GPIO_OType_OD = 0x01
}GPIOOType_TypeDef;
GPIO配置上拉,下拉
typedef enum
{
GPIO_PuPd_NOPULL = 0x00,
GPIO_PuPd_UP = 0x01,
GPIO_PuPd_DOWN = 0x02
}GPIOPuPd_TypeDef;
上一篇:STM32之GPIO及第一个STM32程序(跑马灯)
下一篇:STM32F4学习笔记(基础介绍篇)
推荐阅读最新更新时间:2024-11-13 08:17
设计资源 培训 开发板 精华推荐
- 1.3寸彩屏驱动板
- LF18CDT-TR 1.8V 延迟开启低压降稳压器的典型应用
- LT6657AHMS8-3 低压差基准电压源的典型应用电路
- DC2268A-E,用于 LTM4630IY-1 双路 18A/单路 36A 降压模块稳压器的演示板,4.5V=VIN=15V,Vout1 = 1V @ 18A,Vout2 = 1.5V @ 18A
- JN5189-DK006: 适用于JN5189/88的高级开发套件
- 用于 LED 照明的 NCL30030 组合功率因数校正和准谐振反激控制器的典型应用
- AD8034AR-REEL 高速、单位增益峰值检测器的典型应用电路
- C596311_DCDC-TO263-5封装方案验证板
- LT8331EMSE 4.5V 至 80V 输入、-12V 反相转换器的典型应用电路
- 全向轮小车