forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

周巍
2024-04-11 91ef77c00ed797b1048c5187f416e351e646a009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
/******************************************************************************
 * 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