GPIO_InitStruct.Pin = GPIO_PIN_6; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF0; // 根据实际外设功能选择正确的AF值 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 2.4 开漏复用...
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);/*Configure GPIO pins : PG6 PG7 */GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE...
GPIO_InitStruct.Pin = GPIO_PIN_1; // 要配置的引脚 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; // 输出模式(推挽输出) GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; // 低速度 GPIO_InitStruct.Pull = GPIO_NOPULL; // 无上下拉 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); // 初始化 GPIO...
GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);/*Configure GPIO pin : PA1 */GPIO_InitStruct.Pin = GPIO_PIN_1; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed...
GPIO_MODE_INPUT 浮空输入模式:电平状态取决于GPIO外部的电平状态;若在GPIO外部的引脚悬空时,读取结果是不确定的。 GPIO_MODE_OUTPUT_PP 推挽(Pull)输出模式(输出较大电流):推拉输出 既提高电路的负载能力,又提高开关速度。 GPIO_MODE_OUTPUT_OD 开漏(Drain)输出模式(一般外接上拉电阻,如果外部不接上拉电阻只能输...
GPIOMode_TypeDef GPIO_Mode; /*!< Specifies the operating mode for the selected pins. This parameter can be a value of @ref GPIOMode_TypeDef */ }GPIO_InitTypeDef; 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. GPIO_InitTypeDef是一个结构体类型,里面有三个成员 ...
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);/*Configure GPIO pin : PF4 */GPIO_InitStruct.Pin = GPIO_PIN_4; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; ...
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); /*Configure GPIO pins : Relay_Ctrl_Pin USB_PowerSwitchOn_Pin */ GPIO_InitStruct.Pin = Relay_Ctrl_Pin|USB_PowerSwitchOn_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; ...
百度试题 题目GPIO_Mode_OUT_PP 是什么工作模式? A.IO输入模式B.IO模拟输出模式C.IO普通输出模式D.通用推挽输出模式相关知识点: 试题来源: 解析 D 反馈 收藏