初学者求大神,指点一下错在哪里

[复制链接]
 楼主| 哈金 发表于 2019-11-28 09:18 | 显示全部楼层 |阅读模式
pi, IO, gp, GPIO, LED
..\..\Output\流水灯.axf: Error: L6218E: Undefined symbol LED1 (referred from main.o)我把led.h文件改成如下
#ifndef __LED_H
#define        __LED_H

#include "stm32f10x.h"

/** the macro definition to trigger the led on or off
  * 1 - off
  *0 - on
  */
#define ON  0
#define OFF 1

#define LED1_ON                        GPIO_SetBits(GPIOB, GPIO_Pin_0)
#define LED1_OFF                GPIO_ResetBits(GPIOB, GPIO_Pin_0)
#define LED2_ON                        GPIO_SetBits(GPIOB, GPIO_Pin_7)
#define LED2_OFF                GPIO_ResetBits(GPIOB, GPIO_Pin_7)
#define LED3_ON                        GPIO_SetBits(GPIOB, GPIO_Pin_8)
#define LED3_OFF          GPIO_RestBits(GPIOB, GPIO_Pin_8)

void LED_GPIO_Config(void);

#endif /* __LED_H */
您需要登录后才可以回帖 登录 | 注册

本版积分规则

432

主题

433

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部