Skip to content

Commit

Permalink
No logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bullwinkle3000 committed Oct 27, 2024
1 parent b01f3e9 commit 679e3e3
Show file tree
Hide file tree
Showing 10 changed files with 190 additions and 275 deletions.
85 changes: 51 additions & 34 deletions .idea/workspace.xml

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

8 changes: 4 additions & 4 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
---
include:
- board: nice_nano_v2
shield: wyld_dm_right nice_view
# snippet: zmk-usb-logging
shield: wyld_dm_right # nice_view
snippet: zmk-usb-logging
- board: nice_nano_v2
shield: wyld_dm_left nice_view
# snippet: zmk-usb-logging
shield: wyld_dm_left # nice_view
snippet: zmk-usb-logging
- board: nice_nano_v2
shield: settings_reset
2 changes: 1 addition & 1 deletion config/boards/shields/wyld_dm/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if SHIELD_WYLD_DM_RIGHT
if SHIELD_WYLD_DM_LEFT

config ZMK_KEYBOARD_NAME
default "Wyld DM"
Expand Down
61 changes: 8 additions & 53 deletions config/boards/shields/wyld_dm/wyld_dm.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <dt-bindings/zmk/matrix_transform.h>
#include <dt-bindings/led/led.h>


//wyld_dm_6x6 = <
Expand All @@ -26,7 +25,6 @@
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
zmk,underglow = &led_strip;
};

default_transform: keymap_transform_0 {
Expand All @@ -51,14 +49,14 @@
// >;

map = <
RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
RC(5,5) RC(5,4) RC(5,8)
RC(5,0) RC(5,3) RC(5,7)
RC(5,1) RC(5,2) 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,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
RC(5,0) RC(5,8) RC(5,11)
RC(5,1) RC(5,7) RC(5,10)
RC(5,2) RC(5,6) RC(5,9)
>;
};

Expand Down Expand Up @@ -98,46 +96,3 @@
// };
};

&pinctrl {

spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 25)>,
<NRF_PSEL(SPIM_MOSI, 0, 24)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 25)>,
<NRF_PSEL(SPIM_MOSI, 0, 24)>;
low-power-enable;
};
};
};


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

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <61>; /* number of LEDs */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};
32 changes: 20 additions & 12 deletions config/boards/shields/wyld_dm/wyld_dm_left.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#enable mouse emulation
# CONFIG_ZMK_MOUSE=y
# CONFIG_SPI=y
# # CONFIG_INPUT=y
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 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_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
51 changes: 36 additions & 15 deletions config/boards/shields/wyld_dm/wyld_dm_left.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

&kscan0 {
row-gpios
= <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.10
= <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.10
, <&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
Expand All @@ -26,29 +26,50 @@
};

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

nice_view_spi: &spi0 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;

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

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


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

//&left_encoder {
Expand Down
21 changes: 2 additions & 19 deletions config/boards/shields/wyld_dm/wyld_dm_right.conf
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
#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_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
Loading

0 comments on commit 679e3e3

Please sign in to comment.