Skip to content

Commit

Permalink
pass at 4x6
Browse files Browse the repository at this point in the history
  • Loading branch information
bullwinkle3000 committed Oct 29, 2024
1 parent 6d0cff4 commit 3491004
Show file tree
Hide file tree
Showing 11 changed files with 134 additions and 184 deletions.
54 changes: 33 additions & 21 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions config/boards/shields/wyld_dm/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@ if SHIELD_WYLD_DM_LEFT || SHIELD_WYLD_DM_RIGHT
config ZMK_SPLIT
default y

config SPI
default y

endif
20 changes: 10 additions & 10 deletions config/boards/shields/wyld_dm/wyld_dm.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@

};

// left_encoder: encoder_left {
// compatible = "alps,ec11";
// label = "LEFT_ENCODER";
// a-gpios = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
// b-gpios = <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
// steps = <60>;
// status = "disabled";
// };
//
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
a-gpios = <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio1 00 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <60>;
status = "disabled";
};

right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_ENCODER";
Expand All @@ -92,7 +92,7 @@

sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&right_encoder>;
sensors = <&left_encoder>, <&right_encoder>;
triggers-per-rotation = <15>;
};
};
Expand Down
38 changes: 19 additions & 19 deletions config/boards/shields/wyld_dm/wyld_dm_left.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#enable mouse emulation

CONFIG_ZMK_MOUSE=y
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_LOG_LEVEL_DBG=y
# CONFIG_ZMK_MOUSE=y
# 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_LOG_LEVEL_DBG=y
52 changes: 3 additions & 49 deletions config/boards/shields/wyld_dm/wyld_dm_left.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
, <&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
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.04
// , <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.04
;
// col-gpios
// = <&gpio0 31 GPIO_ACTIVE_HIGH> // 0.31
Expand All @@ -35,56 +35,10 @@
;
};

&pinctrl {
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 6)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
<NRF_PSEL(SPIM_MISO, 0, 8)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 6)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
<NRF_PSEL(SPIM_MISO, 0, 8)>;
low-power-enable;
};
};
};


&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";

pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
trackball: trackball@0 {
status = "okay";
compatible = "pixart,pmw3610";
reg = <0>;
spi-max-frequency = <1000000>;
irq-gpios = <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
snipe-layers = <1>;
scroll-layers = <2>;
automouse-layer = <3>;
};
&left_encoder {
status = "okay";
};


/ {
pmw3610_listener {
compatible = "zmk,input-listener";
device = <&trackball>;
};
};

//&left_encoder {
// status = "okay";
//};



4 changes: 0 additions & 4 deletions config/boards/shields/wyld_dm/wyld_dm_right.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
#enable mouse emulation



CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
2 changes: 1 addition & 1 deletion config/boards/shields/wyld_dm/wyld_dm_right.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
, <&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
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.04
// , <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.04
;
// col-gpios
// = <&gpio0 31 GPIO_ACTIVE_HIGH> // 0.31
Expand Down
39 changes: 17 additions & 22 deletions config/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,40 +58,35 @@
{ "row": 3, "col": 12, "x": 16, "y": 3.5, "label": "9,4" },
{ "row": 3, "col": 13, "x": 17, "y": 3.5, "label": "9,5" },

{ "row": 4, "col": 0, "x": 0, "y": 4.5, "label": "4,0" },
{ "row": 4, "col": 1, "x": 1, "y": 4.5, "label": "4,1" },
{ "row": 4, "col": 2, "x": 2, "y": 4, "label": "4,2" },
{ "row": 4, "col": 3, "x": 3, "y": 4, "label": "4,3" },
{ "row": 4, "col": 4, "x": 4, "y": 4, "label": "4,4" },
{ "row": 4, "col": 5, "x": 5, "y": 4, "label": "4,5" },
{ "row": 4, "col": 7, "x": 12, "y": 4, "label": "10,0" },
{ "row": 4, "col": 8, "x": 13, "y": 4, "label": "10,1" },
{ "row": 4, "col": 9, "x": 14, "y": 4, "label": "10,2" },
{ "row": 4, "col": 10, "x": 15, "y": 4, "label": "10,3" },
{ "row": 4, "col": 11, "x": 16, "y": 4.5, "label": "10,4" },
{ "row": 4, "col": 12, "x": 17, "y": 4.5, "label": "10,5" },
{ "row": 4, "col": 0, "x": 4.75, "y": 4.25, "label": "4,0" },
{ "row": 4, "col": 8, "x": 11, "y": 4.25, "label": "10,2" },
{ "row": 4, "col": 9, "x": 12, "y": 4.25, "label": "10,5" },

{ "row": 5, "col": 0, "x": 4.75, "y": 5.25, "label": "5,0" },
{ "row": 5, "col": 8, "x": 11, "y": 5.25, "label": "11,2" },
{ "row": 5, "col": 9, "x": 12, "y": 5.25, "label": "11,5" },
{ "row": 5, "col": 1, "x": 5.75, "y": 5.25, "label": "4,1" },
{ "row": 5, "col": 9, "x": 10.5, "y": 5.25, "label": "10,1" },
{ "row": 5, "col": 10, "x": 11.5, "y": 5.25, "label": "10,4" },

{ "row": 6, "col": 1, "x": 5.75, "y": 6.25, "label": "5,1" },
{ "row": 6, "col": 9, "x": 10.5, "y": 6.25, "label": "11,1" },
{ "row": 6, "col": 10, "x": 11.5, "y": 6.25, "label": "11,4" },

{ "row": 7, "col": 3, "x": 6.75, "y": 7.25, "label": "5,2" },
{ "row": 7, "col": 10, "x": 10, "y": 7.25, "label": "11,0" },
{ "row": 7, "col": 11, "x": 11, "y": 7.25, "label": "11,3" }
{ "row": 6, "col": 3, "x": 6.75, "y": 6.25, "label": "4,2" },
{ "row": 6, "col": 10, "x": 10, "y": 6.25, "label": "10,0" },
{ "row": 6, "col": 11, "x": 11, "y": 6.25, "label": "10,3" }
]
}
},
"sensors": [
{
"ref": "left_encoder",
"name": "encoder_left",
"identifier": "encoder_left",
"compatible": "alps,ec11",
"label": "LEFT_ENCODER"
},,
{
"ref": "right_encoder",
"name": "encoder_right",
"identifier": "encoder_right",
"compatible": "alps,ec11",
"label": "RIGHT_ENCODER"
}
]

}
40 changes: 20 additions & 20 deletions config/west.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
#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
path: config

#manifest:
# remotes:
# - name: zmkfirmware
# url-base: https://github.com/petejohanson
# - name: inorichi
# url-base: https://github.com/inorichi
# projects:
# - name: zmk
# remote: zmkfirmware
# revision: feat/pointers-move-scroll
# import: app/west.yml
# - name: zmk-pmw3610-driver
# remote: inorichi
# revision: main
# self:
# path: config
4 changes: 2 additions & 2 deletions config/wyld_dm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=3000
# 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
Expand Down
Loading

0 comments on commit 3491004

Please sign in to comment.