From 555e51f454f15a7690b6470fc3149d1caf125137 Mon Sep 17 00:00:00 2001 From: Alyx Brett Date: Sun, 24 Apr 2022 22:21:05 +0100 Subject: [PATCH] revert clang-format --- .../shields/reviung34/Kconfig.defconfig | 9 +- app/boards/shields/reviung34/Kconfig.shield | 7 +- .../reviung34/boards/nice_nano_v2.overlay | 41 +++--- app/boards/shields/reviung34/reviung34.keymap | 127 +++++++++--------- .../shields/reviung34/reviung34.overlay | 49 ++++--- .../shields/reviung34/reviung34.zmk.yml | 13 +- 6 files changed, 135 insertions(+), 111 deletions(-) diff --git a/app/boards/shields/reviung34/Kconfig.defconfig b/app/boards/shields/reviung34/Kconfig.defconfig index 73fada91..534ad852 100644 --- a/app/boards/shields/reviung34/Kconfig.defconfig +++ b/app/boards/shields/reviung34/Kconfig.defconfig @@ -1,8 +1,9 @@ -#Copyright(c) 2020 The ZMK Contributors -#SPDX - License - Identifier : MIT +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT if SHIELD_REVIUNG34 -config ZMK_KEYBOARD_NAME default "Reviung34" +config ZMK_KEYBOARD_NAME + default "Reviung34" - endif \ No newline at end of file +endif \ No newline at end of file diff --git a/app/boards/shields/reviung34/Kconfig.shield b/app/boards/shields/reviung34/Kconfig.shield index c9e1b507..6f4da7db 100644 --- a/app/boards/shields/reviung34/Kconfig.shield +++ b/app/boards/shields/reviung34/Kconfig.shield @@ -1,5 +1,6 @@ -#Copyright(c) 2020 The ZMK Contributors -#SPDX - License - Identifier : MIT +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT -config SHIELD_REVIUNG34 def_bool $(shields_list_contains, reviung34) \ No newline at end of file +config SHIELD_REVIUNG34 + def_bool $(shields_list_contains,reviung34) \ No newline at end of file diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay index 6f8c481a..ea1e5519 100644 --- a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay @@ -1,30 +1,31 @@ #include &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; - mosi - pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck - pin = <5>; - miso - pin = <7>; + compatible = "nordic,nrf-spim"; + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; -led_strip: - ws2812 @0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi - max - frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain - length = <9>; /* arbitrary; change at will */ - spi - one - frame = <0x70>; - spi - zero - frame = <0x40>; - color - mapping = ; - }; + /* WS2812 */ + chain-length = <9>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; }; / { - chosen { zmk, underglow = &led_strip; }; + chosen { + zmk,underglow = &led_strip; + }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.keymap b/app/boards/shields/reviung34/reviung34.keymap index 688ee525..18758fae 100644 --- a/app/boards/shields/reviung34/reviung34.keymap +++ b/app/boards/shields/reviung34/reviung34.keymap @@ -10,76 +10,83 @@ #include #include + + #define DEFAULT 0 #define SYMNUM 1 #define NAVFN 2 #define CONFIG 3 -&mt { tapping - term - ms = <165>; }; +&mt { + tapping-term-ms = <165>; +}; -/ { +/ { macros { - ZMK_MACRO(save, wait - ms = <30>; tap - ms = <40>; - bindings = <¯o_tap & kp ESC & kp COLON & kp W & kp RET>;) + ZMK_MACRO(save, + wait-ms = <30>; + tap-ms = <40>; + bindings = <¯o_tap &kp ESC &kp COLON &kp W &kp RET>; + ) }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // ------------------------------------------------------------------------------------------- - // | B | Y | O | U | | L | D | W | V - // | | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | - // RGUI(N) | | G | X | J | K | | R | M | F - // | P | - // | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | - bindings = - <&kp B & kp Y & kp O & kp U & none & none & kp L & kp D & kp W & kp V & mt LGUI C & - mt LALT I & mt LSHFT E & mt LCTRL A & none & none & mt RCTRL H & mt RSHFT T & - mt RALT S & mt RGUI N & kp G & kp X & kp J & kp K & none & none & kp R & kp M & - kp F & kp P & kp RET & lt NAVFN SPACE & lt SYMNUM BSPC & lt CONFIG ESC>; - }; + default_layer { +// ------------------------------------------------------------------------------------------- +// | B | Y | O | U | | L | D | W | V | +// | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | RGUI(N) | +// | G | X | J | K | | R | M | F | P | +// | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | + bindings = < + &kp B &kp Y &kp O &kp U &none &none &kp L &kp D &kp W &kp V + &mt LGUI C &mt LALT I &mt LSHFT E &mt LCTRL A &none &none &mt RCTRL H &mt RSHFT T &mt RALT S &mt RGUI N + &kp G &kp X &kp J &kp K &none &none &kp R &kp M &kp F &kp P + &kp RET < NAVFN SPACE < SYMNUM BSPC < CONFIG ESC + >; + }; - symnum_layer { - // ------------------------------------------------------------------------------------------- - // | | ` | \ | / | | 1 | 2 | 3 | 4 - // | | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | - // RGUI(8) | | = | ; | [ | ] | | 9 | 0 | Z - // | Q | - // | SAVE | TAB | | | | - bindings = <&none & kp GRAVE & kp BSLH & kp FSLH & none & none & kp N1 & kp N2 & kp N3 & - kp N4 & mt LGUI SQT & mt LALT MINUS & mt LSHFT COMMA & mt LCTRL DOT & none & - none & mt RCTRL N5 & mt RSHFT N6 & mt RALT N7 & mt RGUI N8 & kp EQUAL & - kp SEMI & kp LBKT & kp RBKT & none & none & kp N9 & kp N0 & kp Z & kp Q & - save & kp TAB & trans & none>; + symnum_layer { +// ------------------------------------------------------------------------------------------- +// | | ` | \ | / | | 1 | 2 | 3 | 4 | +// | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | RGUI(8) | +// | = | ; | [ | ] | | 9 | 0 | Z | Q | +// | SAVE | TAB | | | | + bindings = < + &none &kp GRAVE &kp BSLH &kp FSLH &none &none &kp N1 &kp N2 &kp N3 &kp N4 + &mt LGUI SQT &mt LALT MINUS &mt LSHFT COMMA &mt LCTRL DOT &none &none &mt RCTRL N5 &mt RSHFT N6 &mt RALT N7 &mt RGUI N8 + &kp EQUAL &kp SEMI &kp LBKT &kp RBKT &none &none &kp N9 &kp N0 &kp Z &kp Q + &save &kp TAB &trans &none + >; + }; + + navfn_layer { +// ------------------------------------------------------------------------------------------- +// | | | | | | F1 | F2 | F3 | F4 | +// | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | RALT(F7) | RGUI(F8) | +// | HOME | PGDN | PGUP | END | | F9 | F10 | F11 | F12 | +// | | | | DEL | | + bindings = < + &none &none &none &none &none &none &kp F1 &kp F2 &kp F3 &kp F4 + &mt LGUI LEFT &mt LALT DOWN &mt LSHFT UP &mt LCTRL RIGHT &none &none &mt RCTRL F5 &mt RSHFT F6 &mt RALT F7 &mt RGUI F8 + &kp HOME &kp PG_DN &kp PG_UP &kp END &none &none &kp F9 &kp F10 &kp F11 &kp F12 + &none &trans &kp DEL &caps_word + >; + }; + + config_layer { +// ----------------------------------------------------------------------------------------- +// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | +// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | +// | | | | RGB TOG | | BT CLR | | | RESET | +// | | | | | | + bindings = < + &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 + &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &bt BT_SEL 4 &none &none &none + &none &none &none &rgb_ug RGB_TOG &none &none &bt BT_CLR &none &out OUT_TOG &reset + &trans &trans &trans &trans + >; + }; }; - - navfn_layer { - // ------------------------------------------------------------------------------------------- - // | | | | | | F1 | F2 | F3 | F4 - // | | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | - // RALT(F7) | RGUI(F8) | | HOME | PGDN | PGUP | END | | F9 - // | F10 | F11 | F12 | - // | | | | DEL | | - bindings = <&none & none & none & none & none & none & kp F1 & kp F2 & kp F3 & kp F4 & - mt LGUI LEFT & mt LALT DOWN & mt LSHFT UP & mt LCTRL RIGHT & none & none & - mt RCTRL F5 & mt RSHFT F6 & mt RALT F7 & mt RGUI F8 & kp HOME & kp PG_DN & - kp PG_UP & kp END & none & none & kp F9 & kp F10 & kp F11 & kp F12 & none & - trans & kp DEL & caps_word>; - }; - - config_layer { - // ----------------------------------------------------------------------------------------- - // | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | - // | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | - // | | | | RGB TOG | | BT CLR | | | RESET | - // | | | | | | - bindings = - <&rgb_ug RGB_BRI & rgb_ug RGB_SAI & rgb_ug RGB_HUI & rgb_ug RGB_EFF & none & none & - bt BT_SEL 0 & bt BT_SEL 1 & bt BT_SEL 2 & bt BT_SEL 3 & rgb_ug RGB_BRD & - rgb_ug RGB_SAD & rgb_ug RGB_HUD & rgb_ug RGB_EFR & none & none & bt BT_SEL 4 & - none & none & none & none & none & none & rgb_ug RGB_TOG & none & none & - bt BT_CLR & none & out OUT_TOG & reset & trans & trans & trans & trans>; - }; - }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay index 134d22e4..2c8b72bd 100644 --- a/app/boards/shields/reviung34/reviung34.overlay +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -8,37 +8,46 @@ / { chosen { - zmk, kscan = &kscan0; - zmk, matrix_transform = &default_transform; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; }; -default_transform: - keymap_transform_0 { + default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <10>; rows = <4>; - map = ; + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(3,9) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(3,6) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(3,7) + RC(3,2) RC(3,3) RC(3,4) RC(3,8) + >; }; -kscan0: - kscan_0 { + kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - diode - direction = "col2row"; + diode-direction = "col2row"; - col - gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>, <&pro_micro 5 GPIO_ACTIVE_HIGH>, - <&pro_micro 6 GPIO_ACTIVE_HIGH>, <&pro_micro 7 GPIO_ACTIVE_HIGH>, - <&pro_micro 8 GPIO_ACTIVE_HIGH>, <&pro_micro 9 GPIO_ACTIVE_HIGH>, - <&pro_micro 14 GPIO_ACTIVE_HIGH>, <&pro_micro 16 GPIO_ACTIVE_HIGH>, - <&pro_micro 10 GPIO_ACTIVE_HIGH>, <&pro_micro 15 GPIO_ACTIVE_HIGH>; + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + ; - row - gpios = <&pro_micro 21(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, - <&pro_micro 20(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, - <&pro_micro 19(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, - <&pro_micro 18(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.zmk.yml b/app/boards/shields/reviung34/reviung34.zmk.yml index a3273a75..76ed745d 100644 --- a/app/boards/shields/reviung34/reviung34.zmk.yml +++ b/app/boards/shields/reviung34/reviung34.zmk.yml @@ -1,4 +1,9 @@ -file_format : "1" id : reviung34 name : REVIUNG34 type : shield url : https - : // github.com/gtips/reviung/tree/master/reviung34 - requires - : [pro_micro] features : -keys - underglow +file_format: "1" +id: reviung34 +name: REVIUNG34 +type: shield +url: https://github.com/gtips/reviung/tree/master/reviung34 +requires: [pro_micro] +features: + - keys + - underglow