mirror of
https://github.com/dnlbauer/corax-keyboard.git
synced 2026-09-10 13:15:29 +00:00
add niceview adapter and reduce complexity
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
if SHIELD_OWNKB_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "SplitKeyboard"
|
||||
default "ownkb"
|
||||
|
||||
config ZMK_SPLIT_ROLE_CENTRAL
|
||||
default y
|
||||
@@ -16,34 +16,6 @@ if SHIELD_OWNKB_LEFT || SHIELD_OWNKB_RIGHT
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
if ZMK_DISPLAY
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
config SSD1306
|
||||
default y
|
||||
|
||||
config SSD1306_REVERSE_MODE
|
||||
default y
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
if LVGL
|
||||
|
||||
config LV_Z_VDB_SIZE
|
||||
default 64
|
||||
|
||||
config LV_Z_DPI
|
||||
default 148
|
||||
|
||||
config LV_Z_BITS_PER_PIXEL
|
||||
default 1
|
||||
|
||||
choice LV_COLOR_DEPTH
|
||||
default LV_COLOR_DEPTH_1
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
# TODO add support for normal OLED
|
||||
|
||||
endif
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
# Uncomment the following line to enable the Sofle OLED Display
|
||||
# CONFIG_ZMK_DISPLAY=y
|
||||
# CONFIG_ZMK_DISPLAY=y
|
||||
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
||||
#CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=y
|
||||
|
||||
# Uncomment these two lines to add support for encoders
|
||||
# CONFIG_EC11=y
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
// zephyr,display = &oled; // TODO remove or keep?
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
@@ -47,8 +47,8 @@ RC(0,3) RC(1,3) RC(2,3) RC(3,3) RC(4,3) RC(5,3) RC(5,4) RC(6,4) RC(6,3) RC(7,3)
|
||||
right_encoder: encoder_right {
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -59,22 +59,6 @@ RC(0,3) RC(1,3) RC(2,3) RC(3,3) RC(4,3) RC(5,3) RC(5,4) RC(6,4) RC(6,3) RC(7,3)
|
||||
};
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "okay";
|
||||
|
||||
oled: ssd1306@3c {
|
||||
compatible = "solomon,ssd1306fb";
|
||||
reg = <0x3c>;
|
||||
label = "DISPLAY";
|
||||
width = <128>;
|
||||
height = <32>;
|
||||
segment-offset = <0>;
|
||||
page-offset = <0>;
|
||||
display-offset = <0>;
|
||||
multiplex-ratio = <31>;
|
||||
segment-remap;
|
||||
com-invdir;
|
||||
com-sequential;
|
||||
prechargep = <0x22>;
|
||||
};
|
||||
};
|
||||
nice_view_spi: &spi0 {
|
||||
cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
file_format: "1"
|
||||
id: ownkb
|
||||
name: SplitKeyboard
|
||||
name: ownkb
|
||||
type: shield
|
||||
url: https://github.com/dnlbauer/splitkeyboard
|
||||
requires: [pro_micro]
|
||||
exposes: [i2c_oled]
|
||||
features:
|
||||
- keys
|
||||
- display
|
||||
- encoder
|
||||
# - display TODO remove?
|
||||
# - encoder TODO use
|
||||
siblings:
|
||||
- ownkb_left
|
||||
- ownkb_right
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
@@ -24,6 +24,6 @@
|
||||
;
|
||||
};
|
||||
|
||||
&left_encoder {
|
||||
status = "okay";
|
||||
};
|
||||
// &left_encoder {
|
||||
// status = "okay";
|
||||
// };
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
@@ -28,6 +28,6 @@
|
||||
;
|
||||
};
|
||||
|
||||
&right_encoder {
|
||||
status = "okay";
|
||||
};
|
||||
// &right_encoder {
|
||||
// status = "okay";
|
||||
// };
|
||||
|
||||
17
zmk-config/config/ownkb.conf
Normal file
17
zmk-config/config/ownkb.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2020 Ryan Cross
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Uncomment the following line to enable the Sofle OLED Display
|
||||
# CONFIG_ZMK_DISPLAY=y
|
||||
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
||||
#CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=y
|
||||
# Uncomment these two lines to add support for encoders
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
CONFIG_ZMK_KEYBOARD_NAME="test"
|
||||
|
||||
CONFIG_ZMK_IDLE_TIMEOUT=30000
|
||||
#CONFIG_ZMK_SLEEP=y
|
||||
#CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
|
||||
@@ -1,7 +0,0 @@
|
||||
# Uncomment these two lines to add support for encoders
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
# Uncomment the following line to enable the Sofle OLED Display
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
|
||||
Reference in New Issue
Block a user