#ifndef __KEY_H
#define __KEY_H	 

#include "stm32f0xx.h"
#define  u8  unsigned char
#define  u16  unsigned int


#define KEY1   GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5)//读取按键1
#define KEY2   GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_6)//读取按键2
#define KEY3   GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_7)//读取按键3 
#define KEY4   GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_4)//读取按键4


#define KEY1_PRES	  1		//KEY1 
#define KEY2_PRES	  2		//KEY2 
#define KEY3_PRES	  3		//KEY3
#define KEY4_PRES	  4		//KEY4

//void KEY_Init(void);//IO初始化

extern u8 KEY_Scan(void);  	//按键扫描函数	
void KEY_Init(void);
void keyHandle(void);

#endif
