1 Star 2 Fork 2

AI头条/stm32_arm_learn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gpio_utils.c 527 Bytes
一键复制 编辑 原始数据 按行查看 历史
AI头条 提交于 1年前 . lesson10 PWM呼吸灯
#include "gpio_utils.h"
// GPIO配置函数
void GPIOC_Configuration(void)
{
GPIO_InitTypeDef GPIO_InitStructure; //定义GPIO初始化结构体
// 开启GPIOC的时钟
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
// 设置GPIOC的模式为推挽输出
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All; //选择所有的pin
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //设置输出速度为50MHz
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //设置为推挽输出模式
GPIO_Init(GPIOC, &GPIO_InitStructure); //初始化GPIOC
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xundh/stm32_arm_learn.git
git@gitee.com:xundh/stm32_arm_learn.git
xundh
stm32_arm_learn
stm32_arm_learn
master

搜索帮助