diff --git a/boards/shields/vik_cirque_spi_split/Kconfig.defconfig b/boards/shields/vik_cirque_spi_split/Kconfig.defconfig new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/vik_cirque_spi_split/Kconfig.shield b/boards/shields/vik_cirque_spi_split/Kconfig.shield new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split.dtsi b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split.dtsi new file mode 100644 index 0000000..5317b31 --- /dev/null +++ b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split.dtsi @@ -0,0 +1,11 @@ +/ { + split_inputs { + #address-cells = <1>; + #size-cells = <0>; + + glidepoint_split: glidepoint_split@0 { + compatible = "zmk,input-split"; + reg = <0>; + }; + }; +}; diff --git a/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split.zmk.yml b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split.zmk.yml new file mode 100644 index 0000000..d6ce684 --- /dev/null +++ b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split.zmk.yml @@ -0,0 +1,8 @@ +file_format: "1" +id: vik_cirque_spi_split +name: vik_cirque_spi_split +type: shield +url: https://github.com/sadekbaroudi/vik/ +siblings: + - vik_cirque_split_split_central + - vik_cirque_split_split_peripheral diff --git a/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_central.overlay b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_central.overlay new file mode 100644 index 0000000..e2bf709 --- /dev/null +++ b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_central.overlay @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "../vik_shield_dts_preprocess.h" +#include "vik_cirque_spi_split.dtsi" + +#include +#include + +/ { + glidepoint_input_listener: glidepoint_input { + compatible = "zmk,input-listener"; + device = <&glidepoint_split>; + + // input-processors = <&xy_transform (INPUT_TRANSFORM_XY_SWAP | INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT) &xy_scaler 3 2>; + }; +}; diff --git a/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_peripheral.conf b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_peripheral.conf new file mode 100644 index 0000000..9a1ba46 --- /dev/null +++ b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_peripheral.conf @@ -0,0 +1,2 @@ +CONFIG_SPI=y +CONFIG_ZMK_MOUSE=y \ No newline at end of file diff --git a/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_peripheral.overlay b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_peripheral.overlay new file mode 100644 index 0000000..8fa1243 --- /dev/null +++ b/boards/shields/vik_cirque_spi_split/vik_cirque_spi_split_peripheral.overlay @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "../vik_shield_dts_preprocess.h" +#include "vik_cirque_spi_split.dtsi" + +#include +#include +#include + +&vik_spi { + status = "okay"; + cs-gpios = VIK_SPI_CS_PREFIX_PROCESSED <&vik_conn 6 GPIO_ACTIVE_LOW>; + + glidepoint: glidepoint@VIK_SPI_REG_START { + compatible = "cirque,pinnacle"; + reg = ; + spi-max-frequency = <1000000>; + status = "okay"; + dr-gpios = <&vik_conn 5 (GPIO_ACTIVE_HIGH)>; // DR pin on cirque is always &vik_conn 5 + + sensitivity = "1x"; + }; +}; + +&glidepoint_split { + device = <&glidepoint>; + // Input processors that are run before event data is sent + // to the central. Mostly useful for orientation fix ups. + input-processors = <&zip_xy_transform (INPUT_TRANSFORM_XY_SWAP | INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT)>; +};