Skip to content

Commit

Permalink
jorne OLED/RGB/keymap/overlay fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joric committed Jan 29, 2021
1 parent 5978990 commit fdfeea9
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
29 changes: 29 additions & 0 deletions app/boards/shields/jorne/boards/nrfmicro_13.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
&spi1 {
compatible = "nordic,nrf-spim";
/* Cannot be used together with i2c0. */
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;

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

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

/* WS2812 */
chain-length = <28>; /* There are per-key RGB, but the first 6 are underglow */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};
9 changes: 5 additions & 4 deletions app/boards/shields/jorne/jorne.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>

#define DEF 0
#define LWR 1
Expand Down Expand Up @@ -64,10 +65,10 @@
// | | | | | | | | | | | | | |
// | | | | | | | |
bindings = <
&reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
&none &none &none &none &none &none &none &none &none &none &none &none
&trans &none &trans &trans &none &trans
&reset &rgb_ug RGB_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &rgb_ug RGB_TOG &reset
&rgb_ug RGB_EFF &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &none &bootloader &bootloader &none &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF
&rgb_ug RGB_EFR &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &none &none &none &none &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR
&trans &bt BT_CLR &trans &trans &bt BT_CLR &trans
>;
};
};
Expand Down
4 changes: 4 additions & 0 deletions app/boards/shields/jorne/jorne_left.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
4 changes: 4 additions & 0 deletions app/boards/shields/jorne/jorne_right.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y

0 comments on commit fdfeea9

Please sign in to comment.