Skip to content

Commit

Permalink
Looking good
Browse files Browse the repository at this point in the history
  • Loading branch information
bullwinkle3000 committed Jan 4, 2025
1 parent 4be13da commit 078a06c
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 290 deletions.
59 changes: 38 additions & 21 deletions .idea/workspace.xml

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

44 changes: 12 additions & 32 deletions config/boards/shields/wyld_dm/wyld_dm.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@

// columns for Skree Pico Breakout, matrix cols starts at GP3 while thumb cols start at GP2
map = <
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
RC(5,4) RC(5,13) RC(5,10)
RC(5,5) RC(5,12) RC(5,9)
RC(5,6) RC(5,11) RC(5,8)
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,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6)
RC(3,7)
RC(3,8) RC(3,9)
>;
};

Expand All @@ -66,34 +64,16 @@
// label = "KSCAN";
diode-direction = "col2row";


row-gpios
= <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.9
, <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.9
, <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.07
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.02
;
// NANO V2 PINS


};

// 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";
// };
//
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_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";
};

sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&right_encoder>;
triggers-per-rotation = <15>;
};
};

42 changes: 21 additions & 21 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
# #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
79 changes: 7 additions & 72 deletions config/boards/shields/wyld_dm/wyld_dm_left.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -6,82 +6,17 @@
/// NANO V2 PINS

&kscan0 {
row-gpios
= <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.9
, <&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
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.04
;
// col-gpios
// = <&gpio0 31 GPIO_ACTIVE_HIGH> // 0.31
// , <&gpio0 29 GPIO_ACTIVE_HIGH> // 0.29
// , <&gpio0 2 GPIO_ACTIVE_HIGH> // 0.02
// , <&gpio1 15 GPIO_ACTIVE_HIGH> // 1.15
// , <&gpio1 13 GPIO_ACTIVE_HIGH> // 1.13
// , <&gpio1 11 GPIO_ACTIVE_HIGH> // 1.10
// , <&gpio0 10 (GPIO_ACTIVE_HIGH )> // 0.10
// ;

col-gpios
= <&gpio0 10 (GPIO_ACTIVE_HIGH )>
, <&gpio1 11 GPIO_ACTIVE_HIGH> // 1.10
, <&gpio1 13 GPIO_ACTIVE_HIGH> // 1.13
, <&gpio1 15 GPIO_ACTIVE_HIGH> // 1.15
, <&gpio0 2 GPIO_ACTIVE_HIGH> // 0.02
col-gpios
= <&gpio0 31 GPIO_ACTIVE_HIGH> // 0.31
, <&gpio0 29 GPIO_ACTIVE_HIGH> // 0.29
, <&gpio0 31 GPIO_ACTIVE_HIGH>
;
};

&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>;
};
, <&gpio0 2 GPIO_ACTIVE_HIGH> // 0.02
, <&gpio1 15 GPIO_ACTIVE_HIGH> // 1.15
, <&gpio1 13 GPIO_ACTIVE_HIGH> // 1.13
, <&gpio1 11 GPIO_ACTIVE_HIGH> // 1.10
;
};


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

//&left_encoder {
// status = "okay";
//};
Expand Down
21 changes: 19 additions & 2 deletions config/boards/shields/wyld_dm/wyld_dm_right.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,22 @@



CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=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
Loading

0 comments on commit 078a06c

Please sign in to comment.