297faf71d0
Add a pair of functions to translate from input events to hid codes, mapping most of the current hid codes defined in zephyr/usb/class/hid.h. Use a sparse table for the mapping, which takes advantage of the fact that code 0 is reserved. Inspired by the linux equivalent hid to input map: https://elixir.bootlin.com/linux/latest/source/drivers/hid/hid-input.c#L27 Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
11 lines
300 B
CMake
11 lines
300 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_library()
|
|
|
|
zephyr_library_sources(input.c)
|
|
zephyr_library_sources(input_hid.c)
|
|
zephyr_library_sources(input_utils.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_INPUT_KEYMAP input_keymap.c)
|
|
zephyr_library_sources_ifdef(CONFIG_INPUT_LONGPRESS input_longpress.c)
|