同一个实验,前天编译通过了没任何问题今天重新打开编译就出问题了,提示是这样的,这是怎么回事
hardware\exti\exti.c(8): error: #18: expected a ")"
hardware\exti\exti.c(8): error: #101: "u8" has already been declared in the current scope
hardware\exti\exti.c(18): error: #18: expected a ")"
hardware\exti\exti.c(18): error: #247: function "u8" has already been defined
hardware\exti\exti.c(45): error: #18: expected a ")"
hardware\exti\exti.c(45): error: #167: argument of type "void (*)(void)" is incompatible with parameter of type "u8"
hardware\exti\exti.c(46): error: #18: expected a ")"
hardware\exti\exti.c(46): error: #167: argument of type "void (*)(void)" is incompatible with parameter of type "u8"
hardware\exti\exti.c(48): warning: #1-D: last line of file ends without a newline
#include"sys.h"
#include"usart.h"
#include"delay.h"
#include"key.h"
#include"exti.h"
#include"led.h"
void EXTI0_IRQChannel(void)
{
delay_ms(30);
if(key2==1)
{
led0=!led0;
led1=!led1;
}
EXTI-> R=1<<0;
}
void EXTI15_10_IRQChannel(void)
{
delay_ms(30);
if(key0==0)
{
led0=!led0;
}
else if(key1==0)
{
led1=!led1;
}
EXTI-> R=1<<13;
EXTI-> R=1<<15;
}
void EXTIX_Init()
{
RCC->APB2ENR|=1<<2;
GPIOA->CRH&=0X0F0FFFFF;
GPIOA->CRH|=0X80800000;
GPIOA->IDR&=0X0000A000;
GPIOA->CRL&=0XFFFFFFF0;
GPIOA->CRL|=0X00000008;
Ex_NVIC_Config(GPIO_A,15,FTIR); //复用IO,触发方式
Ex_NVIC_Config(GPIO_A,13,FTIR);
Ex_NVIC_Config(GPIO_A,0,RTIR);
MY_NVIC_Init(2,2,EXTI0_IRQChannel,2);
MY_NVIC_Init(2,1,EXTI15_10_IRQChannel,2);
}
就指向红色标注的地方 |