< gpio analog in/out mode 分别对应STM32 的 INPUT OUTPUT AF AN 4种模式,但是speed 这里,stm32 的hal库定义位 #define GPIO_SPEED_FREQ_LOW (0x00000000U) /*!< range up to 5 MHz, please refer to the product datasheet */ #define GPIO_SPEED_FREQ_MEDIUM (0x00000001U) /*!< range 5 MHz ...
注意:在F1系列中任何输出模式都无上下拉 /*SPEED*/ GPIO_SPEED_FREQ_LOW (GPIO_CRL_MODE0_1) /*!< Low speed 2M */ GPIO_SPEED_FREQ_MEDIUM (GPIO_CRL_MODE0_0) /*!< Medium speed 5M */ GPIO_SPEED_FREQ_HIGH (GPIO_CRL_MODE0) /*!< High speed 50M */ HAL库常用库函数 读取引脚电平状态 ...
12345678/** @defgroup GPIO_speed_define GPIO speed define * @brief GPIO Output Maximum frequency * @{ */#define GPIO_SPEED_FREQ_LOW ((uint32_t)0x00000000U) /*!< Low speed */#define GPIO_SPEED_FREQ_MEDIUM ((uint32_t)0x00000001U) /*!< Medium speed */#define GPIO_SPEED_FREQ_HIGH ...
当前STM32H7的速度等级可以配置为以下四种: /** @defgroup GPIO_speed_define GPIO speed define * @brief GPIO Output Maximum frequency * @{ */ #define GPIO_SPEED_FREQ_LOW ((uint32_t)0x00000000U) /*!< Low speed */ #define GPIO_SPEED_FREQ_MEDIUM ((uint32_t)0x00000001U) /*!< Medium s...
#define GPIO_SPEED_FREQ_LOW (GPIO_CRL_MODE0_1) //低速 #define GPIO_SPEED_FREQ_MEDIUM (GPIO_CRL_MODE0_0) //中速 #define GPIO_SPEED_FREQ_HIGH (GPIO_CRL_MODE0) //高速 #define GPIO_CRL_MODE_Pos (0U) #define GPIO_CRL_MODE_Msk (0x33333333UL << GPIO_CRL_MODE_Pos) /*!< 0x333...
< Medium speed */ #define GPIO_SPEED_FREQ_HIGH (0x00000002u) /*!< High speed */ #define GPIO_SPEED_FREQ_VERY_HIGH (0x00000003u) /*!< Very high speed */ 对于普通输出GPIO,使用STM32CubeMX配置,默认配置低: 当然,如果配置成其他模式,有可能是中,或高。
< Medium speed */#define GPIO_SPEED_FREQ_HIGH ((uint32_t)0x00000002U) /*!< Fast speed */#define GPIO_SPEED_FREQ_VERY_HIGH ((uint32_t)0x00000003U) /*!< High speed */ GPIO调用的HAL函数: void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);...
< 低速*/#defineGPIO_SPEED_FREQ_MEDIUM(GPIO_CRL_MODE0_0)/*!< 中速*/#defineGPIO_SPEED_FREQ_HIGH(GPIO_CRL_MODE0)/*!< 高速*/ 可见,MODE和SPEED的设置都不再用枚举类定义,而是直接用#define定义了别名;上下拉被分离了出来,可独立设置;MODE扩充明显,外部中断和事件模式也被整合了进来,不同的芯片可能...
#define GPIO_SPEED_FREQ_LOW ((uint32_t)0x00000000U) /*!< Low speed */ #define GPIO_SPEED_FREQ_MEDIUM ((uint32_t)0x00000001U) /*!< Medium speed */ #define GPIO_SPEED_FREQ_HIGH ((uint32_t)0x00000002U) /*!< Fast speed */ ...
< Medium speed */ #define GPIO_SPEED_FREQ_HIGH ((uint32_t)0x00000002U) /*!< Fast speed */ #define GPIO_SPEED_FREQ_VERY_HIGH ((uint32_t)0x00000003U) /*!< High speed */ GPIO调用的HAL函数: void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState...