⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 led.c

📁 STM32正交编码器完整程序
💻 C
字号:
/******************************************************
  2011年12月19日  黄旭磊  嘉职院实验室
  实验室快乐的时光	 ^ _ ^
  *****************************************************/

#include "led.h"
void LED_GPIO_Config(void)
{
		 GPIO_InitTypeDef GPIO_InitStructure;
		 RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOF, ENABLE);//使能pc端口时钟
		 GPIO_InitStructure.GPIO_Pin  = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9;	 //	 
		 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;//工作速率
		 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; // 推挽输出
		 GPIO_Init(GPIOF,&GPIO_InitStructure); //端口结构
		 GPIO_SetBits(GPIOF, GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9); 	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -