You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
358 B

#ifndef __KEY_H
#define __KEY_H
#include "stm32f10x.h"
#define IN GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_8)//读取按键0
#define OUT GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_9)//读取按键1
#define IN_PRES 1 //KEY0按下
#define OUT_PRES 2 //KEY1按下
void Key4x4_GPIO_Config(void);
u8 Key_Scan(void);
u8 KEY_Scan(u8); //按键扫描函数
#endif /* __KEY_H */