供参考
#define BUTTON1 GPIO_PD1
#define PD1_FUNC AS_GPIO
#define PD1_OUTPUT_ENABLE 0
#define PD1_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PD1 PM_PIN_PULLUP_10K
#define BUTTON2 GPIO_PD6
#define PD6_FUNC AS_GPIO
#define PD6_OUTPUT_ENABLE 0
#define PD6_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PD6 PM_PIN_PULLUP_10K
#define BUTTON3 GPIO_PD7
#define PD7_FUNC AS_GPIO
#define PD7_OUTPUT_ENABLE 0
#define PD7_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PD7 PM_PIN_PULLUP_10K
#define BUTTON4 GPIO_PA2
#define PA2_FUNC AS_GPIO
#define PA2_OUTPUT_ENABLE 0
#define PA2_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PA2 PM_PIN_PULLUP_10K
#define BUTTON5 GPIO_PA3
#define PA3_FUNC AS_GPIO
#define PA3_OUTPUT_ENABLE 0
#define PA3_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PA3 PM_PIN_PULLUP_10K
#define PM_WAKEUP_LEVEL PM_WAKEUP_LEVEL_LOW
enum{
VK_SW1 = 0x01,
VK_SW2 = 0x02,
VK_SW3 = 0x03,
VK_SW4 = 0x04,
VK_SW5 = 0x05,
};
#define KB_MAP_NORMAL {\
{VK_SW1,}, \
{VK_SW2,}, \
{VK_SW3,}, \
{VK_SW4,}, \
{VK_SW5,}, \
}
#define KB_MAP_NUM KB_MAP_NORMAL
#define KB_MAP_FN KB_MAP_NORMAL
#define KB_DRIVE_PINS {0}
#define KB_SCAN_PINS {BUTTON1, BUTTON2, BUTTON3, BUTTON4, BUTTON5}
|