|
/******************************************************************************
|
* Copyright (C) 2014-2015 HangZhou SiZhu Co.,LTD.
|
*
|
*-----------------------------------------------------------------------------
|
* File: KEY.h
|
* Description: head file if KEY.C used for KEY scan code
|
* Author: Lishoujian (867693272@qq.com)
|
* Date: Jan 8, 2015
|
*****************************************************************************/
|
|
/* ----------------------- Platform includes --------------------------------*/
|
#ifndef __KEY_H
|
#define __KEY_H
|
|
#include "sys.h"
|
#include "datatype.h"
|
|
|
#define KEY1 GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_7)
|
#define KEY2 GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_8)
|
#define KEY3 GPIO_ReadInputDataBit(GPIOC,GPIO_Pin_9)
|
|
#define KEY4 GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_0)
|
|
void KEY_ioconfig(void);//config key io
|
uint32 Get_key(void);//scan key & return key data
|
uint32 get_key4(void);
|
u8 Get_key_count(u8 keybufs,u8 key_count);//»ñÈ¡°´¼ü¼ÆÊýÖµ£¬ÓÃÓÚÅжÏOELDÏÔʾÄĸö²Ëµ¥
|
void key_interruptinit(void);
|
|
void key_interruptinit_disable(void);
|
void key_interruptinit_enable(void);
|
#endif
|