NULL
This commit is contained in:
53
user/MCU/lhl_gpio.h
Executable file
53
user/MCU/lhl_gpio.h
Executable file
@@ -0,0 +1,53 @@
|
||||
#ifndef __LHL_GPIO_H__
|
||||
#define __LHL_GPIO_H__
|
||||
|
||||
/*==================================================================================*/
|
||||
//ϵͳ<CFB5><CDB3><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>
|
||||
/*==================================================================================*/
|
||||
#define GPIO0 pGPIO0
|
||||
#define GPIO1 pGPIO1
|
||||
#define GPIO2 pGPIO2
|
||||
#define GPIO3 pGPIO3
|
||||
#define GPIO4 pGPIO4
|
||||
|
||||
#define GPIO_PIN_BIT_SET GPIO_PIN_SET
|
||||
#define GPIO_PIN_BIT_RESET GPIO_PIN_RESET
|
||||
|
||||
#define SET_PIN(GPIO, GPIO_PIN) LHL_GPIO_WritePin(GPIO, GPIO_PIN, GPIO_PIN_BIT_SET)
|
||||
#define CLR_PIN(GPIO, GPIO_PIN) LHL_GPIO_WritePin(GPIO, GPIO_PIN, GPIO_PIN_BIT_RESET)
|
||||
#define TOGGLE_PIN(GPIO, GPIO_PIN) LHL_GPIO_TogglePin(GPIO, GPIO_PIN)
|
||||
#define READ_PIN(GPIO, GPIO_PIN) LHL_GPIO_ReadPin(GPIO, GPIO_PIN)
|
||||
|
||||
|
||||
/*==================================================================================*/
|
||||
//ϵͳ<CFB5>궨<EFBFBD><EAB6A8>
|
||||
/*==================================================================================*/
|
||||
#define GPIO_PinPos_0 0
|
||||
#define GPIO_PinPos_1 1
|
||||
#define GPIO_PinPos_2 2
|
||||
#define GPIO_PinPos_3 3
|
||||
#define GPIO_PinPos_4 4
|
||||
#define GPIO_PinPos_5 5
|
||||
#define GPIO_PinPos_6 6
|
||||
#define GPIO_PinPos_7 7
|
||||
#define GPIO_PinPos_8 8
|
||||
#define GPIO_PinPos_9 9
|
||||
#define GPIO_PinPos_10 10
|
||||
#define GPIO_PinPos_11 11
|
||||
#define GPIO_PinPos_12 12
|
||||
#define GPIO_PinPos_13 13
|
||||
#define GPIO_PinPos_14 14
|
||||
#define GPIO_PinPos_15 15
|
||||
|
||||
/*==================================================================================*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/*==================================================================================*/
|
||||
void SystemGPIOInit(void);
|
||||
void EnableOutput(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinPos);
|
||||
void EnableInput(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinPos);
|
||||
void EnablePullUp(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinPos);
|
||||
void EnablePullDown(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinPos);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user