Files
KeyBoard_QT/inc/buttons_def.h

35 lines
1.1 KiB
C
Raw Permalink Normal View History

/*
* CAF buttons
*
*
* - CAF buttons CONFIG_CAF_BUTTONS_DEF_PATH
* - DTS my_keyboard row-gpios/col-gpios
* - key_id input-keymap
*/
#include <caf/gpio_pins.h>
/*
*
*
*/
const struct {} buttons_def_include_once;
/* 列引脚:对应 atguigu_mini_keyboard.dts 中 my_keyboard/col-gpios 顺序。 */
static const struct gpio_pin col[] = {
{ .port = 0, .pin = 5 },
{ .port = 0, .pin = 6 },
{ .port = 0, .pin = 26 },
{ .port = 0, .pin = 30 },
};
/* 行引脚:对应 atguigu_mini_keyboard.dts 中 my_keyboard/row-gpios 顺序。 */
static const struct gpio_pin row[] = {
{ .port = 0, .pin = 15 },
{ .port = 0, .pin = 7 },
{ .port = 0, .pin = 12 },
{ .port = 0, .pin = 4 },
{ .port = 1, .pin = 9 },
{ .port = 0, .pin = 8 },
};