aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjack <[email protected]>2022-12-05 15:02:17 -0700
committerjack <[email protected]>2022-12-05 15:02:17 -0700
commit5cfebb4b08c16e644179522b6cbc82954ac3abf3 (patch)
tree495e78ee62118bcfcb8c81adb4a8e92f93de44f0
parent3ea0f9f2f4009cf2dcbfa478876d1fa867c416ce (diff)
downloadzmk_build-5cfebb4b08c16e644179522b6cbc82954ac3abf3.tar.gz
zmk_build-5cfebb4b08c16e644179522b6cbc82954ac3abf3.zip
add revxlp
-rwxr-xr-xbuild.sh17
-rw-r--r--config/corne.keymap2
-rw-r--r--revxlp/Kconfig.defconfig11
-rw-r--r--revxlp/Kconfig.shield6
-rw-r--r--revxlp/boards/seeeduino_xiao_ble.conf1
-rw-r--r--revxlp/boards/seeeduino_xiao_ble.overlay3
-rw-r--r--revxlp/revxlp.conf3
-rw-r--r--revxlp/revxlp.overlay75
-rw-r--r--revxlp/revxlp.zmk.yml7
-rw-r--r--util.h (renamed from config/util.h)0
10 files changed, 123 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 7b46797..b5969fe 100755
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,7 @@
#!/bin/sh
ZSDK_VERSION=0.13.2
ZEN_BRANCH=Board-Corne-ish-Zen-dedicated-work-queue
+LINK=~/waffle_git/zmk/app/boards/shields/revxlp
CONFIG_DIR=~/waffle_git/zmk-build/config
ZMK_DIR=~/waffle_git/zmk
UF2=~/*.uf2
@@ -27,7 +28,7 @@ fi
echo -e "\n"
PS3="choose keyboard to build: "
-options=("corne" "corne-ish zen" "quit")
+options=("corne" "corne-ish zen" "revxlp" "quit")
select opt in "${options[@]}"
do
case $opt in
@@ -65,6 +66,20 @@ do
rm config/corne-ish_zen.keymap
break
;;
+ "revxlp")
+ echo "building revxlp firmware..."
+ test_uf2
+ cp config/corne.keymap revxlp/revxlp.keymap
+ if ! [ -L $LINK]; then
+ ln -s ~/waffle_git/zmk-build/revxlp $LINK
+ fi
+ (cd ${ZMK_DIR}/app
+ west build -p -b seeeduino_xiao_ble -- -DSHIELD=revxlp
+ cp ${ZMK_DIR}/app/build/zephyr/zmk.uf2 ~/revxlp.uf2
+ )
+ rm revxlp/revxlp.keymap
+ break
+ ;;
"quit")
break
;;
diff --git a/config/corne.keymap b/config/corne.keymap
index b85cd53..c039f69 100644
--- a/config/corne.keymap
+++ b/config/corne.keymap
@@ -4,7 +4,7 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
-#include "util.h"
+#include "../util.h"
&lt {
tapping-term-ms = <100>;
diff --git a/revxlp/Kconfig.defconfig b/revxlp/Kconfig.defconfig
new file mode 100644
index 0000000..e59d563
--- /dev/null
+++ b/revxlp/Kconfig.defconfig
@@ -0,0 +1,11 @@
+# Copyright (c) 2022 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+if SHIELD_REVXLP
+config ZMK_KEYBOARD_NAME
+ default "revxlp"
+if ZMK_BACKLIGHT
+config LED_GPIO
+ default y
+endif # ZMK_BACKLIGHT
+endif
diff --git a/revxlp/Kconfig.shield b/revxlp/Kconfig.shield
new file mode 100644
index 0000000..bc023dd
--- /dev/null
+++ b/revxlp/Kconfig.shield
@@ -0,0 +1,6 @@
+# Copyright (c) 2022 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+config SHIELD_REVXLP
+ def_bool $(shields_list_contains,revxlp)
+ select SPI
diff --git a/revxlp/boards/seeeduino_xiao_ble.conf b/revxlp/boards/seeeduino_xiao_ble.conf
new file mode 100644
index 0000000..5616bfc
--- /dev/null
+++ b/revxlp/boards/seeeduino_xiao_ble.conf
@@ -0,0 +1 @@
+CONFIG_SPI=y
diff --git a/revxlp/boards/seeeduino_xiao_ble.overlay b/revxlp/boards/seeeduino_xiao_ble.overlay
new file mode 100644
index 0000000..5cd88ae
--- /dev/null
+++ b/revxlp/boards/seeeduino_xiao_ble.overlay
@@ -0,0 +1,3 @@
+&xiao_spi {
+ miso-pin = <6>;
+};
diff --git a/revxlp/revxlp.conf b/revxlp/revxlp.conf
new file mode 100644
index 0000000..289f070
--- /dev/null
+++ b/revxlp/revxlp.conf
@@ -0,0 +1,3 @@
+# Uncomment the following lines to enable RGB underglow
+# CONFIG_ZMK_RGB_UNDERGLOW=y
+# CONFIG_WS2812_STRIP=y
diff --git a/revxlp/revxlp.overlay b/revxlp/revxlp.overlay
new file mode 100644
index 0000000..9a526e9
--- /dev/null
+++ b/revxlp/revxlp.overlay
@@ -0,0 +1,75 @@
+//Copyright (c) 2022 The ZMK Contributors
+//SPDX-License-Identifier: MIT
+
+#include <dt-bindings/zmk/matrix_transform.h>
+
+&xiao_serial { status = "disabled"; };
+
+&xiao_spi {
+ status = "okay";
+ cs-gpios = <&xiao_d 9 GPIO_ACTIVE_LOW>;
+ shifter: 595@0 {
+ compatible = "zmk,gpio-595";
+ status = "okay";
+ gpio-controller;
+ spi-max-frequency = <200000>;
+ reg = <0>;
+ label = "4HC595";
+ #gpio-cells = <2>;
+ ngpios = <8>;
+ };
+};
+
+/ {
+ chosen {
+ zmk,kscan = &kscan0;
+ zmk,matrix_transform = &default_transform;
+ zmk,backlight = &backlight;
+ };
+
+ backlight: backlight_leds {
+ compatible = "gpio-leds";
+ led_mosfet {
+ gpios = <&xiao_d 7 GPIO_ACTIVE_LOW>;
+ label = "Backlight LED 0";
+ };
+ };
+
+ default_transform: keymap_transform_0 {
+ compatible = "zmk,matrix-transform";
+ columns = <6>;
+ rows = <7>;
+
+ map = <
+RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0)
+RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0)
+RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(5,5) RC(5,4) RC(5,3) RC(5,2) RC(5,1) RC(5,0)
+ RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
+ >;
+ };
+
+ kscan0: kscan_0 {
+ compatible = "zmk,kscan-gpio-matrix";
+ label = "KSCAN";
+ diode-direction = "col2row";
+
+ col-gpios
+ = <&shifter 7 GPIO_ACTIVE_HIGH>
+ , <&shifter 6 GPIO_ACTIVE_HIGH>
+ , <&shifter 5 GPIO_ACTIVE_HIGH>
+ , <&shifter 4 GPIO_ACTIVE_HIGH>
+ , <&shifter 3 GPIO_ACTIVE_HIGH>
+ , <&shifter 2 GPIO_ACTIVE_HIGH>
+ ;
+
+ row-gpios
+ = <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&xiao_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&xiao_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&xiao_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ ;
+ };
+};
diff --git a/revxlp/revxlp.zmk.yml b/revxlp/revxlp.zmk.yml
new file mode 100644
index 0000000..64527ee
--- /dev/null
+++ b/revxlp/revxlp.zmk.yml
@@ -0,0 +1,7 @@
+file_format: "1"
+id: revxlp
+name: revxlp
+type: shield
+url: https://gitlab.com/lpgalaxy/revxlp
+features:
+ - keys
diff --git a/config/util.h b/util.h
index 4b83b6f..4b83b6f 100644
--- a/config/util.h
+++ b/util.h