|
楼主 |
发表于 2024-12-13 09:04:11
|
显示全部楼层
本帖最后由 wx_8236422632 于 2024-12-13 09:06 编辑
咦 奇了怪了 我之前跟你这一样的写法 我的不行 奇怪嘞
《---myCode-C---》
// BUTTON -- floor heating
#define BUTTON1 GPIO_PB7
#define PB7_FUNC AS_GPIO
#define PB7_OUTPUT_ENABLE 0
#define PB7_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PB7 PM_PIN_PULLUP_10K
#define BUTTON2 GPIO_PB6
#define PB6_FUNC AS_GPIO
#define PB6_OUTPUT_ENABLE 0
#define PB6_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PB6 PM_PIN_PULLUP_10K
#define BUTTON3 GPIO_PB5
#define PB5_FUNC AS_GPIO
#define PB5_OUTPUT_ENABLE 0
#define PB5_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PB5 PM_PIN_PULLUP_10K
#define BUTTON4 GPIO_PB4
#define PB4_FUNC AS_GPIO
#define PB4_OUTPUT_ENABLE 0
#define PB4_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PB4 PM_PIN_PULLUP_10K
#define BUTTON5 GPIO_PB3
#define PB3_FUNC AS_GPIO
#define PB3_OUTPUT_ENABLE 0
#define PB3_INPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PB3 PM_PIN_PULLUP_10K
#define PM_WAKEUP_LEVEL PM_WAKEUP_LEVEL_LOW
// DEBUG
#if UART_PRINTF_MODE
#define DEBUG_INFO_TX_PIN GPIO_PC7//print
#endif
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}
|
|