33 lines
991 B
C
33 lines
991 B
C
|
/******************** (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<EFBFBD>弶֧<EFBFBD>ְ<EFBFBD>(Board Support Pack)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>IO<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
********************************************************************************/
|
|||
|
#ifndef __BSP_GPIO_H__
|
|||
|
#define __BSP_GPIO_H__
|
|||
|
|
|||
|
#include "stm32f10x.h"
|
|||
|
|
|||
|
// LED <20><><EFBFBD><EFBFBD>״̬<D7B4>궨<EFBFBD><EAB6A8>
|
|||
|
#define ON 0
|
|||
|
#define OFF 1
|
|||
|
// LED IO<49>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define LED_BLUE_CLK RCC_APB2Periph_GPIOC
|
|||
|
#define LED_BLUE_PORT GPIOC
|
|||
|
#define LED_BLUE_Pin GPIO_Pin_8
|
|||
|
|
|||
|
|
|||
|
/* <20><><EFBFBD>κ꣬<CEBA><EAA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ʹ<EFBFBD><CAB9> */
|
|||
|
#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__ */
|