aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjack <[email protected]>2022-09-14 22:39:20 -0600
committerjack <[email protected]>2022-09-14 22:39:20 -0600
commit8e07a72b5bfd6b7447673cbc784208ac7d210485 (patch)
tree518840b94da1bad2f6bed5d52a291edc99e73014
parent68dd21831c1de57db1730e7962035345c0649c38 (diff)
downloadzmk_build-8e07a72b5bfd6b7447673cbc784208ac7d210485.tar.gz
zmk_build-8e07a72b5bfd6b7447673cbc784208ac7d210485.zip
rgb & oled
-rw-r--r--lulu/boards/nice_nano.overlay28
-rw-r--r--lulu/lulu.conf2
-rw-r--r--lulu/lulu.dtsi24
-rw-r--r--lulu/lulu.zmk.yml4
4 files changed, 56 insertions, 2 deletions
diff --git a/lulu/boards/nice_nano.overlay b/lulu/boards/nice_nano.overlay
new file mode 100644
index 0000000..fbd0466
--- /dev/null
+++ b/lulu/boards/nice_nano.overlay
@@ -0,0 +1,28 @@
+// Copyright 2022 jack (@waffle87)
+// SPDX-License-Identifier: MIT
+
+#include <dt-bindings/led/led.h>
+
+&spi1 {
+ compatible = "nordic,nrf-spim";
+ status = "okay";
+ mosi-pin = <6>;
+ sck-pin = <5>;
+ miso-pin = <7>;
+ led_strip: ws2812@0 {
+ compatible = "worldsemi,ws2812-spi";
+ label = "WS2812";
+ reg = <0>;
+ spi-max-frequency = <4000000>;
+ chain-length = <6>;
+ 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;
+ }
+}
diff --git a/lulu/lulu.conf b/lulu/lulu.conf
index 6a4bf46..0557c93 100644
--- a/lulu/lulu.conf
+++ b/lulu/lulu.conf
@@ -1,2 +1,4 @@
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
+CONFIG_ZMK_RGB_UNDERGLOW=n
+CONFIG_WS2812_STRIP=n
diff --git a/lulu/lulu.dtsi b/lulu/lulu.dtsi
index 51801bb..77295a9 100644
--- a/lulu/lulu.dtsi
+++ b/lulu/lulu.dtsi
@@ -7,6 +7,7 @@
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
+ zephyr,display = &oled;
};
default_transform: keymap_transform_0 {
@@ -35,8 +36,27 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
- a-gpios = <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
- b-gpios = <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
+ a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
+ b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
};
};
+
+&pro_micro_i2c {
+ status = "okay";
+ oled: ssd1306@3c {
+ compatible = "solomon,ssd13066fb";
+ reg = <0x3c>;
+ label = "DISPLAY";
+ width = <128>;
+ height = <32>;
+ segment-offset = <0>;
+ page-offset = <0>;
+ display-offset = <0>;
+ multiplex-ration = <31>;
+ segment-remap;
+ com-invdir;
+ com-sequential;
+ prechargep = <0x22>;
+ };
+};
diff --git a/lulu/lulu.zmk.yml b/lulu/lulu.zmk.yml
index c5949d9..4e84e25 100644
--- a/lulu/lulu.zmk.yml
+++ b/lulu/lulu.zmk.yml
@@ -5,8 +5,12 @@ type: shield
url: https://boardsource.xyz/projects/60de24d6847112054777bbdd
requires:
- pro_micro
+exposes:
+ - i2c_oled
features:
- keys
+ - display
+ - underglow
siblings:
- lulu_left
- lulu_right