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.
|
|
|
|
#ifndef __KEY_H
|
|
|
|
|
#define __KEY_H
|
|
|
|
|
#include "sys.h"
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD>ѧϰʹ<EFBFBD>ã<EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><EFBFBD><EFBFBD>;
|
|
|
|
|
//ALIENTEK miniSTM32<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD>@ALIENTEK
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̳:www.openedv.com
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:2012/9/3
|
|
|
|
|
//<EFBFBD>汾<EFBFBD><EFBFBD>V1.0
|
|
|
|
|
//<EFBFBD><EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//Copyright(C) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿƼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾ 2009-2019
|
|
|
|
|
//All rights reserved
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#define KEY0 PCin(5)
|
|
|
|
|
//#define KEY1 PAin(15)
|
|
|
|
|
//#define WK_UP PAin(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define KEY0 GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_5)//<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
|
|
|
|
#define KEY1 GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_15)//<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1
|
|
|
|
|
#define WK_UP GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0)//<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define KEY0_PRES 1 //KEY0
|
|
|
|
|
#define KEY1_PRES 2 //KEY1
|
|
|
|
|
#define WKUP_PRES 3 //WK_UP
|
|
|
|
|
|
|
|
|
|
void KEY_Init(void);//IO<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
|
|
|
|
|
u8 KEY_Scan(u8 mode); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD>躯<EFBFBD><EFBFBD>
|
|
|
|
|
#endif
|