Skip to content

Commit

Permalink
Merge branch 'main' into rgb-momentary-eff
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Jul 16, 2024
2 parents d1b98ea + 7bd74a6 commit 2b334a7
Show file tree
Hide file tree
Showing 146 changed files with 2,596 additions and 557 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ on:
schedule:
- cron: "22 4 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true

permissions: {}

jobs:
build:
if: ${{ always() }}
Expand All @@ -25,6 +31,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache west modules
uses: actions/cache@v4
env:
Expand Down Expand Up @@ -131,7 +139,7 @@ jobs:
throw new Error('Failed to build one or more configurations');
}
compile-matrix:
if: ${{ always() }}
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [core-coverage, board-changes, nightly]
outputs:
Expand Down Expand Up @@ -179,6 +187,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -284,7 +294,7 @@ jobs:
});
}))).flat();
nightly:
if: ${{ github.event_name == 'schedule' }}
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'zmkfirmware' }}
runs-on: ubuntu-latest
needs: get-grouped-hardware
outputs:
Expand Down Expand Up @@ -335,6 +345,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -413,7 +425,11 @@ jobs:
board-changes: ${{ steps.board-changes.outputs.result }}
core-changes: ${{ steps.core-changes.outputs.result }}
steps:
- uses: tj-actions/changed-files@v42
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: tj-actions/changed-files@v44
id: changed-files
with:
json: true
Expand Down
6 changes: 5 additions & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ project(zmk)
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)

if(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS)
zephyr_linker_sources(DATA_SECTIONS include/linker/zmk-behavior-local-id-map.ld)
endif()

zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/behavior.h)
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h)

Expand All @@ -20,9 +24,9 @@ target_include_directories(app PRIVATE include)
target_sources(app PRIVATE src/stdlib.c)
target_sources(app PRIVATE src/activity.c)
target_sources(app PRIVATE src/behavior.c)
target_sources(app PRIVATE src/kscan.c)
target_sources_ifdef(CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS app PRIVATE src/kscan_sideband_behaviors.c)
target_sources(app PRIVATE src/matrix_transform.c)
target_sources(app PRIVATE src/physical_layouts.c)
target_sources(app PRIVATE src/sensors.c)
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
target_sources(app PRIVATE src/event_manager.c)
Expand Down
12 changes: 11 additions & 1 deletion app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ config ZMK_HID_INDICATORS
Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock,
Kata, and Compose.

config ZMK_HID_SEPARATE_MOD_RELEASE_REPORT
bool "Release Modifiers Separately"
help
Send a separate release event for the modifiers, to make sure the release
of the modifier doesn't get recognized before the actual key's release event.

menu "Output Types"

config ZMK_USB
Expand Down Expand Up @@ -490,7 +496,11 @@ if USB_DEVICE_STACK

config ZMK_USB_INIT_PRIORITY
int "USB Init Priority"
default 50
default 94

config ZMK_USB_HID_INIT_PRIORITY
int "USB HID Init Priority"
default 95

#USB
endif
Expand Down
41 changes: 40 additions & 1 deletion app/Kconfig.behaviors
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT

config ZMK_BEHAVIOR_METADATA
bool "Metadata"
help
Enabling this option adds APIs for documenting and fetching
metadata describing a behaviors name, and supported parameters.

config ZMK_BEHAVIOR_LOCAL_IDS
bool "Local IDs"

if ZMK_BEHAVIOR_LOCAL_IDS

config ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
bool "Track in behavior bindings"

choice ZMK_BEHAVIOR_LOCAL_ID_TYPE
prompt "Local ID Type"

config ZMK_BEHAVIOR_LOCAL_ID_TYPE_SETTINGS_TABLE
bool "Settings Table"
depends on SETTINGS
select ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
help
Use persistent entries in the settings subsystem to identify
behaviors by local ID, which uses the device name to generate
a new settings entry tying a presistant local ID to that name.
This guarantees stable, colllision-free local IDs at the expense
of settings storage used.

config ZMK_BEHAVIOR_LOCAL_ID_TYPE_CRC16
bool "CRC16 Hash"
help
Use the CRC16-ANSI hash of behavior device names to generate
stable behavior local IDs. This saves on settings storage at
the expense of (highly unlikely) risk of collisions.

endchoice

endif

config ZMK_BEHAVIOR_KEY_TOGGLE
bool
default y
Expand Down Expand Up @@ -35,4 +74,4 @@ config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR
config ZMK_BEHAVIOR_MACRO
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED
2 changes: 0 additions & 2 deletions app/boards/01space_rp2040_042lcd.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
* SPDX-License-Identifier: MIT
*/

#include "usb_console.dtsi"

&xiao_serial { status = "disabled"; };
2 changes: 0 additions & 2 deletions app/boards/adafruit_kb2040.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
* SPDX-License-Identifier: MIT
*/

#include "usb_console.dtsi"

&pro_micro_serial { status = "disabled"; };
2 changes: 0 additions & 2 deletions app/boards/adafruit_qt_py_rp2040.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
* SPDX-License-Identifier: MIT
*/

#include "usb_console.dtsi"

&xiao_serial { status = "disabled"; };
6 changes: 1 addition & 5 deletions app/boards/arm/adv360pro/adv360pro.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan0;
zmk,backlight = &backlight;
zmk,battery = &vbatt;
Expand Down Expand Up @@ -90,11 +89,8 @@
status = "okay";
};

&usbd {
zephyr_udc0: &usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};

&flash0 {
Expand Down
9 changes: 9 additions & 0 deletions app/boards/arm/adv360pro/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html

list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
6 changes: 1 addition & 5 deletions app/boards/arm/bdn9/bdn9_rev2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan;
zmk,underglow = &led_strip;
};
Expand Down Expand Up @@ -106,13 +105,10 @@
apb1-prescaler = <1>;
};

&usb {
zephyr_udc0: &usb {
status = "okay";
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};

&rtc {
Expand Down
6 changes: 1 addition & 5 deletions app/boards/arm/bluemicro840/bluemicro840_v1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
};

Expand Down Expand Up @@ -82,11 +81,8 @@
pinctrl-names = "default", "sleep";
};

&usbd {
zephyr_udc0: &usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};


Expand Down
9 changes: 9 additions & 0 deletions app/boards/arm/bluemicro840/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html

list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
6 changes: 1 addition & 5 deletions app/boards/arm/bt60/bt60.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
zmk,kscan = &kscan0;
zmk,matrix-transform = &default_transform;
Expand Down Expand Up @@ -70,11 +69,8 @@
status = "okay";
};

&usbd {
zephyr_udc0: &usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};


Expand Down
9 changes: 9 additions & 0 deletions app/boards/arm/bt60/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html

list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
2 changes: 1 addition & 1 deletion app/boards/arm/ckp/ckp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
status = "okay";
};

&usbd {
zephyr_udc0: &usbd {
status = "okay";
};

Expand Down
9 changes: 9 additions & 0 deletions app/boards/arm/ckp/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html

list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
6 changes: 1 addition & 5 deletions app/boards/arm/corneish_zen/corneish_zen.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,display = &epd;
zephyr,console = &cdc_acm_uart;
zmk,matrix-transform = &default_transform;
};

Expand Down Expand Up @@ -76,11 +75,8 @@
status = "okay";
};

&usbd {
zephyr_udc0: &usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};

&flash0 {
Expand Down
9 changes: 9 additions & 0 deletions app/boards/arm/corneish_zen/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#

# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html

list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
6 changes: 1 addition & 5 deletions app/boards/arm/dz60rgb/dz60rgb_rev1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan0;
zmk,matrix-transform = &default_transform;
};
Expand Down Expand Up @@ -65,11 +64,8 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(

};

&usb {
zephyr_udc0: &usb {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};

&flash0 {
Expand Down
Loading

0 comments on commit 2b334a7

Please sign in to comment.