mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-04-16 10:06:57 -05:00
Initial en11 exploration.
This commit is contained in:
6
app/src/drivers/sensors/en11/CMakeLists.txt
Normal file
6
app/src/drivers/sensors/en11/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library()
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_EN11 en11.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_EN11_TRIGGER en11_trigger.c)
|
||||
52
app/src/drivers/sensors/en11/Kconfig
Normal file
52
app/src/drivers/sensors/en11/Kconfig
Normal file
@@ -0,0 +1,52 @@
|
||||
# EN11 incremental encoder sensor configuration options
|
||||
|
||||
# Copyright (c) 2020 Peter Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
menuconfig EN11
|
||||
bool "EN11 Incremental Encoder Sensor"
|
||||
depends on GPIO
|
||||
help
|
||||
Enable driver for EN11 incremental encoder sensors.
|
||||
|
||||
if EN11
|
||||
|
||||
choice
|
||||
prompt "Trigger mode"
|
||||
default EN11_TRIGGER_NONE
|
||||
help
|
||||
Specify the type of triggering to be used by the driver.
|
||||
|
||||
config EN11_TRIGGER_NONE
|
||||
bool "No trigger"
|
||||
|
||||
config EN11_TRIGGER_GLOBAL_THREAD
|
||||
bool "Use global thread"
|
||||
depends on GPIO
|
||||
select EN11_TRIGGER
|
||||
|
||||
config EN11_TRIGGER_OWN_THREAD
|
||||
bool "Use own thread"
|
||||
depends on GPIO
|
||||
select EN11_TRIGGER
|
||||
|
||||
endchoice
|
||||
|
||||
config EN11_TRIGGER
|
||||
bool
|
||||
|
||||
config EN11_THREAD_PRIORITY
|
||||
int "Thread priority"
|
||||
depends on EN11_TRIGGER_OWN_THREAD
|
||||
default 10
|
||||
help
|
||||
Priority of thread used by the driver to handle interrupts.
|
||||
|
||||
config EN11_THREAD_STACK_SIZE
|
||||
int "Thread stack size"
|
||||
depends on EN11_TRIGGER_OWN_THREAD
|
||||
default 1024
|
||||
help
|
||||
Stack size of thread used by the driver to handle interrupts.
|
||||
|
||||
endif # EN11
|
||||
Reference in New Issue
Block a user