zephyr/subsys/input/CMakeLists.txt
Fabio Baltieri 297faf71d0 input: add two input to hid code translation functions
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>
2024-01-24 10:44:40 +01:00

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)