From fa3bfd59b179a369e5dad7b40b08bfd7b862748f Mon Sep 17 00:00:00 2001 From: bullwinkle3000 <91431084+bullwinkle3000@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:10:31 -0400 Subject: [PATCH] steve's branch --- .idea/workspace.xml | 85 +++++++++++-------- config/boards/shields/wyld_dm/wyld_dm.dtsi | 42 ++------- .../shields/wyld_dm/wyld_dm_left.overlay | 4 +- .../boards/shields/wyld_dm/wyld_dm_right.conf | 26 +++--- .../shields/wyld_dm/wyld_dm_right.overlay | 22 +---- config/west.yml | 23 +---- config/wyld_dm.conf | 8 +- config/wyld_dm.keymap | 69 +++++++-------- 8 files changed, 112 insertions(+), 167 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1fd049a..1284eec 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -9,9 +9,15 @@ - - + + + + + + + + - @@ -613,7 +619,8 @@ - diff --git a/config/boards/shields/wyld_dm/wyld_dm.dtsi b/config/boards/shields/wyld_dm/wyld_dm.dtsi index 3775d1a..071d834 100644 --- a/config/boards/shields/wyld_dm/wyld_dm.dtsi +++ b/config/boards/shields/wyld_dm/wyld_dm.dtsi @@ -32,7 +32,7 @@ default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <12>; - rows = <6>; + rows = <5>; // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | @@ -50,15 +50,15 @@ // RC(5,5) RC(5,6) // >; + // 4x6 mini 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(0,9) RC(0,10) RC(0,11) - 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(1,9) RC(1,10) RC(1,11) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(4,4) RC(4,7) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) - RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,2) RC(4,3) RC(4,8) RC(4,9) - RC(5,2) RC(5,1) RC(5,8) - RC(5,4) RC(5,0) RC(5,7) - RC(5,3) RC(5,6) RC(5,6) + 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(0,9) RC(0,10) RC(0,11) + 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(1,9) RC(1,10) RC(1,11) + 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(2,9) RC(2,10) RC(2,11) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,2) RC(4,1) RC(4,0) RC(4,6) RC(4,7) RC(4,8) + RC(4,4) RC(4,3) RC(4,9) RC(4,10) + >; }; @@ -76,34 +76,10 @@ , <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.07 , <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.02 , <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.03 - , <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.04 ; }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - a-gpios = <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <60>; - status = "disabled"; - }; - - right_encoder: encoder_right { - compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; - a-gpios = <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <60>; - status = "disabled"; - }; - - sensors: sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&right_encoder>, <&left_encoder>; - triggers-per-rotation = <15>; - }; }; &pinctrl { diff --git a/config/boards/shields/wyld_dm/wyld_dm_left.overlay b/config/boards/shields/wyld_dm/wyld_dm_left.overlay index eb6ab3e..b7c1bc0 100644 --- a/config/boards/shields/wyld_dm/wyld_dm_left.overlay +++ b/config/boards/shields/wyld_dm/wyld_dm_left.overlay @@ -43,9 +43,7 @@ nice_view_spi: &spi0 { cs-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; }; -&left_encoder { - status = "okay"; -}; + diff --git a/config/boards/shields/wyld_dm/wyld_dm_right.conf b/config/boards/shields/wyld_dm/wyld_dm_right.conf index ab43b71..cc9b39f 100644 --- a/config/boards/shields/wyld_dm/wyld_dm_right.conf +++ b/config/boards/shields/wyld_dm/wyld_dm_right.conf @@ -4,19 +4,19 @@ CONFIG_PINCTRL=y CONFIG_SPI=y CONFIG_INPUT=y -CONFIG_PMW3610=y -CONFIG_PMW3610_CPI=2400 -CONFIG_PMW3610_CPI_DIVIDOR=4 -CONFIG_PMW3610_ORIENTATION_90=y -CONFIG_PMW3610_SNIPE_CPI=800 -CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=4 -CONFIG_PMW3610_SCROLL_TICK=32 -CONFIG_PMW3610_INVERT_X=y -CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=750 - -CONFIG_PMW3610_POLLING_RATE_125_SW=y - -CONFIG_PMW3610_SMART_ALGORITHM=y +# CONFIG_PMW3610=y +# CONFIG_PMW3610_CPI=2400 +# CONFIG_PMW3610_CPI_DIVIDOR=4 +# CONFIG_PMW3610_ORIENTATION_90=y +# CONFIG_PMW3610_SNIPE_CPI=800 +# CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=4 +# CONFIG_PMW3610_SCROLL_TICK=32 +# CONFIG_PMW3610_INVERT_X=y +# CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=750 +# +# CONFIG_PMW3610_POLLING_RATE_125_SW=y +# +# CONFIG_PMW3610_SMART_ALGORITHM=y diff --git a/config/boards/shields/wyld_dm/wyld_dm_right.overlay b/config/boards/shields/wyld_dm/wyld_dm_right.overlay index fdebcd7..666e440 100644 --- a/config/boards/shields/wyld_dm/wyld_dm_right.overlay +++ b/config/boards/shields/wyld_dm/wyld_dm_right.overlay @@ -22,9 +22,6 @@ ; }; -&right_encoder { - status = "okay"; -}; &pinctrl { spi0_default: spi0_default { @@ -47,29 +44,12 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi0_default>; pinctrl-1 = <&spi0_sleep>; pinctrl-names = "default", "sleep"; - cs-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, <&gpio0 6 GPIO_ACTIVE_LOW>; - trackball: trackball@1 { - status = "okay"; - compatible = "pixart,pmw3610"; - reg = <1>; - spi-max-frequency = <2000000>; - irq-gpios = <&gpio0 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; -// snipe-layers = <1>; -// scroll-layers = <2>; -// automouse-layer = <3>; - }; + cs-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; }; -/ { - pmw3610_listener { - compatible = "zmk,input-listener"; - device = <&trackball>; - }; -}; diff --git a/config/west.yml b/config/west.yml index 4ba395b..379d291 100644 --- a/config/west.yml +++ b/config/west.yml @@ -1,28 +1,11 @@ -#manifest: -# remotes: -# - name: zmkfirmware -# url-base: https://github.com/zmkfirmware -# projects: -# - name: zmk -# remote: zmkfirmware -# revision: main -# import: app/west.yml -# self: -# path: config - manifest: remotes: - name: zmkfirmware - url-base: https://github.com/petejohanson - - name: inorichi - url-base: https://github.com/inorichi + url-base: https://github.com/zmkfirmware projects: - name: zmk remote: zmkfirmware - revision: feat/pointers-move-scroll - import: app/west.yml - - name: zmk-pmw3610-driver - remote: inorichi revision: main + import: app/west.yml self: - path: config \ No newline at end of file + path: config diff --git a/config/wyld_dm.conf b/config/wyld_dm.conf index e6a1a96..dfbda4e 100644 --- a/config/wyld_dm.conf +++ b/config/wyld_dm.conf @@ -1,4 +1,4 @@ -CONFIG_ZMK_KEYBOARD_NAME="wyld_5x6_track" +CONFIG_ZMK_KEYBOARD_NAME="wyld_4x6_mini" CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_EXT_POWER=y # CONFIG_BT_LL_SW_LLCP_LEGACY=y @@ -14,7 +14,7 @@ CONFIG_ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS=10 CONFIG_PINCTRL=y CONFIG_GPIO=y -CONFIG_I2C=y +# CONFIG_I2C=y CONFIG_SPI=y # CONFIG_INPUT=y @@ -45,8 +45,8 @@ CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=2 # # -CONFIG_EC11=y -CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y #enable displays # CONFIG_ZMK_DISPLAY=y diff --git a/config/wyld_dm.keymap b/config/wyld_dm.keymap index dd80d5c..fda7bb6 100644 --- a/config/wyld_dm.keymap +++ b/config/wyld_dm.keymap @@ -11,7 +11,7 @@ #include #include #include -#include +//#include #include #include @@ -29,17 +29,15 @@ display-name = "QWERTY"; bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT - &kp CAPS &kp A &kp S &kp D &kp F &kp G &kp HOME &kp K_MUTE &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LBKT &kp RBKT &kp EQUAL &kp PLUS - &mo RAISE &kp SPACE &mo LOWER - &kp TAB &kp DEL &kp ENTER - &mkp LCLK &mkp RCLK &kp BSPC + &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT + &kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &mo RAISE &kp SPACE &kp BSPC &kp DEL &kp ENTER &mo LOWER + &kp TAB &kp LALT &kp RCTRL &kp RGUI >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>, <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; lower_layer { @@ -48,14 +46,12 @@ bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp F12 - &bootloader &rgb_ug RGB_ON &rgb_ug RGB_OFF &rgb_ug RGB_EFF &rgb_ug RGB_EFR &trans &kp HOME &kp K_MUTE &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &bootloader + &bootloader &rgb_ug RGB_ON &rgb_ug RGB_OFF &rgb_ug RGB_EFF &rgb_ug RGB_EFR &trans &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &bootloader &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans - &trans &trans &trans - &trans &trans &trans - &trans &trans &trans + &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>, <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; raise_layer { @@ -64,33 +60,30 @@ bindings = < &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &out OUT_BLE &out OUT_USB &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &trans &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_DIVIDE - &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp PGUP &kp LPAR &kp HOME &kp K_MUTE &kp RPAR &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_MULTIPLY + &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp PGUP &kp LPAR &kp RPAR &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_MULTIPLY &trans &trans &trans &trans &kp PGDN &trans &trans &trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_MINUS - &trans &trans &trans &trans - &trans &trans &trans - &trans &trans &trans - &trans &trans &trans + &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>, <&inc_dec_kp C_VOL_DN C_VOL_UP>; }; - mouse_layer { - display-name = "MOUSE"; - - bindings = < - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &mkp LCLK &mkp RCLK &trans &kp HOME &kp K_MUTE &trans &mkp LCLK &mkp RCLK &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans - &trans &trans &trans - &trans &trans &trans - &mkp LCLK &mkp RCLK &trans - >; - - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>, <&inc_dec_kp C_VOL_DN C_VOL_UP>; - }; +// mouse_layer { +// display-name = "MOUSE"; +// +// bindings = < +// &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +// &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +// &trans &trans &trans &mkp LCLK &mkp RCLK &trans &kp HOME &kp K_MUTE &trans &mkp LCLK &mkp RCLK &trans &trans &trans +// &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +// &trans &trans &trans &trans +// &trans &trans &trans +// &trans &trans &trans +// &mkp LCLK &mkp RCLK &trans +// >; +// +// sensor-bindings = <&inc_dec_kp PG_UP PG_DN>, <&inc_dec_kp C_VOL_DN C_VOL_UP>; +// }; }; };