#ifndef __LED_H
#define __LED_H
void LED_Init();
void LED1_up();
void LED1_down();
void LED2_up();
void LED2_down();
#endif
出现如下警告:
.\Hardware\LED.h(4): warning: #1295-D: Deprecated declaration LED_Init - give arg types
void LED_Init();
.\Hardware\LED.h(6): warning: #1295-D: Deprecated declaration LED1_up - give arg types
void LED1_up();
.\Hardware\LED.h(7): warning: #1295-D: Deprecated declaration LED1_down - give arg types
void LED1_down();
.\Hardware\LED.h(8): warning: #1295-D: Deprecated declaration LED2_up - give arg types
void LED2_up();
.\Hardware\LED.h(9): warning: #1295-D: Deprecated declaration LED2_down - give arg types
void LED2_down();
#ifndef __LED_H
#define __LED_H
void LED_Init(void);
void LED1_up(void);
void LED1_down(void);
void LED2_up(void);
void LED2_down(void);
#endif
在括号上加void即可解决