diff options
author | Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> | 2021-02-02 15:25:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-05 02:51:04 +0000 |
commit | 93b8c74b6f20bf67e96b68270932d27f8d4c263d (patch) | |
tree | f2bd75c598e5c531ad5d59995b80d1d6a69c4273 /board | |
parent | 0e5eda0e47524c6a5ceb8de28b2de23ba4949b14 (diff) | |
download | chrome-ec-93b8c74b6f20bf67e96b68270932d27f8d4c263d.tar.gz |
copano: Implement keyboard matrix
Base on keyboard spec, modify the keyboard related setting.
BUG=b:179098198,b:179224595
BRANCH=firmware-volteer-13672.B
TEST=make BOARD=copano
1. Verify keyboard function behavior.
Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com>
Change-Id: Ia8e36461a29c9f184af185a76430fb6a91e1ec61
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2666562
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/copano/board.c | 25 | ||||
-rw-r--r-- | board/copano/board.h | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/board/copano/board.c b/board/copano/board.c index ec85a2dad2..2c33582fce 100644 --- a/board/copano/board.c +++ b/board/copano/board.c @@ -56,11 +56,34 @@ struct keyboard_scan_config keyscan_config = { .min_post_scan_delay_us = 1000, .poll_timeout_us = 100 * MSEC, .actual_key_mask = { - 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0x1c, 0xfe, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */ }, }; +static const struct ec_response_keybd_config copano_kb = { + .num_top_row_keys = 10, + .action_keys = { + TK_BACK, /* T1 */ + TK_REFRESH, /* T2 */ + TK_FULLSCREEN, /* T3 */ + TK_OVERVIEW, /* T4 */ + TK_SNAPSHOT, /* T5 */ + TK_BRIGHTNESS_DOWN, /* T6 */ + TK_BRIGHTNESS_UP, /* T7 */ + TK_VOL_MUTE, /* T8 */ + TK_VOL_DOWN, /* T9 */ + TK_VOL_UP, /* T10 */ + }, + .capabilities = KEYBD_CAP_SCRNLOCK_KEY, +}; + +__override const struct ec_response_keybd_config +*board_vivaldi_keybd_config(void) +{ + return &copano_kb; +} + /******************************************************************************/ /* * FW_CONFIG defaults for Terrador if the CBI data is not initialized. diff --git a/board/copano/board.h b/board/copano/board.h index f1703109c1..5e547140f4 100644 --- a/board/copano/board.h +++ b/board/copano/board.h @@ -38,6 +38,8 @@ #define CONFIG_LED_ONOFF_STATES_BAT_LOW 10 /* Keyboard features */ +#define CONFIG_KEYBOARD_VIVALDI +#define CONFIG_KEYBOARD_REFRESH_ROW3 /* Sensors */ /* BMA253 accelerometer in base */ |