- #include "led.h"
- #include "delay.h"
- void Led_Init(void)
- {
- GPIO_InitTypeDef GPIO_InitStructure;//¶¨Òå½á¹¹Ìå
- //led3 PB3
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);//ʹÄÜPB¶Ë¿ÚʱÖÓ
-
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; //PB3
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //ÍÆÍìÊä³ö
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;//IO SPEED
-
- GPIO_Init(GPIOB, &GPIO_InitStructure); //³õʼ»¯GPIOB.3
-
- GPIO_ResetBits(GPIOB,GPIO_Pin_3);
- }
|