mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
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>
34 lines
1.0 KiB
C
34 lines
1.0 KiB
C
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
* The functions implemented by keyboard component of EC core.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_KEYBOARD_8042_SHAREDLIB_H
|
|
#define __CROS_EC_KEYBOARD_8042_SHAREDLIB_H
|
|
|
|
#include "button.h"
|
|
#include "keyboard_config.h"
|
|
#include "keyboard_protocol.h"
|
|
|
|
struct button_8042_t {
|
|
uint16_t scancode_set1;
|
|
uint16_t scancode_set2;
|
|
int repeat;
|
|
};
|
|
|
|
/* 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];
|
|
|
|
#endif /* __CROS_EC_KEYBOARD_8042_SHAREDLIB_H */
|