Kellen Carey
4 years ago
10 changed files with 282 additions and 0 deletions
@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
|
||||
|
||||
if SHIELD_MICRODOX_LEFT |
||||
|
||||
config ZMK_KEYBOARD_NAME |
||||
default "Microdox Left" |
||||
|
||||
endif |
||||
|
||||
|
||||
if SHIELD_MICRODOX_RIGHT |
||||
|
||||
config ZMK_KEYBOARD_NAME |
||||
default "Microdox Right" |
||||
|
||||
endif |
||||
|
||||
if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_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 LVGL_HOR_RES |
||||
default 128 |
||||
|
||||
config LVGL_VER_RES |
||||
default 32 |
||||
|
||||
config LVGL_VDB_SIZE |
||||
default 64 |
||||
|
||||
config LVGL_DPI |
||||
default 148 |
||||
|
||||
config LVGL_BITS_PER_PIXEL |
||||
default 1 |
||||
|
||||
choice LVGL_COLOR_DEPTH |
||||
default LVGL_COLOR_DEPTH_1 |
||||
endchoice |
||||
|
||||
endif # LVGL |
||||
|
||||
endif |
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2020 Pete Johanson |
||||
# Copyright (c) 2020 Kellen Carey |
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
config SHIELD_MICRODOX_LEFT |
||||
def_bool $(shields_list_contains,microdox_left) |
||||
|
||||
config SHIELD_MICRODOX_RIGHT |
||||
def_bool $(shields_list_contains,microdox_right) |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
&spi1 { |
||||
compatible = "nordic,nrf-spi"; |
||||
/* 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 = "SK6812mini"; |
||||
|
||||
/* SPI */ |
||||
reg = <0>; /* ignored, but necessary for SPI bindings */ |
||||
spi-max-frequency = <4000000>; |
||||
|
||||
/* WS2812 */ |
||||
chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */ |
||||
spi-one-frame = <0x70>; |
||||
spi-zero-frame = <0x40>; |
||||
}; |
||||
}; |
||||
|
||||
/ { |
||||
chosen { |
||||
zmk,underglow = &led_strip; |
||||
}; |
||||
}; |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
# Uncomment the following lines to enable the Corne RGB Underglow |
||||
# ZMK_RGB_UNDERGLOW=y |
||||
# CONFIG_WS2812_STRIP=y |
||||
|
||||
# Uncomment the following line to enable the Corne OLED Display |
||||
# CONFIG_ZMK_DISPLAY=y |
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
/* |
||||
* Copyright (c) 2020 Pete Johanson |
||||
* Copyright (c) 2020 Kellen Carey |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include <dt-bindings/zmk/matrix-transform.h> |
||||
|
||||
/ { |
||||
chosen { |
||||
zmk,kscan = &kscan0; |
||||
zmk,matrix_transform = &default_transform; |
||||
}; |
||||
|
||||
default_transform: keymap_transform_0 { |
||||
compatible = "zmk,matrix-transform"; |
||||
columns = <10>; |
||||
rows = <4>; |
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW5 | SW4 | SW3 | SW2 | SW1 | |
||||
// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | |
||||
// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 | |
||||
// | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | |
||||
map = < |
||||
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(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(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(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) |
||||
>; |
||||
}; |
||||
|
||||
kscan0: kscan { |
||||
compatible = "zmk,kscan-gpio-matrix"; |
||||
label = "KSCAN"; |
||||
|
||||
diode-direction = "col2row"; |
||||
row-gpios |
||||
= <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
, <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
, <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
, <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> |
||||
; |
||||
|
||||
}; |
||||
|
||||
bt_unpair_combo: bt_unpair_combo { |
||||
compatible = "zmk,bt-unpair-combo"; |
||||
}; |
||||
|
||||
// TODO: per-key RGB node(s)? |
||||
}; |
||||
|
||||
&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>; |
||||
}; |
||||
}; |
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
/* |
||||
* Copyright (c) 2020 The ZMK Contributors |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include <behaviors.dtsi> |
||||
#include <dt-bindings/zmk/keys.h> |
||||
#include <dt-bindings/zmk/bt.h> |
||||
|
||||
/ { |
||||
keymap { |
||||
compatible = "zmk,keymap"; |
||||
|
||||
default_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP | |
||||
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | |
||||
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | SHFT | |
||||
// | GUI | LWR | SPC | | ENT | RSE | ALT | |
||||
bindings = < |
||||
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P |
||||
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN |
||||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &kp FSLH |
||||
&kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp RALT |
||||
>; |
||||
}; |
||||
lower_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | |
||||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | |
||||
// | SHFT | | | | | | | | | | | | | |
||||
// | GUI | | SPC | | ENT | | ALT | |
||||
bindings = < |
||||
&kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 |
||||
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LARW &kp DARW &kp UARW &kp RARW &trans |
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans |
||||
&kp LGUI &trans &kp SPC &kp RET &trans &kp RALT |
||||
>; |
||||
}; |
||||
|
||||
raise_layer { |
||||
// ----------------------------------------------------------------------------------------- |
||||
// | ESC | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP | |
||||
// | CTRL | | | | | | | - | = | { | } | "|" | ` | |
||||
// | SHFT | | | | | | | _ | + | [ | ] | \ | ~ | // TODO: Fix this row when &mkp is committed |
||||
// | GUI | | SPC | | ENT | | ALT | |
||||
bindings = < |
||||
&kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN |
||||
&trans &trans &trans &trans &trans &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp PIPE |
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH |
||||
&kp LGUI &trans &kp SPC &kp RET &trans &kp RALT |
||||
>; |
||||
}; |
||||
}; |
||||
}; |
||||
|
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
/* |
||||
* Copyright (c) 2020 Pete Johanson |
||||
* Copyright (c) 2020 Kellen Carey |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include "microdox.dtsi" |
||||
|
||||
&kscan0 { |
||||
col-gpios |
||||
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH> |
||||
; |
||||
}; |
||||
|
||||
&bt_unpair_combo { |
||||
key-positions = <0 38>; |
||||
}; |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
/* |
||||
* Copyright (c) 2020 Pete Johanson |
||||
* Copyright (c) 2020 Kellen Carey |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include "microdox.dtsi" |
||||
|
||||
&default_transform { |
||||
col-offset = <5>; |
||||
}; |
||||
|
||||
&kscan0 { |
||||
col-gpios |
||||
= <&pro_micro_d 15 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH> |
||||
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH> |
||||
; |
||||
}; |
||||
|
||||
&bt_unpair_combo { |
||||
key-positions = <9 35>; |
||||
}; |
Loading…
Reference in new issue