forked from devbis/z03mmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
board_8258_03mmc.h
63 lines (48 loc) · 1.4 KB
/
board_8258_03mmc.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
59
60
61
62
63
/********************************************************************************************************
* @file board_8258_03mmc.h
*
* @brief This is the header file for board_8258_lywsd03mmc
*
*******************************************************************************************************/
#pragma once
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
#endif
// BUTTON
#define BUTTON1 GPIO_PA5 // reset test point
#define PA5_FUNC AS_GPIO
#define PA5_OUTPUT_ENABLE 0
#define PA5_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PA5 PM_PIN_PULLUP_10K
#define BUTTON2 GPIO_PA6 // P8 test point
#define PA6_FUNC AS_GPIO
#define PA6_OUTPUT_ENABLE 0
#define PA6_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PA6 PM_PIN_PULLUP_1M
#define I2C_CLOCK 100000
#define I2C_GPIO_GROUP I2C_GPIO_GROUP_C2C3
#define PM_WAKEUP_LEVEL PM_WAKEUP_LEVEL_LOW
// UART
#if ZBHCI_UART
#error please configurate uart PIN!!!!!!
#endif
// DEBUG
#if UART_PRINTF_MODE
#define DEBUG_INFO_TX_PIN GPIO_SWS //print
#endif
enum{
VK_SW1 = 0x01,
VK_SW2 = 0x02
};
#define KB_MAP_NORMAL {\
{VK_SW1,}, \
{VK_SW2,}, }
#define KB_MAP_NUM KB_MAP_NORMAL
#define KB_MAP_FN KB_MAP_NORMAL
#define KB_DRIVE_PINS {NULL }
#define KB_SCAN_PINS {BUTTON1, BUTTON2}
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
#endif