#include "stm32f10x.h"
#include "led.h"
int main()
{
LED_Init();
while(1)
{
GPIO_SetBits(GPIOD,GPIO_Pin_6);
}
#include "led.h"
int main()
{
LED_Init();
while(1)
{
GPIO_SetBits(GPIOD,GPIO_Pin_6);
}
}
运行时警告:warning: #223-D: function "LED_Init" declared implicitly
解决:在头文件下要声明函数 void LED_Init(void);就可以了。