1 Star 2 Fork 0

wangjiewen / STM32基础代码

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
bsp_led.h 653 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangjiewen 提交于 2020-10-22 10:12 . first commit
#ifndef _BSP_LED_H_
#define _BSP_LED_H_
#include "stm32f10x_gpio.h"
#include "gpio_band.h"
//led0 pb5 led1 pe5
#define LED1PIN GPIO_Pin_5
#define LED1PORT GPIOB
#define LED1 PBOut(5)
#define LED2PIN GPIO_Pin_5
#define LED2PORT GPIOE
#define LED2 PEOut(5)
#define LED1ON GPIO_ResetBits(LED1PORT, LED1PIN)
#define LED1OFF GPIO_SetBits(LED1PORT, LED1PIN)
#define LED2ON GPIO_ResetBits(LED2PORT, LED2PIN)
#define LED2OFF GPIO_SetBits(LED2PORT, LED2PIN)
typedef enum LED
{
led1 = 1,
led2
}LED;
void LED_GPIO_Config(void);
void LED_Turn_On(LED led);
#endif
C
1
https://gitee.com/wangmimo/stm32-basic-code.git
git@gitee.com:wangmimo/stm32-basic-code.git
wangmimo
stm32-basic-code
STM32基础代码
master

搜索帮助