diff options
author | Ting Shen <phoenixshen@google.com> | 2020-10-30 16:46:55 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-10 07:56:46 +0000 |
commit | decb6363e9ca50b0c15f9073872af28ba54e726a (patch) | |
tree | 47d458422726fd489a256989118fe5318be0c938 /include | |
parent | 6bc9bb622a31845277d5513fa80fb6766ee68f6c (diff) | |
download | chrome-ec-decb6363e9ca50b0c15f9073872af28ba54e726a.tar.gz |
hammer: support vivaldi keyboard
This CL implements vivald function row config for hammer keyboard.
If CONFIG_USB_HID_KEYBOARD_VIVALDI defined, STM32 HID keyboard now returns
an extra 32-bit data represents the status of action keys. Additionally,
if board_vivaldi_keybd_config returns a non-null pointer, driver will
convert function keys to action key according to the given config.
BUG=b:171156337
TEST=verify keycode is correct in `evtest`
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: Ide3289fd2c1bb8859a74e97134e6113441cfb967
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508848
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 3 | ||||
-rw-r--r-- | include/keyboard_8042.h | 9 | ||||
-rw-r--r-- | include/keyboard_protocol.h | 9 |
3 files changed, 12 insertions, 9 deletions
diff --git a/include/config.h b/include/config.h index c6bb05c578..47e6641645 100644 --- a/include/config.h +++ b/include/config.h @@ -4491,6 +4491,9 @@ /* Support USB HID keyboard backlight. */ #undef CONFIG_USB_HID_KEYBOARD_BACKLIGHT +/* Support vivaldi compatible HID keyboard */ +#undef CONFIG_USB_HID_KEYBOARD_VIVALDI + /* Support USB HID touchpad interface. */ #undef CONFIG_USB_HID_TOUCHPAD diff --git a/include/keyboard_8042.h b/include/keyboard_8042.h index 8c54122e81..6826eb98ac 100644 --- a/include/keyboard_8042.h +++ b/include/keyboard_8042.h @@ -59,13 +59,4 @@ void send_aux_data_to_host_interrupt(uint8_t data); */ void send_aux_data_to_device(uint8_t data); -/* - * This function can help change the keyboard top row layout as presented to the - * AP. If changing the position of the "Refresh" key from T3, you may also need - * to change KEYBOARD_ROW_REFRESH accordingly so that recovery mode can work on - * the EC side of things (also see related CONFIG_KEYBOARD_REFRESH_ROW3) - */ -__override_proto -const struct ec_response_keybd_config *board_vivaldi_keybd_config(void); - #endif /* __CROS_EC_KEYBOARD_8042_H */ diff --git a/include/keyboard_protocol.h b/include/keyboard_protocol.h index 2e3fcf205b..362364ced4 100644 --- a/include/keyboard_protocol.h +++ b/include/keyboard_protocol.h @@ -54,4 +54,13 @@ void keyboard_state_changed(int row, int col, int is_pressed); */ int board_has_keyboard_backlight(void); +/* + * This function can help change the keyboard top row layout as presented to the + * AP. If changing the position of the "Refresh" key from T3, you may also need + * to change KEYBOARD_ROW_REFRESH accordingly so that recovery mode can work on + * the EC side of things (also see related CONFIG_KEYBOARD_REFRESH_ROW3) + */ +__override_proto +const struct ec_response_keybd_config *board_vivaldi_keybd_config(void); + #endif /* __CROS_EC_KEYBOARD_PROTOCOL_H */ |