LED库
#include <led.h>
//pc13
void Led_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
GPIO_InitStructure.GPIO_Speed =GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &GPIO_InitStructure);//&在此处为取地址符
}
#ifndef _LED_H_
#define _LED_H_
#include <sys.h>
#define LED PCout(13)
void Led_Init(void);
#endif
#include <exti.h>
void EXTI_KEY_Init(void)
{
//配置PB10/PB11为下降沿触发
GPIO_InitTypeDef GPIO_InitStructure;
EXTI_InitTypeDef EXTI_InitStructure;