Skip to content

Commit

Permalink
Merge branch 'main' into rgb-battery-effect
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed May 23, 2023
2 parents 34a9367 + 5aac274 commit ca4d994
Show file tree
Hide file tree
Showing 64 changed files with 3,544 additions and 1,531 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/build-user-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:

- name: Fetch Build Matrix
run: |
echo "build_matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)" >> $GITHUB_ENV
yaml2json ${{ inputs.build_matrix_path }} | jq
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
yaml2json "${{ inputs.build_matrix_path }}" | jq
build:
runs-on: ubuntu-latest
Expand All @@ -54,18 +54,13 @@ jobs:
steps:
- name: Prepare variables
shell: sh -x {0}
env:
shield: ${{ matrix.shield }}
run: |
if [ -n "${{ matrix.shield }}" ]
then
echo "extra_cmake_args=-DSHIELD=\"${{ matrix.shield }}\"" >> $GITHUB_ENV
echo "artifact_name=${{ matrix.shield }}-${{ matrix.board }}-zmk" >> $GITHUB_ENV
echo "display_name=${{ matrix.shield }} - ${{ matrix.board }}" >> $GITHUB_ENV
else
echo "extra_cmake_args=" >> $GITHUB_ENV
echo "artifact_name=${{ matrix.board }}-zmk" >> $GITHUB_ENV
echo "display_name=${{ matrix.board }}" >> $GITHUB_ENV
fi
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV
echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV
echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -89,7 +84,7 @@ jobs:
${{ runner.os }}-
- name: West Init
run: west init -l ${{ inputs.config_path }}
run: west init -l "${{ inputs.config_path }}"

- name: West Update
run: west update
Expand All @@ -99,7 +94,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 All @@ -113,7 +108,7 @@ jobs:
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
then
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
cp "build/zephyr/zmk.${{ inputs.fallback_binary }}" "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
fi
- name: Archive (${{ env.display_name }})
Expand Down
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"ms-python.python",
"ms-vscode.cpptools",
"plorefice.devicetree",
"twxs.cmake"
]
}
17 changes: 16 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,20 @@
"*.overlay": "dts",
"*.keymap": "dts"
},
"python.formatting.provider": "black"
"python.formatting.provider": "black",
"[c]": {
"editor.formatOnSave": true
},
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.python"
},
"[css][json][jsonc][html][markdown][yaml]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
3 changes: 2 additions & 1 deletion app/boards/arm/bluemicro840/bluemicro840_v1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@
};

&i2c0 {
compatible = "nordic,nrf-twim";
compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
Expand Down
8 changes: 8 additions & 0 deletions app/boards/arm/ckp/Kconfig
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 BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
16 changes: 16 additions & 0 deletions app/boards/arm/ckp/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CKP boards configuration

# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

config BOARD_BT60_V2
bool "bt60_v2"
depends on SOC_NRF52840_QIAA

config BOARD_BT65_V1
bool "bt65_v1"
depends on SOC_NRF52840_QIAA

config BOARD_BT75_V1
bool "bt75_v1"
depends on SOC_NRF52840_QIAA
34 changes: 34 additions & 0 deletions app/boards/arm/ckp/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

config BOARD
default "bt60_v2" if BOARD_BT60_V2
default "bt65_v1" if BOARD_BT65_V1
default "bt75_v1" if BOARD_BT75_V1
config ZMK_KEYBOARD_NAME
default "BT60 V2" if BOARD_BT60_V2
default "BT65" if BOARD_BT65_V1
default "BT75" if BOARD_BT75_V1

if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

if USB

config USB_NRFX
default y

config USB_DEVICE_STACK
default y

endif # USB

config BT_CTLR
default BT

config ZMK_BLE
default y

config ZMK_USB
default y

endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
4 changes: 4 additions & 0 deletions app/boards/arm/ckp/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT

board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
71 changes: 71 additions & 0 deletions app/boards/arm/ckp/bt60_v2.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

/dts-v1/;
#include "ckp.dtsi"


/ {
model = "BT60_V2";
compatible = "polarityworks,bt60_v2";

chosen {
zmk,matrix_transform = &ansi_transform;
};


ansi_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
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(1,10) RC(1,11) RC(1,12) RC(1,13)
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(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
>;
};

iso_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
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(1,10) RC(1,11) RC(1,12) RC(1,13)
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(2,10) RC(2,11) RC(2,12)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
>;
};

all_1u_transform: keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
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(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
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(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14)
>;
};

hhkb_transform: keymap_transform_3 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
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(1,10) RC(1,11) RC(1,12) RC(1,13)
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(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13)
>;
};
};
Loading

0 comments on commit ca4d994

Please sign in to comment.