GeBalanceBot/Hardware/Firmware/GeBalanceBot_Firmware v1.0 .../DRV/bsp_GPIO.h

33 lines
991 B
C
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/******************** (C) COPYRIGHT 2024 GeekRebot *****************************
* File Name : bsp_GPIO.c
* Current Version : V1.0 & ST 3.5.0
* Author : zhanli 719901725@qq.com
* Date of Issued : 2024.01.17 Create
* Comments : GPIO板级支持包(Board Support Pack)最好把所有的IO在这里配
置,方便管理
********************************************************************************/
#ifndef __BSP_GPIO_H__
#define __BSP_GPIO_H__
#include "stm32f10x.h"
// LED 开关状态宏定义
#define ON 0
#define OFF 1
// LED IO口定义设置
#define LED_BLUE_CLK RCC_APB2Periph_GPIOC
#define LED_BLUE_PORT GPIOC
#define LED_BLUE_Pin GPIO_Pin_8
/* 带参宏,可以像内联函数一样使用 */
#define LED1(a) if (a) \
GPIO_SetBits(LED_BLUE_PORT,LED_BLUE_Pin);\
else \
GPIO_ResetBits(LED_BLUE_PORT,LED_BLUE_Pin)
void LED_GPIO_Config(void);
void LED_Flash(int timer);
#endif /* __LED_H__ */