Skip to content

Commit

Permalink
Corne with display dongle full compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mctechnology17 committed Aug 21, 2024
1 parent 44e0523 commit f04d9cf
Show file tree
Hide file tree
Showing 90 changed files with 4,427 additions and 1,880 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.dtsi linguist-language=C++
*.keymap linguist-language=C++
25 changes: 25 additions & 0 deletions .github/workflows/keymap-drawer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# keymap -c config/config_keymap-drawer.yaml parse -c 12 -z config/corne.keymap > keymap-drawer/corne.yaml
# keymap -c config/config_keymap-drawer.yaml draw keymap-drawer/corne.yaml > keymap-drawer/corne.svg

# Example for using the keymap-drawer ZMK user config workflow
name: Draw ZMK keymaps
on:
workflow_dispatch: # can be triggered manually
push: # automatically run on changes to following paths
paths:
- "config/*.keymap"
- "config/config_keymap-drawer.yaml"
- .github/workflows/keymap-drawer.yaml

jobs:
draw:
uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
permissions:
contents: write # allow workflow to commit to the repo
with:
amend_commit: true
keymap_patterns: "config/*.keymap" # path to the keymaps to parse
config_path: "config/config_keymap-drawer.yaml" # config file, ignored if not exists
output_folder: "keymap-drawer" # path to save produced SVG and keymap YAML files
parse_args: "" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''"
draw_args: "" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'"
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
Makefile
build/justin/*
# zmk
zmk/

# sketchybar
sketchybar/dotfiles/
sketchybar/dotfiles
sketchybar/dotfiles/*

# MacOS
.DS_Store
vim-tools_notiz.vim
.DS_Store
./*/.DS_Store
.vscode
# .vimspector.json
push.sh
Expand Down Expand Up @@ -72,7 +78,7 @@ node_modules
*.pyc
.idea/
/.idea
build/
# build/
__pycache__

# Rust
Expand Down
509 changes: 509 additions & 0 deletions Makefile

Large diffs are not rendered by default.

599 changes: 405 additions & 194 deletions README.md

Large diffs are not rendered by default.

87 changes: 77 additions & 10 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,82 @@
# together by resetting them at the same time. Most commonly, this is done by
# grounding the reset pins for each of your keyboard's microcontrollers or
# pressing the reset buttons at the same time.
#
# cmake-args: -DKEYMAP_FILE=../../config/other-corne.keymap -DCONFIG_ZMK_KEYBOARD_NAME=\"other-corne\" -DEXTRA_CONF_FILE=../../config/other-corne.conf
---
include:
- board: nice_nano_v2 # puchi_ble_v1 nice_nano_v2
shield: corne_left nice_view_adapter nice_view # con display
# shield: corne_left # con OLED display
# - board: puchi_ble_v1 # puchi_ble_v1 nice_nano_v2
- board: nice_nano_v2 # puchi_ble_v1 nice_nano_v2
shield: corne_right nice_view_adapter nice_view # con display
# shield: corne_right # con OLED display
# - board: puchi_ble_v1 # puchi_ble_v1 nice_nano_v2
# - board: puchi_ble_v1
# shield: settings_reset

# nice
- board: nice_nano_v2
shield: corne_left nice_view_adapter nice_view
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_View\"
artifact-name: nice_corne_left
# shield: corne_left # for OLED no nice_view
- board: nice_nano_v2
shield: corne_right nice_view_adapter nice_view
artifact-name: nice_corne_right
# shield: corne_right # for OLED no nice_view

# puchi
- board: puchi_ble_v1
shield: corne_left nice_view_adapter nice_view
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Corne_View\"
artifact-name: puchi_corne_left
# shield: corne_left # for OLED no nice_view
- board: puchi_ble_v1
shield: corne_right nice_view_adapter nice_view
artifact-name: puchi_corne_right
# shield: corne_right # for OLED no nice_view

# peripheral_left
- board: nice_nano_v2
shield: corne_left_peripheral nice_view_adapter nice_view
artifact-name: nice_corne_left_peripheral
- board: puchi_ble_v1
shield: corne_left_peripheral nice_view_adapter nice_view
artifact-name: puchi_corne_left_peripheral

# Xiao_Dongle
- board: seeeduino_xiao_ble
shield: corne_dongle_xiao
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\"
artifact-name: xiao_corne_dongle_xiao
snippet: zmk-usb-logging
- board: seeeduino_xiao_ble
shield: corne_dongle_xiao dongle_display
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle_O\"
artifact-name: xiao_corne_dongle_xiao_dongle_display
snippet: zmk-usb-logging

# ProMicro_Dongle
- board: nice_nano_v2
shield: corne_dongle_pro_micro
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Dongle\"
artifact-name: nice_corne_dongle_pro_micro
snippet: zmk-usb-logging
- board: nice_nano_v2
shield: corne_dongle_pro_micro dongle_display
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Dongle_O\"
artifact-name: nice_corne_dongle_pro_micro_dongle_display
snippet: zmk-usb-logging
- board: puchi_ble_v1
shield: corne_dongle_pro_micro
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle\"
artifact-name: puchi_corne_dongle_pro_micro
snippet: zmk-usb-logging
- board: puchi_ble_v1
shield: corne_dongle_pro_micro dongle_display
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle_O\"
artifact-name: puchi_corne_dongle_pro_micro_dongle_display
snippet: zmk-usb-logging

# settings_reset
- board: nice_nano_v2
shield: settings_reset
artifact-name: nice_settings_reset
- board: seeeduino_xiao_ble
shield: settings_reset
artifact-name: xiao_settings_reset
- board: puchi_ble_v1
shield: settings_reset
artifact-name: puchi_settings_reset
Binary file added config/boards/.DS_Store.gz
Binary file not shown.
47 changes: 47 additions & 0 deletions config/boards/nice_nano.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include <dt-bindings/led/led.h>

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

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
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 = <10>; /* arbitrary; change at will */
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;
};
};
// vim: filetype=dts fdm=marker:
47 changes: 47 additions & 0 deletions config/boards/nice_nano_v2.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include <dt-bindings/led/led.h>

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

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
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 = <10>; /* arbitrary; change at will */
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;
};
};
// vim: filetype=dts fdm=marker:
2 changes: 1 addition & 1 deletion config/boards/nrfmicro_11.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

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

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
Expand All @@ -45,3 +44,4 @@
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:
47 changes: 47 additions & 0 deletions config/boards/nrfmicro_11_flipped.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};

&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";

pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_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 = <10>; /* arbitrary; change at will */
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;
};
};
// vim: filetype=dts fdm=marker:
4 changes: 3 additions & 1 deletion config/boards/nrfmicro_13.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

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

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
Expand All @@ -45,3 +45,5 @@
zmk,underglow = &led_strip;
};
};

// vim: filetype=dts fdm=marker:
6 changes: 3 additions & 3 deletions config/boards/puchi_ble_v1.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

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

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

/* WS2812 10 default, cambie a 54*/
chain-length = <27>; /* There are per-key RGB, but the first 6 are underglow */
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

Expand Down
54 changes: 54 additions & 0 deletions config/boards/shields/corne/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO

config ZMK_KEYBOARD_NAME
default "Corne"

config ZMK_SPLIT_ROLE_CENTRAL
default y

config ZMK_USB
default y

endif

if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_LEFT_PERIPHERAL || SHIELD_CORNE_DONGLE_PRO_MICRO

config ZMK_SPLIT
default y

if ZMK_DISPLAY

config I2C
default y

config SSD1306
default y

if SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO

choice ZMK_DISPLAY_WORK_QUEUE
default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice

endif

endif # ZMK_DISPLAY

if LVGL

config LV_Z_VDB_SIZE
default 64

config LV_DPI_DEF
default 148

config LV_Z_BITS_PER_PIXEL
default 1

choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice

endif # LVGL

endif
Loading

0 comments on commit f04d9cf

Please sign in to comment.