#include<stm32f10x_lib.h>
#include"sys.h"
#include"delay.h"
#include"led.h"
#include"key.h"
#include"exti.h"
int main(void) //提示:main.c(8): error: #130: expected a "{"
{
Stm32_Clock_Init(9);
delay_init(72);
LED_Init();
EXTIX_Init();
while(1);
}
/*exti.c的内容*/
#include"sys.h"
#include"usart.h"
#include"delay.h"
#include"exti.h"
#include"led.h"
#include"key.h"
void EXTI9_5_IRQHandler(void)
{ //提示:..\HARDWARE\exti.c(9): warning: #12-D: parsing restarts here after previous syntax error
delay_ms(10);
if(S1==0)
LED1=!LED1;
EXTI->PR=1<<5;
}
void EXTIX_Init(void) //提示:..\HARDWARE\exti.c(15): error: #247: function "EXTIX_Init" has already been defined
{
RCC->APB2ENR|=1<<6;
GPIOE->CRL|=0XFFFFF0FF;
GPIOE->CRL&=0X00000800;
Ex_NVIC_Config(GPIO_E,5,FTIR);
MY_NVIC_Init(2,2,EXTI9_5_IRQChannel,2);
}
/*led.h内容*/
#ifndef __LED_H
#define __LED_H
#include"sys.h"
#define LED1 PCout(6)
void LED_Init(void); //提示:..\HARDWARE\led.h(10): error: #130: expected a "{"
#endif
/*exti.h内容*/
#ifndef __EXTI_H
#define __EXTI_H
void EXTIX_Init(void)
#endif
错误提示:
Build target 'Target 1'
compiling main.c...
main.c(8): error: #130: expected a "{"
compiling exti.c...
..\HARDWARE\led.h(10): error: #130: expected a "{"
..\HARDWARE\exti.c(9): warning: #12-D: parsing restarts here after previous syntax error
..\HARDWARE\exti.c(15): error: #247: function "EXTIX_Init" has already been defined
Target not created
我觉得那里没什么地方需要“{”啊,exti.c的那个warning我也搞不清楚是什么意思,而我在exti.h写了个EXTIX_Init的函数声明为什么在exti.c文件中说我已经定义了?求各位高手大侠指点迷津啊,不胜感激!!
|