-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkey.h
58 lines (47 loc) · 1.32 KB
/
key.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
******************************************************************************
* File Name : key.h
* Description : This file contains all the key functions prototypes for
* the keys
******************************************************************************
* @attention
*
* Copyright (c) 2019 PQDUSA Inc.
* All rights reserved.
* Author: yaoyu
* Date: 2019/09/04
*
******************************************************************************
**/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __key_H
#define __key_H
#ifdef __cplusplus
extern "C"
{
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#define DEBOUNCING 50 //debouncing delay
#define LONG_PRESS_INTERVAL 5000 //long press delay
//#define KEY digitalRead(PD4)
#define KEY HAL_GPIO_ReadPin(GPIOA, BTN_Pin)
#define ACTIVE_HIGH
void keyScan(void);
__weak void onClick();
__weak void onLongPress();
/** uncomment these if you are using arduino
__attribute__((weak)) void onClick();
__attribute__((weak)) void onLongPress();
*/
#ifdef __cplusplus
}
#endif
#endif /*__ pinoutConfig_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT PQDUSA Inc. *****END OF FILE****/