typedefstruct{uint32_tPin;//所要初始化的引脚序列 GPIO_PIN_x 参见GPIO_pins_defineuint32_tMode;//输入输出模式 GPIO_MODE_xxx 参见GPIO_pins_defineuint32_tSpeed;//输入输出速度 GPIO_XXXX_Speed 参见 GPIO_speed——defineuint32_tAlternate//要
< Specifies the speed for the selected pins. This parameter can be a value of @ref GPIO_speed_define*/uint32_t Alternate;/*!< Peripheral to be connected to the selected pins. This parameter can be a value of @ref GPIO_Alternate_function_selection*/}GPIO_InitTypeDef; 比如结构体中Speed变量...
#define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ /** * @brief AF 1 selection */ #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */ #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */ 下面以L...
5. 引脚功能选择(Pin function selection):一些GPIO口具有多种功能,可以通过引脚功能选择来配置为特定的功能。例如,GPIO口可以配置为普通GPIO功能、模拟输入功能(Analog input)或其他特定功能。 除了以上参数外,还有一些其他的GPIO参数配置,例如输入输出电平的设置、输入输出电流的设置、引脚复用功能的设置等。这些参数的...
This parameter can be a value of @ref GPIO_Alternate_function_selection */ }GPIO_InitTypeDef; 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Pin: 指定的引脚号,右值表达式可以是 GPIO_PIN_0 ~ GPIO_PIN_15, GPIO_PIN_All 任意相或 ...
GPIO alternate function low register 编辑 编辑 图4 引脚0到7所用复用器 💩31:0ADRLy:端口x位y的复用功能选择(Alternate function selection for port x bit y) (y = 0..7) 这些位通过软件写入,用于配置复用功能 I/O。AFRLy 选择: 0000:AF0 ...
GPIO alternate function low register 图4 引脚0到7所用复用器 31:0ADRLy:端口x位y的复用功能选择(Alternate function selection for port x bit y) (y = 0..7) 这些位通过软件写入,用于配置复用功能 I/O。AFRLy 选择: 0000:AF0 0001:AF1
除了控制器驱动程序通常需要的内存和中断资源外,还指定了资源 MsftFunctionConfig()。 此资源使 I2C 控制器驱动程序能够将由设备节点 \_SB.GPIO0 管理的引脚 2 和 3 设置为功能 4,并启用上拉电阻。 支持在 GpioClx 客户端驱动程序中实现复用功能 GpioClx 内置了引脚复用功能支持。 GpioClx 微型端口驱动程序(也...
This parameter can beavalue of@refGPIO_Alternate_function_selection */ }GPIO_InitTypeDef; 复制代码 复制代码 作用是:设置要用的是哪个引脚、引脚工作模式、上拉还是下拉、速度、XX这个还不知道是干嘛的XX。 2.使能时钟。 /GPIO Ports Clock Enable/ ...
#define GPIO_AF_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */ #if defined(STM32F446xx) #define GPIO_AF0_TIM2 ((uint8_t)0x00) /* TIM2 Alternate Function mapping */ #endif /* STM32F446xx */ /** * @brief AF 1 selection ...