forked from kofal.net/zmk
Initial working Clueboard California Macropad w/ proton-c fixes
* Basic Clueboard Californai Macropad shield definition. * New "direct" KSCAN driver that supports non-matrix direct wiring for switches, needed for macropad that doesn't have a matrix at all. * Some renames for existing KSCAN GPIO driver to make the implied "matrix" part explicit.
This commit is contained in:
@@ -4,6 +4,7 @@ if(CONFIG_ZMK_KSCAN_GPIO_DRIVER)
|
||||
|
||||
zephyr_library()
|
||||
zephyr_library_sources(
|
||||
kscan_gpio.c
|
||||
kscan_gpio_matrix.c
|
||||
kscan_gpio_direct.c
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -3,6 +3,14 @@ config ZMK_KSCAN_GPIO_DRIVER
|
||||
default y
|
||||
select GPIO
|
||||
|
||||
if ZMK_KSCAN_GPIO_DRIVER
|
||||
|
||||
config ZMK_KSCAN_GPIO_POLLING
|
||||
bool "Poll for key event triggers instead of using interrupts"
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
config ZMK_KSCAN_INIT_PRIORITY
|
||||
int "Keyboard scan driver init priority"
|
||||
default 40
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
description: GPIO keyboard matrix controller
|
||||
|
||||
compatible: "gpio-kscan"
|
||||
compatible: "zmk,kscan-gpio-matrix"
|
||||
|
||||
include: kscan.yaml
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#define DT_DRV_COMPAT gpio_kscan
|
||||
#define DT_DRV_COMPAT zmk_kscan_gpio_matrix
|
||||
|
||||
#include <device.h>
|
||||
#include <drivers/kscan.h>
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
|
||||
|
||||
struct kscan_gpio_item_config
|
||||
{
|
||||
char *label;
|
||||
@@ -254,3 +256,5 @@ static int kscan_gpio_config_interrupts(struct device **devices,
|
||||
&gpio_driver_api_##n);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(GPIO_INST_INIT)
|
||||
|
||||
#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */
|
||||
Reference in New Issue
Block a user