key.h 687 Bytes
Newer Older
时昊's avatar
时昊 committed
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
#ifndef __KEY_INTP_H__
#define __KEY_INTP_H__
#include "common.h"
#include "gpio.h"
#define KEY_WAITTIME                    (1U)   /* change the waiting time according to the system */

#define KR0_INT   0x01
#define KR1_INT   0x02
#define KR2_INT   0x04
#define KR3_INT   0x08
#define KR4_INT   0x10
#define KR5_INT   0x20
#define KR6_INT   0x40
#define KR7_INT   0x80

#define IS_KEY_INT(KEY_INT) ((KEY_INT) != (uint8_t)0x00)


typedef struct
{
	uint8_t INT_Select;     /*!< Specifies the key interrupt trigger source.	*/
	                                        
}KEY_InitTypeDef;


void Key_Start(void);
void Key_Stop(void);
void KEY_Init(KEY_InitTypeDef* Key_InitStruct);

#endif