CH552/projects/LCD/usr/GPIO.h
2019-01-04 15:58:00 +08:00

33 lines
1.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#define GPIO_INTERRUPT 1
sbit Power=P1^7;
sbit KEY0=P1^1;
sbit KEY1=P1^4;
sbit KEY2=P1^5;
sbit KEY3=P1^6;
/*******************************************************************************
* Function Name : Port1Cfg()
* Description : 端口1配置
* Input : Mode 0 = 浮空输入,无上拉
1 = 推挽输入输出
2 = 开漏输入输出,无上拉
3 = 类51模式开漏输入输出有上拉内部电路可以加速由低到高的电平爬升
,UINT8 Pin (0-7)
* Output : None
* Return : None
*******************************************************************************/
void Port1Cfg(UINT8 Mode,UINT8 Pin);
void Port3Cfg(UINT8 Mode,UINT8 Pin);
/*******************************************************************************
* Function Name : GPIOInterruptCfg()
* Description : GPIO中断配置
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void GPIOInterruptCfg();
void custom_GPIO_Interrupt(void);
void TheKeyQuery();
void PowerSupplyQuery();