Skip to content

Commit

Permalink
sync from source zmkfirmware (#1)
Browse files Browse the repository at this point in the history
* fix(display): Set bits per pixel and color depth on n!v

* fix(behaviors): make tap dances work on a combo

* Tap dance event handler goes after combos
* Add test

* feat(shields): Add splitkb.com Aurora Sweep.

* fix(docs): copy error not exclusive to Apple silicon

* fix(docs): changed MacOS to macOS as per Apple styling

* feat(shields): Add splitkb.com Aurora Corne.

* fix(ci): Refactor west build step

* fix: HID report descriptor

* fix(docs): Update link to Zephyr led docs

* Change Zephyr gpio-leds link to 3.0.0

* fix(boards): Fix XIAO BLE voltage divider config.

* Use proper resistor value for the `output-ohms` property.

* fix(usb): add USB_DC_CLEAR_HALT to supported states

See https://manpages.debian.org/testing/linux-manual-4.9/usb_clear_halt.9 for
information on halted USB endpoints

* fix(docs): Correct syntax in capsword mods

* chore(deps): bump loader-utils from 2.0.3 to 2.0.4 in /docs

Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](webpack/loader-utils@v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* refactor: Update cradio keymap with better indentation and additional features

* fix(docs): Correct typo in hold-tap comparison balanced flavor

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: HookyQR <[email protected]>
Co-authored-by: Okke Formsma <[email protected]>
Co-authored-by: Peter Johanson <[email protected]>
Co-authored-by: Terence Stenvold <[email protected]>
Co-authored-by: byran.tech <[email protected]>
Co-authored-by: Albert Y <[email protected]>
Co-authored-by: jhorology <[email protected]>
Co-authored-by: Michael Anthony <[email protected]>
Co-authored-by: Xudong Zheng <[email protected]>
Co-authored-by: Nick Coutsos <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kurtis Lew <[email protected]>
  • Loading branch information
13 people authored Dec 7, 2022
1 parent 4e11913 commit 6b7794c
Show file tree
Hide file tree
Showing 37 changed files with 982 additions and 126 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-user-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ jobs:

- name: West Build (${{ env.display_name }})
shell: sh -x {0}
run: |
west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
run: west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}

- name: ${{ env.display_name }} Kconfig file
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
Expand Down
2 changes: 1 addition & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
target_sources(app PRIVATE src/behaviors/behavior_none.c)
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
target_sources(app PRIVATE src/combo.c)
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
target_sources(app PRIVATE src/behavior_queue.c)
target_sources(app PRIVATE src/conditional_layer.c)
target_sources(app PRIVATE src/endpoints.c)
Expand Down
2 changes: 1 addition & 1 deletion app/boards/seeeduino_xiao_ble.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
label = "BATTERY";
io-channels = <&adc 7>;
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
output-ohms = <1000000>;
output-ohms = <510000>;
full-ohms = <(1000000 + 510000)>;
};
};
Expand Down
178 changes: 90 additions & 88 deletions app/boards/shields/cradio/cradio.keymap
Original file line number Diff line number Diff line change
@@ -1,102 +1,104 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
// Copyright (c) 2022 The ZMK Contributors
// SPDX-License-Identifier: MIT

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

// Home row mods macro
#define HRML(k1,k2,k3,k4) &ht LSHFT k1 &ht LALT k2 &ht LCTRL k3 &ht LGUI k4
#define HRMR(k1,k2,k3,k4) &ht RGUI k1 &ht RCTRL k2 &ht RALT k3 &ht RSHFT k4

&mt {
// flavor = "tap-preferred";
// tapping_term_ms = <200>;
};

/ {

combos {
compatible = "zmk,combos";
combo_esc {
timeout-ms = <50>;
key-positions = <0 1>;
bindings = <&kp ESC>;
};

combo_tab {
timeout-ms = <50>;
key-positions = <10 11>;
bindings = <&kp TAB>;
/ {
behaviors {
ht: hold_tap {
label = "hold_tap";
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <150>;
global-quick-tap;
bindings = <&kp>, <&kp>;
};

combo_ralt {
timeout-ms = <50>;
key-positions = <17 16>;
bindings = <&kp RALT>;
};

conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <1 2>;
then-layer = <3>;
};

combo_lalt {
timeout-ms = <50>;
key-positions = <11 12>;
bindings = <&kp LALT>;
};

keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ' " │
HRML(A, S, D, F) &kp G &kp H HRMR(J, K, L, SQT)
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ Z │ X │ C │ V │ B │ │ N │ M │ , < │ . > │ / ? │
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&lt 2 TAB &kp ENTER &kp SPACE &lt 1 BSPC
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};

combo_lgui {
timeout-ms = <50>;
key-positions = <12 13>;
bindings = <&kp LGUI>;

right_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ INSERT │ 1 │ 2 │ 3 │ │ │ HOME │ PAGE DN │ PAGE UP │ END │ : │
&kp INS &kp N1 &kp N2 &kp N3 &trans &kp HOME &kp PG_DN &kp PG_UP &kp END &kp COLON
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ DELETE │ 4 │ 5 │ 6 │ │ │ LEFT │ DOWN │ UP │ RIGHT │ ; │
&kp DEL &kp N4 &kp N5 &kp N6 &trans &kp LARW &kp DARW &kp UARW &kp RARW &kp SEMI
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ CAPS │ 7 │ 8 │ 9 │ 0 │ │ │ │ │ │ │
&caps_word &kp N7 &kp N8 &kp N9 &kp N0 &trans &trans &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&trans &kp ESC &trans &trans
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};


combo_rgui {
timeout-ms = <50>;
key-positions = <17 18>;
bindings = <&kp RGUI>;

left_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ │ [ │ { │ } │ │ │ ^ │ ( │ ) │ ] │ ~ │
&trans &kp LBKT &kp LBRC &kp RBRC &trans &kp CARET &kp LPAR &kp RPAR &kp RBKT &kp TILDE
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ ! │ @ │ # │ $ │ % │ │ * │ - │ = │ \ │ ` │
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp ASTRK &kp MINUS &kp EQUAL &kp BSLH &kp GRAVE
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ │ │ │ & │ _ │ + │ │ │ │
&trans &trans &trans &trans &trans &kp AMPS &kp UNDER &kp PLUS &kp PIPE &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&trans &trans &trans &trans
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};



tri_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ RESET │ │ │ │PROFILE 0 │ │ │ │ │ │ RESET │
&reset &trans &trans &trans &bt BT_SEL 0 &trans &trans &trans &trans &reset
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│BOOTLOADER│ │ │ │PROFILE 1 │ │ │ │ │ │BOOTLOADER│
&bootloader &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ CLEAR BT │PROFILE 2 │ │ │ │ │ │ │
&trans &trans &trans &bt BT_CLR &bt BT_SEL 2 &trans &trans &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&trans &trans &trans &trans
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
};

keymap {
compatible = "zmk,keymap";

default_layer {
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 QUOT
&mt LSFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt LSFT RET
&mo 1 &kp LCTL &kp SPC &mo 2
>;
};

left_layer {
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
&kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL
&kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL
&mo 1 &kp LGUI &kp RGUI &mo 2
>;
};

right_layer {
bindings = <
&kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN
&kp HASH &kp QMARK &kp FSLH &kp COLN &kp SCLN &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BKSP
&kp LSFT &kp KPLS &kp LBKT &kp RBKT &kp BSLH &kp UNDER &kp LEFT &kp DOWN &kp UP &kp RIGHT
&mo 3 &kp LCTL &kp SPC &mo 2
>;
};

tri_layer {
bindings = <
&kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &trans &trans &trans &trans &trans
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans
&bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans
&trans &trans &trans &trans
>;
};

};
};
7 changes: 7 additions & 0 deletions app/boards/shields/nice_view/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ config LS0XX
config ZMK_WIDGET_WPM_STATUS
default y if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL

config LVGL_BITS_PER_PIXEL
default 1

choice LVGL_COLOR_DEPTH
default LVGL_COLOR_DEPTH_1
endchoice

endif # ZMK_DISPLAY

endif
55 changes: 55 additions & 0 deletions app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

if SHIELD_SPLITKB_AURORA_CORNE_LEFT

config ZMK_KEYBOARD_NAME
default "Aurora Corne"

config ZMK_SPLIT_ROLE_CENTRAL
default y

endif # SHIELD_SPLITKB_AURORA_CORNE_LEFT

if SHIELD_SPLITKB_AURORA_CORNE_LEFT || SHIELD_SPLITKB_AURORA_CORNE_RIGHT

config ZMK_SPLIT
default y

config ZMK_RGB_UNDERGLOW
select WS2812_STRIP
select SPI

config ZMK_DISPLAY

if ZMK_DISPLAY

config SSD1306
default y

config I2C
default y

config SSD1306_REVERSE_MODE
default y

endif # ZMK_DISPLAY

if LVGL

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 # SHIELD_SPLITKB_AURORA_CORNE_LEFT || SHIELD_SPLITKB_AURORA_CORNE_RIGHT
8 changes: 8 additions & 0 deletions app/boards/shields/splitkb_aurora_corne/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_SPLITKB_AURORA_CORNE_LEFT
def_bool $(shields_list_contains,splitkb_aurora_corne_left)

config SHIELD_SPLITKB_AURORA_CORNE_RIGHT
def_bool $(shields_list_contains,splitkb_aurora_corne_right)
31 changes: 31 additions & 0 deletions app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include <dt-bindings/led/led.h>

&spi1 {
compatible = "nordic,nrf-spim";
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 = <6>; /* 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;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include <dt-bindings/led/led.h>

&spi1 {
compatible = "nordic,nrf-spim";
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 = <6>; /* 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;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Uncomment these two line to add support for encoders to your firmware
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment the following line to enable the Kyria OLED Display
# CONFIG_ZMK_DISPLAY=y

# Uncomment the following lines to enable RGB underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y
Loading

0 comments on commit 6b7794c

Please sign in to comment.