diff options
author | Duncan Laurie <dlaurie@google.com> | 2017-05-16 07:37:33 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-18 18:07:29 -0700 |
commit | 76e064815ff5f8091fb7c127c044fa29e1d7e9c1 (patch) | |
tree | af68f2ae59e3a6f87103dd78e62dc5fe76513bd1 /include/keyboard_8042_sharedlib.h | |
parent | 11237d5e911d769cac995e2e1ab9d16598542bc8 (diff) | |
download | chrome-ec-76e064815ff5f8091fb7c127c044fa29e1d7e9c1.tar.gz |
keyboard_8042: Allow scancode sets to be mutable
Add an option to allow the scancode sets to be mutable. The only
reason to use this is to allow a scancode to be changed at runtime,
for instance to support different keyboards in one image.
The side effect of this is the scancode sets are moved out of the
shared RO section.
BUG=b:36735408
BRANCH=none
TEST=make -j buildall
Change-Id: Iefb97691d1f295411d7b5db603d9214d41af49fd
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/506717
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'include/keyboard_8042_sharedlib.h')
-rw-r--r-- | include/keyboard_8042_sharedlib.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/keyboard_8042_sharedlib.h b/include/keyboard_8042_sharedlib.h index 054795e86d..5c9b559279 100644 --- a/include/keyboard_8042_sharedlib.h +++ b/include/keyboard_8042_sharedlib.h @@ -19,8 +19,13 @@ struct button_8042_t { }; /* The standard Chrome OS keyboard matrix table. */ +#ifdef CONFIG_KEYBOARD_SCANCODE_MUTABLE +extern uint16_t scancode_set1[KEYBOARD_ROWS][KEYBOARD_COLS]; +extern uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS]; +#else extern const uint16_t scancode_set1[KEYBOARD_ROWS][KEYBOARD_COLS]; extern const uint16_t scancode_set2[KEYBOARD_ROWS][KEYBOARD_COLS]; +#endif /* Button scancodes (Power, Volume Down, Volume Up, etc.) */ extern const struct button_8042_t buttons_8042[KEYBOARD_BUTTON_COUNT]; |