diff --git a/boards/shields/imprint/Kconfig.defconfig b/boards/shields/imprint/Kconfig.defconfig index f0bce44..0840044 100644 --- a/boards/shields/imprint/Kconfig.defconfig +++ b/boards/shields/imprint/Kconfig.defconfig @@ -16,10 +16,6 @@ config ZMK_POINTING config ZMK_SPLIT default y -endif - -if SHIELD_IMPRINT_RIGHT - config SPI default y diff --git a/boards/shields/imprint/imprint.dtsi b/boards/shields/imprint/imprint.dtsi index e14495e..c841437 100644 --- a/boards/shields/imprint/imprint.dtsi +++ b/boards/shields/imprint/imprint.dtsi @@ -129,4 +129,9 @@ RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(9,1) RC(9,2) status = "disabled"; device = <&trackball_split>; }; + + trackball_central_listener: trackball_central_listener { + compatible = "zmk,input-listener"; + status = "disabled"; + }; }; diff --git a/boards/shields/imprint/imprint_left.conf b/boards/shields/imprint/imprint_left.conf index e69de29..46ea958 100644 --- a/boards/shields/imprint/imprint_left.conf +++ b/boards/shields/imprint/imprint_left.conf @@ -0,0 +1,9 @@ +CONFIG_SPI=y +CONFIG_INPUT=y +CONFIG_ZMK_MOUSE=y +CONFIG_PMW3610=y +# CONFIG_PMW3610_SWAP_XY=y +# CONFIG_PMW3610_INVERT_X=y +# CONFIG_PMW3610_INVERT_Y=y +# CONFIG_PMW3610_REPORT_INTERVAL_MIN=12 +# CONFIG_PMW3610_LOG_LEVEL_DBG=y \ No newline at end of file diff --git a/boards/shields/imprint/imprint_left.overlay b/boards/shields/imprint/imprint_left.overlay index 9a098f8..ee9a778 100644 --- a/boards/shields/imprint/imprint_left.overlay +++ b/boards/shields/imprint/imprint_left.overlay @@ -14,4 +14,27 @@ &trackball_listener { status = "okay"; +}; + +#include +&spi1 { + cs-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; + + trackball_central: trackball_central@0 { + status = "okay"; + compatible = "pixart,pmw3610"; + reg = <0>; + spi-max-frequency = <2000000>; + irq-gpios = <&gpio0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + cpi = <600>; + evt-type = ; + x-input-code = ; + y-input-code = ; + }; +}; + +// Overrides for the input listener node +&trackball_central_listener { + status = "okay"; + device = <&trackball_central>; }; \ No newline at end of file