innovaker
4 years ago
committed by
Pete Johanson
24 changed files with 79 additions and 46 deletions
@ -0,0 +1,5 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
add_subdirectory_ifdef(CONFIG_KSCAN kscan) |
||||||
|
add_subdirectory_ifdef(CONFIG_SENSOR sensor) |
@ -0,0 +1,5 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
rsource "kscan/Kconfig" |
||||||
|
rsource "sensor/Kconfig" |
@ -0,0 +1,8 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
zephyr_library() |
||||||
|
|
||||||
|
zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio_matrix.c) |
||||||
|
zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio_direct.c) |
||||||
|
zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio_demux.c) |
@ -0,0 +1,25 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
config ZMK_KSCAN_GPIO_DRIVER |
||||||
|
bool "Enable GPIO kscan driver to simulate key presses" |
||||||
|
default y |
||||||
|
select GPIO |
||||||
|
|
||||||
|
if ZMK_KSCAN_GPIO_DRIVER |
||||||
|
|
||||||
|
config ZMK_KSCAN_MATRIX_POLLING |
||||||
|
bool "Poll for key event triggers instead of using interrupts on matrix boards." |
||||||
|
default n |
||||||
|
|
||||||
|
config ZMK_KSCAN_DIRECT_POLLING |
||||||
|
bool "Poll for key event triggers instead of using interrupts on direct wired boards." |
||||||
|
default n |
||||||
|
|
||||||
|
endif |
||||||
|
|
||||||
|
config ZMK_KSCAN_INIT_PRIORITY |
||||||
|
int "Keyboard scan driver init priority" |
||||||
|
default 40 |
||||||
|
help |
||||||
|
Keyboard scan device driver initialization priority. |
@ -0,0 +1,5 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
add_subdirectory_ifdef(CONFIG_ZMK_BATTERY_VOLTAGE_DIVIDER battery_voltage_divider) |
||||||
|
add_subdirectory_ifdef(CONFIG_EC11 ec11) |
@ -0,0 +1,5 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
rsource "battery_voltage_divider/Kconfig" |
||||||
|
rsource "ec11/Kconfig" |
@ -0,0 +1,6 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
zephyr_library() |
||||||
|
|
||||||
|
zephyr_library_sources(battery_voltage_divider.c) |
@ -0,0 +1,8 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
config ZMK_BATTERY_VOLTAGE_DIVIDER |
||||||
|
bool "ZMK battery voltage divider" |
||||||
|
select ADC |
||||||
|
help |
||||||
|
Enable ZMK battery voltage divider driver for battery monitoring. |
@ -0,0 +1,9 @@ |
|||||||
|
# Copyright (c) 2020 The ZMK Contributors |
||||||
|
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
|
zephyr_include_directories(.) |
||||||
|
|
||||||
|
zephyr_library() |
||||||
|
|
||||||
|
zephyr_library_sources(ec11.c) |
||||||
|
zephyr_library_sources_ifdef(CONFIG_EC11_TRIGGER ec11_trigger.c) |
@ -1,35 +1,6 @@ |
|||||||
# Copyright (c) 2020 The ZMK Contributors |
# Copyright (c) 2020 The ZMK Contributors |
||||||
# SPDX-License-Identifier: MIT |
# SPDX-License-Identifier: MIT |
||||||
|
|
||||||
config ZMK_KSCAN_GPIO_DRIVER |
|
||||||
bool "Enable GPIO kscan driver to simulate key presses" |
|
||||||
default y |
|
||||||
select GPIO |
|
||||||
|
|
||||||
if ZMK_KSCAN_GPIO_DRIVER |
|
||||||
|
|
||||||
config ZMK_KSCAN_MATRIX_POLLING |
|
||||||
bool "Poll for key event triggers instead of using interrupts on matrix boards." |
|
||||||
default n |
|
||||||
|
|
||||||
config ZMK_KSCAN_DIRECT_POLLING |
|
||||||
bool "Poll for key event triggers instead of using interrupts on direct wired boards." |
|
||||||
default n |
|
||||||
|
|
||||||
endif |
|
||||||
|
|
||||||
config ZMK_KSCAN_INIT_PRIORITY |
|
||||||
int "Keyboard scan driver init priority" |
|
||||||
default 40 |
|
||||||
help |
|
||||||
Keyboard scan device driver initialization priority. |
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER |
|
||||||
bool "ZMK battery voltage divider" |
|
||||||
select ADC |
|
||||||
help |
|
||||||
Enable ZMK battery voltage divider driver for battery monitoring. |
|
||||||
|
|
||||||
menuconfig EC11 |
menuconfig EC11 |
||||||
bool "EC11 Incremental Encoder Sensor" |
bool "EC11 Incremental Encoder Sensor" |
||||||
depends on GPIO |
depends on GPIO |
@ -1,14 +0,0 @@ |
|||||||
if(CONFIG_ZMK_KSCAN_GPIO_DRIVER) |
|
||||||
zephyr_include_directories(.) |
|
||||||
|
|
||||||
zephyr_library() |
|
||||||
zephyr_library_sources( |
|
||||||
kscan_gpio_matrix.c |
|
||||||
kscan_gpio_direct.c |
|
||||||
kscan_gpio_demux.c |
|
||||||
) |
|
||||||
|
|
||||||
zephyr_library_sources_ifdef(CONFIG_EC11 ec11.c) |
|
||||||
zephyr_library_sources_ifdef(CONFIG_EC11_TRIGGER ec11_trigger.c) |
|
||||||
zephyr_library_sources_ifdef(CONFIG_ZMK_BATTERY_VOLTAGE_DIVIDER battery_voltage_divider.c) |
|
||||||
endif() |
|
Loading…
Reference in new issue