Skip to content

Commit

Permalink
Final pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
bullwinkle3000 committed Jan 6, 2025
1 parent ab93014 commit 94f9e05
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 149 deletions.
8 changes: 6 additions & 2 deletions .idea/workspace.xml

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

65 changes: 0 additions & 65 deletions config/boards/nice_nano_v2.overlay
Original file line number Diff line number Diff line change
@@ -1,69 +1,4 @@
#include <dt-bindings/led/led.h>

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

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

// spi2_default: spi2_default {
// group1 {
// psels = <NRF_PSEL(SPIM_SCK, 1, 0)>,
// <NRF_PSEL(SPIM_MISO, 0, 22)>,
// <NRF_PSEL(SPIM_MOSI, 0, 24)>;
// };
// };
// spi2_sleep: spi2_sleep {
// group1 {
// psels = <NRF_PSEL(SPIM_SCK, 1, 0)>,
// <NRF_PSEL(SPIM_MISO, 0, 22)>,
// <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 = <40>; /* 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>;
};
};


/ {
chosen {
zmk,underglow = &led_strip;
};
};

&pro_micro_i2c {
status = "okay";
Expand Down
52 changes: 0 additions & 52 deletions config/boards/pillbug.overlay
Original file line number Diff line number Diff line change
@@ -1,50 +1,3 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>, // 1.8
<NRF_PSEL(SPIM_MOSI, 1, 9)>; // 0.26
// <NRF_PSEL(SPIM_MISO, 0, 26)>; // 0.26
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>, // 1.8
<NRF_PSEL(SPIM_MOSI, 1, 9)>; // 0.26
// <NRF_PSEL(SPIM_MISO, 0, 26)>; // 0.26
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 = <40>; /* 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>;
};
};



//&blackpill_i2c {
Expand Down Expand Up @@ -75,10 +28,5 @@
status = "disabled";
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};


2 changes: 0 additions & 2 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 Down Expand Up @@ -27,7 +26,6 @@
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
zephyr,display = &oled;
zmk,underglow = &led_strip;
};

default_transform: keymap_transform_0 {
Expand Down
1 change: 0 additions & 1 deletion config/boards/shields/wyld_dm/wyld_dm_left.overlay
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// wyld_dm_left.overlay

#include "wyld_dm.dtsi"
#include <dt-bindings/led/led.h>


/// NANO V2 PINS
Expand Down
1 change: 0 additions & 1 deletion config/boards/shields/wyld_dm/wyld_dm_right.overlay
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// wyld_dm_right.overlay

#include "wyld_dm.dtsi"
#include <dt-bindings/led/led.h>

&default_transform {
col-offset = <7>;
Expand Down
14 changes: 7 additions & 7 deletions config/wyld_dm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=180000

# CONFIG_ZMK_USB_LOGGING=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=0
# 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=0

# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=3000

Expand Down
22 changes: 3 additions & 19 deletions config/wyld_dm.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* SPDX-License-Identifier: MIT
*/

#include <dt-bindings/led/led.h>
//#include <dt-bindings/led/led.h>
#include <behaviors/mouse_keys.dtsi>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/mouse.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/rgb.h>
//#include <dt-bindings/zmk/rgb.h>

// triggering build

Expand All @@ -22,19 +22,6 @@

//# 4x6 with encoders
/ {
behaviors {
rgb_encoder_bright: rgb_encoder_bright {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>;
};

rgb_encoder_hue: rgb_encoder_hue {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&rgb_ug RGB_HUI>, <&rgb_ug RGB_HUD>;
};
};

keymap {
compatible = "zmk,keymap";
Expand Down Expand Up @@ -72,7 +59,7 @@

>;

sensor-bindings = <&rgb_encoder_bright &rgb_encoder_hue>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>;

};

Expand Down Expand Up @@ -113,8 +100,5 @@
};


&led_strip {
chain-length = <40>;
};


0 comments on commit 94f9e05

Please sign in to comment.