diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5e123bd59..7e81e779d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/zmkfirmware/zmk-dev-arm:3.5 +FROM docker.io/zmkfirmware/zmk-dev-arm:4.1-branch COPY .bashrc tmp RUN mv /tmp/.bashrc ~/.bashrc diff --git a/.github/workflows/ble-test.yml b/.github/workflows/ble-test.yml index 7d76fb9e9..981fffd59 100644 --- a/.github/workflows/ble-test.yml +++ b/.github/workflows/ble-test.yml @@ -35,7 +35,7 @@ jobs: test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.5 + image: docker.io/zmkfirmware/zmk-build-arm:4.1 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index cf3247d04..4d4e885ad 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -57,7 +57,7 @@ jobs: echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV - name: Prepare variables - shell: sh -x {0} + shell: bash -x {0} env: board: ${{ matrix.board }} shield: ${{ matrix.shield }} @@ -81,7 +81,7 @@ jobs: echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV - echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV + echo "artifact_name=${artifact_name:-${shield:+$shield-}${board//\//_}-zmk}" >> $GITHUB_ENV - name: Copy config files to isolated temporary directory run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3307b006a..32e084cbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: if: ${{ always() }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.5 + image: docker.io/zmkfirmware/zmk-build-arm:4.1 needs: compile-matrix strategy: matrix: @@ -123,7 +123,7 @@ jobs: } const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : ''; - const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`; + const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`.replaceAll('/', '_'); await artifact.uploadArtifact(artifactName, files, rootDirectory, options); } catch (e) { diff --git a/.github/workflows/hardware-metadata-validation.yml b/.github/workflows/hardware-metadata-validation.yml index 3e3faa0df..c5fcd4a4d 100644 --- a/.github/workflows/hardware-metadata-validation.yml +++ b/.github/workflows/hardware-metadata-validation.yml @@ -18,7 +18,7 @@ jobs: validate-metadata: runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-dev-arm:3.5 + image: docker.io/zmkfirmware/zmk-dev-arm:4.1 steps: - uses: actions/checkout@v4 - name: Install dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93321760e..cf7d29121 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.5 + image: docker.io/zmkfirmware/zmk-build-arm:4.1 steps: - name: Checkout uses: actions/checkout@v4 @@ -66,7 +66,7 @@ jobs: run: west zephyr-export - name: Test ${{ matrix.test }} working-directory: app - run: west test tests/${{ matrix.test }} + run: ZMK_TESTS_VERBOSE=1 west test tests/${{ matrix.test }} - name: Archive artifacts if: ${{ always() }} uses: actions/upload-artifact@v4 diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 60c502fcd..cc38244a4 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -23,6 +23,7 @@ zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h) # Add your source file to the "app" target. This must come after # find_package(Zephyr) which defines the target. target_include_directories(app PRIVATE include) +add_subdirectory(src/boot) target_sources(app PRIVATE src/stdlib.c) target_sources(app PRIVATE src/activity.c) target_sources(app PRIVATE src/behavior.c) diff --git a/app/Kconfig b/app/Kconfig index d5a3bccd1..770c6ee1c 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -31,10 +31,10 @@ config BT_DIS_PNP_VID config BT_DIS_PNP_PID default 0x615E -config BT_DIS_MODEL +config BT_DIS_MODEL_NUMBER_STR default ZMK_KEYBOARD_NAME -config BT_DIS_MANUF +config BT_DIS_MANUF_NAME_STR default "ZMK Project" # Hardware specific overrides @@ -131,6 +131,9 @@ config ZMK_USB_BOOT select USB_HID_BOOT_PROTOCOL select USB_DEVICE_SOF +config USB_DEVICE_INITIALIZE_AT_BOOT + default n + if ZMK_USB config USB_NUMOF_EP_WRITE_RETRIES @@ -185,10 +188,6 @@ config BT_SMP_ALLOW_UNAUTH_OVERWRITE config BT_CTLR_PHY_2M default n if ZMK_BLE_EXPERIMENTAL_CONN -# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI -config BT_TINYCRYPT_ECC - default y if BT_HCI && !BT_CTLR - config ZMK_BLE_THREAD_STACK_SIZE int "BLE notify thread stack size" default 768 @@ -475,13 +474,15 @@ endmenu menu "Advanced" +rsource "src/boot/Kconfig" + menu "Initialization Priorities" if USB_DEVICE_STACK config ZMK_USB_INIT_PRIORITY int "USB Init Priority" - default 94 + default 96 config ZMK_USB_HID_INIT_PRIORITY int "USB HID Init Priority" @@ -650,6 +651,13 @@ endmenu # Advanced endmenu # ZMK +if SOC_FAMILY_NORDIC_NRF + +config NRF_SOC_VALIDATE_HEADERS_DISABLED + default y + +endif + config KERNEL_BIN_NAME default "zmk" @@ -684,11 +692,6 @@ config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION endif # ZMK_KEYMAP_SENSORS -choice CBPRINTF_IMPLEMENTATION - default CBPRINTF_NANO - -endchoice - module = ZMK module-str = zmk source "subsys/logging/Kconfig.template.log_config" @@ -702,8 +705,6 @@ rsource "boards/shields/*/Kconfig.shield" # Duplicated from Kconfig.zephyr osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig" -source "$(BOARD_DIR)/Kconfig.defconfig" - # This loads board and shield Kconfigs found under zmk-config/config/ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig" osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield" diff --git a/app/Kconfig.defaults b/app/Kconfig.defaults index 30aaef210..8800b454f 100644 --- a/app/Kconfig.defaults +++ b/app/Kconfig.defaults @@ -2,8 +2,8 @@ # SPDX-License-Identifier: MIT config SYSTEM_WORKQUEUE_STACK_SIZE - default 2048 if SOC_RP2040 - default 2048 if ZMK_BLE + default 3072 if ZMK_DISPLAY + default 2048 # Basic config BT_DEVICE_APPEARANCE @@ -114,4 +114,5 @@ config ZMK_BATTERY_REPORT_INTERVAL default 60 # Imports +rsource "src/boot/Kconfig.defaults" rsource "src/split/Kconfig.defaults" diff --git a/app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml b/app/boards/adafruit/kb2040/adafruit_kb2040.zmk.yml similarity index 100% rename from app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml rename to app/boards/adafruit/kb2040/adafruit_kb2040.zmk.yml diff --git a/app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml b/app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml similarity index 100% rename from app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml rename to app/boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml diff --git a/app/boards/seeeduino_xiao_rp2040.conf b/app/boards/adafruit_metro_rp2040.conf similarity index 100% rename from app/boards/seeeduino_xiao_rp2040.conf rename to app/boards/adafruit_metro_rp2040.conf diff --git a/app/boards/arm/adv360pro/Kconfig b/app/boards/arm/adv360pro/Kconfig deleted file mode 100644 index 1840851c2..000000000 --- a/app/boards/arm/adv360pro/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT diff --git a/app/boards/arm/adv360pro/Kconfig.board b/app/boards/arm/adv360pro/Kconfig.board deleted file mode 100644 index 51ebaec07..000000000 --- a/app/boards/arm/adv360pro/Kconfig.board +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2023 The ZMK Contributors -# SPDX-License-Identifier: MIT -# - -config BOARD_ADV360PRO_LEFT - bool "adv360pro_left" - depends on SOC_NRF52840_QIAA - -config BOARD_ADV360PRO_RIGHT - bool "adv360pro_right" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bdn9/Kconfig.board b/app/boards/arm/bdn9/Kconfig.board deleted file mode 100644 index 76a204cc4..000000000 --- a/app/boards/arm/bdn9/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# keeb.io BDN9 board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_BDN9 - bool "BDN9 rev2" - depends on SOC_STM32F072XB diff --git a/app/boards/arm/bdn9/bdn9_rev2.yml b/app/boards/arm/bdn9/bdn9_rev2.yml deleted file mode 100644 index 01ebd3e0b..000000000 --- a/app/boards/arm/bdn9/bdn9_rev2.yml +++ /dev/null @@ -1,11 +0,0 @@ -file_format: "1" -id: bdn9_rev2 -name: BDN9 Rev2 -type: board -arch: arm -features: - - keys - - encoder -outputs: - - usb -url: https://keeb.io/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb diff --git a/app/boards/arm/bluemicro840/Kconfig.board b/app/boards/arm/bluemicro840/Kconfig.board deleted file mode 100644 index e27940157..000000000 --- a/app/boards/arm/bluemicro840/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# BlueMicro840 board configuration - -# Copyright (c) 2020 Pete Johanson, Derek Schmell -# SPDX-License-Identifier: MIT - -config BOARD_BLUEMICRO840_V1 - bool "BlueMicro840_V1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bt60/Kconfig b/app/boards/arm/bt60/Kconfig deleted file mode 100644 index d57a6b7ef..000000000 --- a/app/boards/arm/bt60/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1) diff --git a/app/boards/arm/bt60/Kconfig.board b/app/boards/arm/bt60/Kconfig.board deleted file mode 100644 index 24c0a8b5b..000000000 --- a/app/boards/arm/bt60/Kconfig.board +++ /dev/null @@ -1,12 +0,0 @@ -# BT60 board configuration - -# Copyright (c) 2021 Polarity Works -# SPDX-License-Identifier: MIT - -config BOARD_BT60_V1 - bool "bt60" - depends on SOC_NRF52840_QIAA - -config BOARD_BT60_V1_HS - bool "bt60 hotswap" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bt60/bt60_v1.zmk.yml b/app/boards/arm/bt60/bt60_v1.zmk.yml deleted file mode 100644 index 4c0faf9fd..000000000 --- a/app/boards/arm/bt60/bt60_v1.zmk.yml +++ /dev/null @@ -1,13 +0,0 @@ -file_format: "1" -id: bt60_v1 -name: BT60 V1 Soldered -type: board -arch: arm -features: - - keys - - encoder - - studio -outputs: - - usb - - ble -url: https://polarityworks.com diff --git a/app/boards/arm/bt60/bt60_v1_hs.yaml b/app/boards/arm/bt60/bt60_v1_hs.yaml deleted file mode 100644 index 5a73753b5..000000000 --- a/app/boards/arm/bt60/bt60_v1_hs.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: bt60_v1_hs -name: BT60 V1 Hotswap -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/ckp/Kconfig b/app/boards/arm/ckp/Kconfig deleted file mode 100644 index 7baf14861..000000000 --- a/app/boards/arm/ckp/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# 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 diff --git a/app/boards/arm/ckp/Kconfig.board b/app/boards/arm/ckp/Kconfig.board deleted file mode 100644 index a98a31673..000000000 --- a/app/boards/arm/ckp/Kconfig.board +++ /dev/null @@ -1,16 +0,0 @@ -# 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 diff --git a/app/boards/arm/ckp/Kconfig.defconfig b/app/boards/arm/ckp/Kconfig.defconfig deleted file mode 100644 index 376d4619f..000000000 --- a/app/boards/arm/ckp/Kconfig.defconfig +++ /dev/null @@ -1,28 +0,0 @@ -# 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 - -endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 diff --git a/app/boards/arm/corneish_zen/Kconfig b/app/boards/arm/corneish_zen/Kconfig deleted file mode 100644 index 33d926092..000000000 --- a/app/boards/arm/corneish_zen/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT -# - -config BOARD_CORNEISH_ZEN_LEFT - bool - -config BOARD_CORNEISH_ZEN_RIGHT - bool diff --git a/app/boards/arm/corneish_zen/Kconfig.board b/app/boards/arm/corneish_zen/Kconfig.board deleted file mode 100644 index ffb3ab1f4..000000000 --- a/app/boards/arm/corneish_zen/Kconfig.board +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2022 Darryl deHaan -# SPDX-License-Identifier: MIT -# - -config BOARD_CORNEISH_ZEN_V1_LEFT - bool "corneish zen left v1" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_LEFT - -config BOARD_CORNEISH_ZEN_V1_RIGHT - bool "corneish zen right v1" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_RIGHT - -config BOARD_CORNEISH_ZEN_V2_LEFT - bool "corneish zen left v2" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_LEFT - -config BOARD_CORNEISH_ZEN_V2_RIGHT - bool "corneish zen right v2" - depends on SOC_NRF52840_QIAA - select BOARD_CORNEISH_ZEN_RIGHT diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2.yaml b/app/boards/arm/corneish_zen/corneish_zen_v2.yaml deleted file mode 100644 index 46a213d9c..000000000 --- a/app/boards/arm/corneish_zen/corneish_zen_v2.yaml +++ /dev/null @@ -1,20 +0,0 @@ -identifier: corneish_zen_v2 -name: Corne-ish Zen v2 -type: keyboard -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - gpio - - i2c - - counter - - spi - - usb_device - - lsm303dlhc - - nvs - - can - - kscan - - ble - - adc diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2.zmk.yml b/app/boards/arm/corneish_zen/corneish_zen_v2.zmk.yml deleted file mode 100644 index 26981e05d..000000000 --- a/app/boards/arm/corneish_zen/corneish_zen_v2.zmk.yml +++ /dev/null @@ -1,16 +0,0 @@ -file_format: "1" -id: corneish_zen_v2 -name: Corneish Zen v2 -url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen -type: board -arch: arm -features: - - keys - - display - - studio -outputs: - - usb - - ble -siblings: - - corneish_zen_v2_left - - corneish_zen_v2_right diff --git a/app/boards/arm/dz60rgb/Kconfig.board b/app/boards/arm/dz60rgb/Kconfig.board deleted file mode 100644 index ba09e2dd4..000000000 --- a/app/boards/arm/dz60rgb/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_DZ60RGB_REV1 - bool "DZ60RGB Keyboard" - depends on SOC_STM32F303XC diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig deleted file mode 100644 index 6e0592569..000000000 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# DZ60RGB keyboard configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -if BOARD_DZ60RGB_REV1 - -config ZMK_KEYBOARD_NAME - default "DZ60RGB Rev 1" - -endif # BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts deleted file mode 100644 index b8fac4e28..000000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -/dts-v1/; -#include - -#include - -/ { - model = "DZ60RGB, Rev 1"; - compatible = "dz60rgb,rev1", "st,stm32f303"; - - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; - 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(0,10) RC(0,11) RC(0,12) RC(0,13) -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,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,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,13) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - - diode-direction = "col2row"; - row-gpios - = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpioa 6 GPIO_ACTIVE_HIGH> - , <&gpioa 7 GPIO_ACTIVE_HIGH> - , <&gpiob 0 GPIO_ACTIVE_HIGH> - , <&gpiob 13 GPIO_ACTIVE_HIGH> - , <&gpiob 15 GPIO_ACTIVE_HIGH> - , <&gpioa 8 GPIO_ACTIVE_HIGH> - , <&gpioa 15 GPIO_ACTIVE_HIGH> - , <&gpiob 3 GPIO_ACTIVE_HIGH> - , <&gpiob 4 GPIO_ACTIVE_HIGH> - , <&gpiob 5 GPIO_ACTIVE_HIGH> - , <&gpiob 8 GPIO_ACTIVE_HIGH> - , <&gpiob 9 GPIO_ACTIVE_HIGH> - , <&gpioc 13 GPIO_ACTIVE_HIGH> - , <&gpioc 14 GPIO_ACTIVE_HIGH> - ; - }; - -}; - -zephyr_udc0: &usb { - status = "okay"; -}; - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - /* Set 6Kb of storage at the end of the 256Kb of flash */ - storage_partition: partition@3e800 { - reg = <0x0003e800 0x00001800>; - }; - }; -}; diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap b/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap deleted file mode 100644 index eaf5d5dab..000000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { -// ------------------------------------------------------------------------------------------ -// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | -// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | -// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | -// | SHIFT | Z | X | C | V | B | N | M | , | . | SHIFT(/) | ^ | DEL | -// | CTL | WIN | ALT | SPACE | ALT | MO(1) | <- | v | -> | -// ------------------------------------------------------------------------------------------ - bindings = < - &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH - &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH &kp UP &kp DEL - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp LEFT &kp DOWN &kp RIGHT - >; - }; - }; -}; \ No newline at end of file diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml b/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml deleted file mode 100644 index d2836218a..000000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.yaml +++ /dev/null @@ -1,19 +0,0 @@ -identifier: DZ60RGB_rev1 -name: DZ60RGBREV1 -type: keyboard -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -ram: 40 -supported: - - gpio - - i2c - - counter - - spi - - usb_device - - lsm303dlhc - - nvs - - can - - kscan diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig deleted file mode 100644 index 6b6c8a48d..000000000 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-License-Identifier: MIT - -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y -# 72MHz system clock -CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 - -# enable GPIO -CONFIG_GPIO=y - -# clock configuration -CONFIG_CLOCK_CONTROL=y - -# Clock configuration for Cube Clock control driver -CONFIG_CLOCK_STM32_HSE_CLOCK=8000000 -CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y -# use HSE as PLL input -CONFIG_CLOCK_STM32_PLL_SRC_HSE=y -# produce 72MHz clock at PLL output -CONFIG_CLOCK_STM32_PLL_PREDIV=1 -CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9 -CONFIG_CLOCK_STM32_AHB_PRESCALER=1 -CONFIG_CLOCK_STM32_APB1_PRESCALER=2 -CONFIG_CLOCK_STM32_APB2_PRESCALER=1 - -CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/ferris/Kconfig.board b/app/boards/arm/ferris/Kconfig.board deleted file mode 100644 index 70ee895d8..000000000 --- a/app/boards/arm/ferris/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Ferris board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_FERRIS - bool "Ferris rev 0.2" - depends on SOC_STM32F072XB diff --git a/app/boards/arm/glove80/Kconfig b/app/boards/arm/glove80/Kconfig deleted file mode 100644 index f1c12e7e3..000000000 --- a/app/boards/arm/glove80/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_GLOVE80_LH || BOARD_GLOVE80_RH) diff --git a/app/boards/arm/glove80/Kconfig.board b/app/boards/arm/glove80/Kconfig.board deleted file mode 100644 index f68910371..000000000 --- a/app/boards/arm/glove80/Kconfig.board +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_GLOVE80_LH - bool "Glove80 LH" - depends on SOC_NRF52840_QIAA - -config BOARD_GLOVE80_RH - bool "Glove80 RH" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.board b/app/boards/arm/kbdfans_tofu65/Kconfig.board deleted file mode 100644 index 954166b71..000000000 --- a/app/boards/arm/kbdfans_tofu65/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2023 The ZMK Contributors -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_KBDFANS_TOFU65_V2 - bool "KBDfans Tofu65 2.0" - depends on SOC_RP2040 diff --git a/app/boards/arm/mikoto/Kconfig.board b/app/boards/arm/mikoto/Kconfig.board deleted file mode 100644 index b51dce8ad..000000000 --- a/app/boards/arm/mikoto/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# mikoto board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_MIKOTO - bool "mikoto" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/mikoto/revision.cmake b/app/boards/arm/mikoto/revision.cmake deleted file mode 100644 index 12fd4bd4d..000000000 --- a/app/boards/arm/mikoto/revision.cmake +++ /dev/null @@ -1,7 +0,0 @@ -board_check_revision(FORMAT MAJOR.MINOR.PATCH - DEFAULT_REVISION 5.20.0 - VALID_REVISIONS - 5.20.0 # first public release - 6.1.0 6.3.0 # incompatible pinout change from v5+ - 7.2.0 # addition of MAX17048; compatible pinout with v6+ -) diff --git a/app/boards/arm/nice60/Kconfig.board b/app/boards/arm/nice60/Kconfig.board deleted file mode 100644 index 88db9ee86..000000000 --- a/app/boards/arm/nice60/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2021 Nick Winans -# SPDX-License-Identifier: MIT - -config BOARD_NICE60 - bool "nice!60" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nice_nano/Kconfig b/app/boards/arm/nice_nano/Kconfig deleted file mode 100644 index 18a0a12e1..000000000 --- a/app/boards/arm/nice_nano/Kconfig +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_NICE_NANO || BOARD_NICE_NANO_V2) - -config BOARD_ENABLE_DCDC_HV - bool "High voltage DCDC converter" - select SOC_DCDC_NRF52X_HV - default n - depends on (BOARD_NICE_NANO_V2) diff --git a/app/boards/arm/nice_nano/Kconfig.board b/app/boards/arm/nice_nano/Kconfig.board deleted file mode 100644 index 8dd165123..000000000 --- a/app/boards/arm/nice_nano/Kconfig.board +++ /dev/null @@ -1,13 +0,0 @@ -# nice!nano board configuration - -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -config BOARD_NICE_NANO - bool "nice!nano" - depends on SOC_NRF52840_QIAA - -config BOARD_NICE_NANO_V2 - bool "nice!nano v2" - depends on SOC_NRF52840_QIAA - diff --git a/app/boards/arm/nice_nano/Kconfig.defconfig b/app/boards/arm/nice_nano/Kconfig.defconfig deleted file mode 100644 index 63102a571..000000000 --- a/app/boards/arm/nice_nano/Kconfig.defconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -if BOARD_NICE_NANO || BOARD_NICE_NANO_V2 - -config BOARD - default "nice_nano" - -if USB_DEVICE_STACK - -config USB_NRFX - default y - -endif # USB_DEVICE_STACK - -config BT_CTLR - default BT - -endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2 diff --git a/app/boards/arm/nice_nano/nice_nano_v2.yaml b/app/boards/arm/nice_nano/nice_nano_v2.yaml deleted file mode 100644 index d050ce993..000000000 --- a/app/boards/arm/nice_nano/nice_nano_v2.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: nice_nano_v2 -name: nice!nano v2 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/nice_nano/nice_nano_v2.zmk.yml b/app/boards/arm/nice_nano/nice_nano_v2.zmk.yml deleted file mode 100644 index 3d1149a0c..000000000 --- a/app/boards/arm/nice_nano/nice_nano_v2.zmk.yml +++ /dev/null @@ -1,10 +0,0 @@ -file_format: "1" -id: nice_nano_v2 -name: nice!nano v2 -type: board -arch: arm -outputs: - - usb - - ble -url: https://nicekeyboards.com/nice-nano -exposes: [pro_micro] diff --git a/app/boards/arm/nrf52840_m2/Kconfig.board b/app/boards/arm/nrf52840_m2/Kconfig.board deleted file mode 100644 index b2927ff25..000000000 --- a/app/boards/arm/nrf52840_m2/Kconfig.board +++ /dev/null @@ -1,9 +0,0 @@ -# Maker Diary nrf52840 M.2 board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_NRF52840_M2 - bool "nrf52480_m2" - depends on SOC_NRF52840_QIAA - diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig deleted file mode 100644 index 233ddbad4..000000000 --- a/app/boards/arm/nrfmicro/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) - -config BOARD_NRFMICRO_CHARGER - bool "Enable battery charger" - default y - depends on (BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) diff --git a/app/boards/arm/nrfmicro/Kconfig.board b/app/boards/arm/nrfmicro/Kconfig.board deleted file mode 100644 index 441de5cff..000000000 --- a/app/boards/arm/nrfmicro/Kconfig.board +++ /dev/null @@ -1,20 +0,0 @@ -# nrfmicro board configuration - -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_NRFMICRO_11 - bool "nrfmicro_11" - depends on SOC_NRF52840_QIAA - -config BOARD_NRFMICRO_11_FLIPPED - bool "nrfmicro_11_flipped" - depends on SOC_NRF52840_QIAA - -config BOARD_NRFMICRO_13 - bool "nrfmicro_13" - depends on SOC_NRF52840_QIAA - -config BOARD_NRFMICRO_13_52833 - bool "nrfmicro_13_52833" - depends on SOC_NRF52833_QIAA diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts deleted file mode 100644 index b80ed4c62..000000000 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -/dts-v1/; -#include -#include "arduino_pro_micro_pins.dtsi" -#include "nrfmicro-pinctrl.dtsi" - -/ { - model = "nrfmicro"; - compatible = "joric,nrfmicro"; - - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - }; - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - }; - }; - - // Node name must match original "EXT_POWER" label to preserve user settings. - EXT_POWER { - compatible = "zmk,ext-power-generic"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; -}; - -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&spi1 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_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"; -}; - -zephyr_udc0: &usbd { - status = "okay"; -}; - - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - sd_partition: partition@0 { - reg = <0x00000000 0x00026000>; - }; - code_partition: partition@26000 { - reg = <0x00026000 0x000c6000>; - }; - - /* - * The flash starting at 0x000ec000 and ending at - * 0x000f3fff is reserved for use by the application. - */ - - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@ec000 { - reg = <0x000ec000 0x00008000>; - }; - - boot_partition: partition@f4000 { - reg = <0x000f4000 0x0000c000>; - }; - }; -}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig deleted file mode 100644 index 31cbfc9ae..000000000 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-License-Identifier: MIT - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRFMICRO_11_FLIPPED=y - -# Enable MPU -CONFIG_ARM_MPU=y - -CONFIG_PINCTRL=y - -# enable GPIO -CONFIG_GPIO=y - -CONFIG_USE_DT_CODE_PARTITION=y -CONFIG_BUILD_OUTPUT_UF2=y - -CONFIG_MPU_ALLOW_FLASH_WRITE=y -CONFIG_NVS=y -CONFIG_SETTINGS_NVS=y -CONFIG_FLASH=y -CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y -CONFIG_CLOCK_CONTROL_NRF=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y - -CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml b/app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml deleted file mode 100644 index 757ff860a..000000000 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml +++ /dev/null @@ -1,10 +0,0 @@ -file_format: "1" -id: nrfmicro_13_52833 -name: nRFMicro 1.3/1.4 (nRF52833) -type: board -arch: arm -outputs: - - usb - - ble -url: https://github.com/joric/nrfmicro/ -exposes: [pro_micro] diff --git a/app/boards/arm/pillbug/Kconfig.board b/app/boards/arm/pillbug/Kconfig.board deleted file mode 100644 index 70232e18a..000000000 --- a/app/boards/arm/pillbug/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_PILLBUG - bool "PillBug" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/proton_c/Kconfig.board b/app/boards/arm/proton_c/Kconfig.board deleted file mode 100644 index 1596077fc..000000000 --- a/app/boards/arm/proton_c/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# QMK Proton-C board configuration - -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -config BOARD_QMK_PROTON_C - bool "QMK Proton-C" - depends on SOC_STM32F303XC diff --git a/app/boards/arm/proton_c/Kconfig.defconfig b/app/boards/arm/proton_c/Kconfig.defconfig deleted file mode 100644 index eed4b8304..000000000 --- a/app/boards/arm/proton_c/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# QMK Proton-C board configuration - -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -if BOARD_QMK_PROTON_C - -config BOARD - default "proton_c" - -endif # BOARD_QMK_PROTON_C diff --git a/app/boards/arm/proton_c/board.cmake b/app/boards/arm/proton_c/board.cmake deleted file mode 100644 index 9da8ea911..000000000 --- a/app/boards/arm/proton_c/board.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT - -board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse") -board_runner_args(jlink "--device=STM32F303CC" "--speed=4000") - -include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake) -include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) diff --git a/app/boards/arm/puchi_ble/Kconfig.board b/app/boards/arm/puchi_ble/Kconfig.board deleted file mode 100644 index 0f5b7f96d..000000000 --- a/app/boards/arm/puchi_ble/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Puchi-BLE board configuration - -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_PUCHI_BLE_v1 - bool "puchi_ble_v1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.yaml b/app/boards/arm/puchi_ble/puchi_ble_v1.yaml deleted file mode 100644 index 187707222..000000000 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: puchi_ble_v1 -name: puchi_ble_v1 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/s40nc/Kconfig.board b/app/boards/arm/s40nc/Kconfig.board deleted file mode 100644 index e703d7269..000000000 --- a/app/boards/arm/s40nc/Kconfig.board +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -config BOARD_S40NC - bool "S40NC" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/adafruit_kb2040.conf b/app/boards/extensions/adafruit_kb2040/adafruit_kb2040.conf similarity index 50% rename from app/boards/adafruit_kb2040.conf rename to app/boards/extensions/adafruit_kb2040/adafruit_kb2040.conf index 21c1893d9..9c394f2c9 100644 --- a/app/boards/adafruit_kb2040.conf +++ b/app/boards/extensions/adafruit_kb2040/adafruit_kb2040.conf @@ -2,3 +2,7 @@ CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_ZMK_USB=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y \ No newline at end of file diff --git a/app/boards/adafruit_kb2040.overlay b/app/boards/extensions/adafruit_kb2040/adafruit_kb2040.overlay similarity index 68% rename from app/boards/adafruit_kb2040.overlay rename to app/boards/extensions/adafruit_kb2040/adafruit_kb2040.overlay index 72b3adcaf..bf3fd17a5 100644 --- a/app/boards/adafruit_kb2040.overlay +++ b/app/boards/extensions/adafruit_kb2040/adafruit_kb2040.overlay @@ -4,4 +4,6 @@ * SPDX-License-Identifier: MIT */ +#include + &pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/adafruit_qt_py_rp2040.conf b/app/boards/extensions/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.conf similarity index 50% rename from app/boards/adafruit_qt_py_rp2040.conf rename to app/boards/extensions/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.conf index 21c1893d9..9c394f2c9 100644 --- a/app/boards/adafruit_qt_py_rp2040.conf +++ b/app/boards/extensions/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.conf @@ -2,3 +2,7 @@ CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_ZMK_USB=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y \ No newline at end of file diff --git a/app/boards/adafruit_qt_py_rp2040.overlay b/app/boards/extensions/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.overlay similarity index 67% rename from app/boards/adafruit_qt_py_rp2040.overlay rename to app/boards/extensions/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.overlay index b5d2cdb2f..a68455c4a 100644 --- a/app/boards/adafruit_qt_py_rp2040.overlay +++ b/app/boards/extensions/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.overlay @@ -4,4 +4,6 @@ * SPDX-License-Identifier: MIT */ +#include + &xiao_serial { status = "disabled"; }; diff --git a/app/boards/blackpill_f401cc.conf b/app/boards/extensions/blackpill_f401cc/blackpill_f401cc.conf similarity index 100% rename from app/boards/blackpill_f401cc.conf rename to app/boards/extensions/blackpill_f401cc/blackpill_f401cc.conf diff --git a/app/boards/blackpill_f401cc.overlay b/app/boards/extensions/blackpill_f401cc/blackpill_f401cc.overlay similarity index 100% rename from app/boards/blackpill_f401cc.overlay rename to app/boards/extensions/blackpill_f401cc/blackpill_f401cc.overlay diff --git a/app/boards/blackpill_f401ce.conf b/app/boards/extensions/blackpill_f401ce/blackpill_f401ce.conf similarity index 100% rename from app/boards/blackpill_f401ce.conf rename to app/boards/extensions/blackpill_f401ce/blackpill_f401ce.conf diff --git a/app/boards/blackpill_f401ce.overlay b/app/boards/extensions/blackpill_f401ce/blackpill_f401ce.overlay similarity index 100% rename from app/boards/blackpill_f401ce.overlay rename to app/boards/extensions/blackpill_f401ce/blackpill_f401ce.overlay diff --git a/app/boards/blackpill_f411ce.conf b/app/boards/extensions/blackpill_f411ce/blackpill_f411ce.conf similarity index 100% rename from app/boards/blackpill_f411ce.conf rename to app/boards/extensions/blackpill_f411ce/blackpill_f411ce.conf diff --git a/app/boards/blackpill_f411ce.overlay b/app/boards/extensions/blackpill_f411ce/blackpill_f411ce.overlay similarity index 100% rename from app/boards/blackpill_f411ce.overlay rename to app/boards/extensions/blackpill_f411ce/blackpill_f411ce.overlay diff --git a/app/boards/boardsource_blok.conf b/app/boards/extensions/boardsource_blok/boardsource_blok.conf similarity index 50% rename from app/boards/boardsource_blok.conf rename to app/boards/extensions/boardsource_blok/boardsource_blok.conf index 21c1893d9..9c394f2c9 100644 --- a/app/boards/boardsource_blok.conf +++ b/app/boards/extensions/boardsource_blok/boardsource_blok.conf @@ -2,3 +2,7 @@ CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_ZMK_USB=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y \ No newline at end of file diff --git a/app/boards/boardsource_blok.overlay b/app/boards/extensions/boardsource_blok/boardsource_blok.overlay similarity index 68% rename from app/boards/boardsource_blok.overlay rename to app/boards/extensions/boardsource_blok/boardsource_blok.overlay index 72b3adcaf..bf3fd17a5 100644 --- a/app/boards/boardsource_blok.overlay +++ b/app/boards/extensions/boardsource_blok/boardsource_blok.overlay @@ -4,4 +4,6 @@ * SPDX-License-Identifier: MIT */ +#include + &pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/native_posix_64.overlay b/app/boards/extensions/native_sim/native_sim.overlay similarity index 100% rename from app/boards/native_posix_64.overlay rename to app/boards/extensions/native_sim/native_sim.overlay diff --git a/app/boards/extensions/native_sim/native_sim_64.overlay b/app/boards/extensions/native_sim/native_sim_64.overlay new file mode 100644 index 000000000..277e45328 --- /dev/null +++ b/app/boards/extensions/native_sim/native_sim_64.overlay @@ -0,0 +1,32 @@ + +#include +#include + +/ { + chosen { + zephyr,console = &uart0; + zmk,kscan = &kscan; + }; + + kscan: native_posix_64_kscan_mock { + compatible = "zmk,kscan-mock"; + + rows = <2>; + columns = <2>; + exit-after; + }; + + uart0: uart { + status = "okay"; + compatible = "zephyr,native-posix-uart"; + /* Dummy current-speed entry to comply with serial + * DTS binding + */ + current-speed = <0>; + }; +}; + +&sdl_dc { + width = <128>; + height = <32>; +}; \ No newline at end of file diff --git a/app/boards/native_posix_64.conf b/app/boards/extensions/native_sim/native_sim_native_64.conf similarity index 100% rename from app/boards/native_posix_64.conf rename to app/boards/extensions/native_sim/native_sim_native_64.conf diff --git a/app/boards/nrf52840dk_nrf52840.conf b/app/boards/extensions/nrf52840dk/nrf52840dk_nrf52840.conf similarity index 100% rename from app/boards/nrf52840dk_nrf52840.conf rename to app/boards/extensions/nrf52840dk/nrf52840dk_nrf52840.conf diff --git a/app/boards/nrf52840dongle_nrf52840.conf b/app/boards/extensions/nrf52840dongle/nrf52840dongle_nrf52840.conf similarity index 100% rename from app/boards/nrf52840dongle_nrf52840.conf rename to app/boards/extensions/nrf52840dongle/nrf52840dongle_nrf52840.conf diff --git a/app/boards/nrf5340dk_nrf5340_cpuapp.conf b/app/boards/extensions/nrf5340dk/nrf5340dk_nrf5340_cpuapp.conf similarity index 100% rename from app/boards/nrf5340dk_nrf5340_cpuapp.conf rename to app/boards/extensions/nrf5340dk/nrf5340dk_nrf5340_cpuapp.conf diff --git a/app/boards/nrf5340dk_nrf5340_cpuapp.overlay b/app/boards/extensions/nrf5340dk/nrf5340dk_nrf5340_cpuapp.overlay similarity index 100% rename from app/boards/nrf5340dk_nrf5340_cpuapp.overlay rename to app/boards/extensions/nrf5340dk/nrf5340dk_nrf5340_cpuapp.overlay diff --git a/app/boards/nrf52_bsim.conf b/app/boards/extensions/nrf_bsim/nrf52_bsim.conf similarity index 100% rename from app/boards/nrf52_bsim.conf rename to app/boards/extensions/nrf_bsim/nrf52_bsim.conf diff --git a/app/boards/nrf52_bsim.overlay b/app/boards/extensions/nrf_bsim/nrf52_bsim.overlay similarity index 100% rename from app/boards/nrf52_bsim.overlay rename to app/boards/extensions/nrf_bsim/nrf52_bsim.overlay diff --git a/app/boards/01space_rp2040_042lcd.conf b/app/boards/extensions/rp2040_042lcd/01space_rp2040_042lcd.conf similarity index 100% rename from app/boards/01space_rp2040_042lcd.conf rename to app/boards/extensions/rp2040_042lcd/01space_rp2040_042lcd.conf diff --git a/app/boards/01space_rp2040_042lcd.overlay b/app/boards/extensions/rp2040_042lcd/01space_rp2040_042lcd.overlay similarity index 100% rename from app/boards/01space_rp2040_042lcd.overlay rename to app/boards/extensions/rp2040_042lcd/01space_rp2040_042lcd.overlay diff --git a/app/boards/seeeduino_xiao_ble.conf b/app/boards/extensions/rpi_pico/rpi_pico.conf similarity index 70% rename from app/boards/seeeduino_xiao_ble.conf rename to app/boards/extensions/rpi_pico/rpi_pico.conf index 205f67e91..147adc6d7 100644 --- a/app/boards/seeeduino_xiao_ble.conf +++ b/app/boards/extensions/rpi_pico/rpi_pico.conf @@ -1,15 +1,16 @@ - CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y - CONFIG_MPU_ALLOW_FLASH_WRITE=y CONFIG_NVS=y CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file +CONFIG_FLASH_MAP=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y \ No newline at end of file diff --git a/app/boards/rpi_pico.overlay b/app/boards/extensions/rpi_pico/rpi_pico.overlay similarity index 82% rename from app/boards/rpi_pico.overlay rename to app/boards/extensions/rpi_pico/rpi_pico.overlay index 5368ab290..b0aed7610 100644 --- a/app/boards/rpi_pico.overlay +++ b/app/boards/extensions/rpi_pico/rpi_pico.overlay @@ -1,3 +1,4 @@ +#include &uart0 { status = "disabled"; }; diff --git a/app/boards/seeeduino_xiao.conf b/app/boards/extensions/seeeduino_xiao/seeeduino_xiao.conf similarity index 100% rename from app/boards/seeeduino_xiao.conf rename to app/boards/extensions/seeeduino_xiao/seeeduino_xiao.conf diff --git a/app/boards/sparkfun_pro_micro_rp2040.conf b/app/boards/extensions/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.conf similarity index 67% rename from app/boards/sparkfun_pro_micro_rp2040.conf rename to app/boards/extensions/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.conf index 354d70074..70b90914d 100644 --- a/app/boards/sparkfun_pro_micro_rp2040.conf +++ b/app/boards/extensions/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.conf @@ -8,4 +8,8 @@ CONFIG_NVS=y CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file +CONFIG_FLASH_MAP=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y \ No newline at end of file diff --git a/app/boards/sparkfun_pro_micro_rp2040.overlay b/app/boards/extensions/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.overlay similarity index 88% rename from app/boards/sparkfun_pro_micro_rp2040.overlay rename to app/boards/extensions/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.overlay index 21aa7dff7..ac83d9816 100644 --- a/app/boards/sparkfun_pro_micro_rp2040.overlay +++ b/app/boards/extensions/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: MIT */ +#include + &pro_micro_serial { status = "disabled"; }; // We override to 2MB for maximum compatibility diff --git a/app/boards/extensions/xiao_ble/xiao_ble.conf b/app/boards/extensions/xiao_ble/xiao_ble.conf new file mode 100644 index 000000000..49eaacf65 --- /dev/null +++ b/app/boards/extensions/xiao_ble/xiao_ble.conf @@ -0,0 +1,20 @@ + +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_UART_INTERRUPT_DRIVEN=n +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y +CONFIG_ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52=y diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/extensions/xiao_ble/xiao_ble.overlay similarity index 86% rename from app/boards/seeeduino_xiao_ble.overlay rename to app/boards/extensions/xiao_ble/xiao_ble.overlay index 3b7710ef6..331b8fb74 100644 --- a/app/boards/seeeduino_xiao_ble.overlay +++ b/app/boards/extensions/xiao_ble/xiao_ble.overlay @@ -4,6 +4,10 @@ * SPDX-License-Identifier: MIT */ +#include + +/* Add an sd_partition label for compatibility with the nosd snippet */ +sd_partition: &reserved_partition_0 { }; / { chosen { diff --git a/app/boards/rpi_pico.conf b/app/boards/extensions/xiao_rp2040/xiao_rp2040.conf similarity index 66% rename from app/boards/rpi_pico.conf rename to app/boards/extensions/xiao_rp2040/xiao_rp2040.conf index 286ec25ab..1f7d85b36 100644 --- a/app/boards/rpi_pico.conf +++ b/app/boards/extensions/xiao_rp2040/xiao_rp2040.conf @@ -1,7 +1,6 @@ CONFIG_CONSOLE=n CONFIG_SERIAL=n CONFIG_UART_CONSOLE=n -CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ZMK_USB=y CONFIG_MPU_ALLOW_FLASH_WRITE=y @@ -9,4 +8,8 @@ CONFIG_NVS=y CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file +CONFIG_FLASH_MAP=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y diff --git a/app/boards/seeeduino_xiao_rp2040.overlay b/app/boards/extensions/xiao_rp2040/xiao_rp2040.overlay similarity index 87% rename from app/boards/seeeduino_xiao_rp2040.overlay rename to app/boards/extensions/xiao_rp2040/xiao_rp2040.overlay index e6ba81364..8f2e87143 100644 --- a/app/boards/seeeduino_xiao_rp2040.overlay +++ b/app/boards/extensions/xiao_rp2040/xiao_rp2040.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: MIT */ +#include + &xiao_serial { status = "disabled"; }; &code_partition { diff --git a/app/boards/arm/mikoto/CMakeLists.txt b/app/boards/joric/nrfmicro/CMakeLists.txt similarity index 100% rename from app/boards/arm/mikoto/CMakeLists.txt rename to app/boards/joric/nrfmicro/CMakeLists.txt diff --git a/app/boards/joric/nrfmicro/Kconfig b/app/boards/joric/nrfmicro/Kconfig new file mode 100644 index 000000000..f8e10e63a --- /dev/null +++ b/app/boards/joric/nrfmicro/Kconfig @@ -0,0 +1,4 @@ +config BOARD_NRFMICRO_CHARGER + bool "Enable battery charger" + default y + depends on (BOARD_NRFMICRO && BOARD_REVISION = "1.3.0") diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/joric/nrfmicro/Kconfig.defconfig similarity index 50% rename from app/boards/arm/nrfmicro/Kconfig.defconfig rename to app/boards/joric/nrfmicro/Kconfig.defconfig index 38daacde3..9207183e4 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/boards/joric/nrfmicro/Kconfig.defconfig @@ -3,7 +3,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +if BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED || BOARD_NRFMICRO_NRF52833 config BOARD default "nrfmicro" @@ -18,11 +18,12 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +if BOARD_REVISION = "1.3.0" config BOARD_NRFMICRO_CHARGER default y -endif # BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +endif # BOARD_REVISION = "1.3.0" -endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 + +endif # BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED || BOARD_NRFMICRO_NRF52833 diff --git a/app/boards/joric/nrfmicro/Kconfig.nrfmicro b/app/boards/joric/nrfmicro/Kconfig.nrfmicro new file mode 100644 index 000000000..bd5d31951 --- /dev/null +++ b/app/boards/joric/nrfmicro/Kconfig.nrfmicro @@ -0,0 +1,12 @@ +# nrfmicro board configuration + +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_NRFMICRO + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840 + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_FLIPPED + select SOC_NRF52833_QIAA if BOARD_NRFMICRO_NRF52833 + imply RETAINED_MEM if BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED + imply RETENTION if BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED + imply RETENTION_BOOT_MODE if BOARD_NRFMICRO_NRF52840 || BOARD_NRFMICRO_NRF52840_FLIPPED diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi b/app/boards/joric/nrfmicro/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi rename to app/boards/joric/nrfmicro/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi b/app/boards/joric/nrfmicro/arduino_pro_micro_pins_52833.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi rename to app/boards/joric/nrfmicro/arduino_pro_micro_pins_52833.dtsi diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi b/app/boards/joric/nrfmicro/arduino_pro_micro_pins_flipped.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi rename to app/boards/joric/nrfmicro/arduino_pro_micro_pins_flipped.dtsi diff --git a/app/boards/arm/bluemicro840/board.cmake b/app/boards/joric/nrfmicro/board.cmake similarity index 100% rename from app/boards/arm/bluemicro840/board.cmake rename to app/boards/joric/nrfmicro/board.cmake diff --git a/app/boards/joric/nrfmicro/board.yml b/app/boards/joric/nrfmicro/board.yml new file mode 100644 index 000000000..1cfcc492f --- /dev/null +++ b/app/boards/joric/nrfmicro/board.yml @@ -0,0 +1,14 @@ +board: + name: nrfmicro + vendor: joric + socs: + - name: nrf52840 + variants: + - name: flipped + - name: nrf52833 + revision: + format: major.minor.patch + default: 1.3.0 + revisions: + - name: 1.3.0 + - name: 1.1.0 diff --git a/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi b/app/boards/joric/nrfmicro/nrfmicro-flipped-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi rename to app/boards/joric/nrfmicro/nrfmicro-flipped-pinctrl.dtsi diff --git a/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi b/app/boards/joric/nrfmicro/nrfmicro-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi rename to app/boards/joric/nrfmicro/nrfmicro-pinctrl.dtsi diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.yaml b/app/boards/joric/nrfmicro/nrfmicro_11.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_11.yaml rename to app/boards/joric/nrfmicro/nrfmicro_11.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml b/app/boards/joric/nrfmicro/nrfmicro_11_flipped.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml rename to app/boards/joric/nrfmicro/nrfmicro_11_flipped.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.yaml b/app/boards/joric/nrfmicro/nrfmicro_13.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_13.yaml rename to app/boards/joric/nrfmicro/nrfmicro_13.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.yaml b/app/boards/joric/nrfmicro/nrfmicro_13_52833.yaml similarity index 100% rename from app/boards/arm/nrfmicro/nrfmicro_13_52833.yaml rename to app/boards/joric/nrfmicro/nrfmicro_13_52833.yaml diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/boards/joric/nrfmicro/nrfmicro_nrf52833.dts similarity index 97% rename from app/boards/arm/nrfmicro/nrfmicro_13_52833.dts rename to app/boards/joric/nrfmicro/nrfmicro_nrf52833.dts index 866276bbe..5099701f8 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833.dts @@ -42,6 +42,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.zmk.yml b/app/boards/joric/nrfmicro/nrfmicro_nrf52833.zmk.yml similarity index 56% rename from app/boards/arm/nrfmicro/nrfmicro_11_flipped.zmk.yml rename to app/boards/joric/nrfmicro/nrfmicro_nrf52833.zmk.yml index b63ace2d6..918c0b353 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.zmk.yml +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nrfmicro_11_flipped -name: nRFMicro 1.1 (flipped) +id: nrfmicro/nrf52833 +name: nRFMicro (nRF52833) type: board arch: arm outputs: @@ -8,3 +8,6 @@ outputs: - ble url: https://github.com/joric/nrfmicro/ exposes: [pro_micro] +revisions: + - "1.3.0" +default_revision: "1.3.0" diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0.overlay b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0.overlay new file mode 100644 index 000000000..758f4ee89 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0.overlay @@ -0,0 +1,6 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0_defconfig similarity index 79% rename from app/boards/arm/nrfmicro/nrfmicro_11_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0_defconfig index 5ba4d6e14..709f33d8e 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52833_1_3_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRFMICRO_11=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/joric/nrfmicro/nrfmicro_nrf52840.dts similarity index 95% rename from app/boards/arm/nrfmicro/nrfmicro_13.dts rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840.dts index 0cb22e63c..149f4be3a 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include + #include "arduino_pro_micro_pins.dtsi" #include "nrfmicro-pinctrl.dtsi" @@ -42,6 +44,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.zmk.yml b/app/boards/joric/nrfmicro/nrfmicro_nrf52840.zmk.yml similarity index 50% rename from app/boards/arm/nrfmicro/nrfmicro_11.zmk.yml rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840.zmk.yml index 4160ec6a7..a1cfb4fe3 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.zmk.yml +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nrfmicro_11 -name: nRFMicro 1.1/1.2 +id: nrfmicro/nrf52840 +name: nRFMicro (nRF52840) 1.1/1.2/1.3 type: board arch: arm outputs: @@ -8,3 +8,7 @@ outputs: - ble url: https://github.com/joric/nrfmicro/ exposes: [pro_micro] +revisions: + - "1.1.0" + - "1.3.0" +default_revision: "1.3.0" diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0.overlay b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0.overlay new file mode 100644 index 000000000..ac8b20578 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; +}; + diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0_defconfig similarity index 79% rename from app/boards/arm/nrfmicro/nrfmicro_13_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0_defconfig index 9ffb2766a..709f33d8e 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_1_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRFMICRO_13=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0.overlay b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0.overlay new file mode 100644 index 000000000..3963dc434 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0.overlay @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + chosen { + zmk,battery = &vbatt; + }; + + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + init-delay-ms = <50>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; +}; + +&adc { + status = "okay"; +}; + diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0_defconfig similarity index 79% rename from app/boards/arm/bluemicro840/bluemicro840_v1_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0_defconfig index 3e13e77d0..709f33d8e 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_1_3_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BLUEMICRO840_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -21,6 +17,8 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y +CONFIG_CLOCK_CONTROL_NRF=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts similarity index 95% rename from app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts index 7b89b62f8..8f1d30312 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include + #include "arduino_pro_micro_pins_flipped.dtsi" #include "nrfmicro-flipped-pinctrl.dtsi" @@ -34,6 +36,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &gpiote { status = "okay"; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.zmk.yml b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.zmk.yml similarity index 52% rename from app/boards/arm/nrfmicro/nrfmicro_13.zmk.yml rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.zmk.yml index 8fd28d377..252d04b98 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.zmk.yml +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: nrfmicro_13 -name: nRFMicro 1.3/1.4 +id: nrfmicro/nrf52840/flipped +name: nRFMicro nRF52840 (flipped) type: board arch: arm outputs: @@ -8,3 +8,6 @@ outputs: - ble url: https://github.com/joric/nrfmicro/ exposes: [pro_micro] +revisions: + - "1.1.0" +default_revision: "1.1.0" diff --git a/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0.overlay b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0.overlay new file mode 100644 index 000000000..758f4ee89 --- /dev/null +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0.overlay @@ -0,0 +1,6 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0_defconfig similarity index 78% rename from app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig rename to app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0_defconfig index f459f3563..709f33d8e 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig +++ b/app/boards/joric/nrfmicro/nrfmicro_nrf52840_flipped_1_1_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52833_QIAA=y -CONFIG_BOARD_NRFMICRO_13_52833=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/joric/nrfmicro/pinmux.c similarity index 100% rename from app/boards/arm/nrfmicro/pinmux.c rename to app/boards/joric/nrfmicro/pinmux.c diff --git a/app/boards/arm/adv360pro/pre_dt_board.cmake b/app/boards/joric/nrfmicro/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/adv360pro/pre_dt_board.cmake rename to app/boards/joric/nrfmicro/pre_dt_board.cmake diff --git a/app/boards/arm/bluemicro840/Kconfig b/app/boards/jpconstantineau/bluemicro840/Kconfig similarity index 77% rename from app/boards/arm/bluemicro840/Kconfig rename to app/boards/jpconstantineau/bluemicro840/Kconfig index ca060885f..470b5559e 100644 --- a/app/boards/arm/bluemicro840/Kconfig +++ b/app/boards/jpconstantineau/bluemicro840/Kconfig @@ -4,5 +4,5 @@ config BOARD_ENABLE_DCDC bool "Enable DCDC mode" select SOC_DCDC_NRF52X default y - depends on BOARD_BLUEMICRO840_V1 + depends on BOARD_BLUEMICRO840 diff --git a/app/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 b/app/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 new file mode 100644 index 000000000..da3774d7c --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/Kconfig.bluemicro840 @@ -0,0 +1,8 @@ +# Copyright (c) 2020 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_BLUEMICRO840 + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/boards/jpconstantineau/bluemicro840/Kconfig.defconfig similarity index 69% rename from app/boards/arm/bluemicro840/Kconfig.defconfig rename to app/boards/jpconstantineau/bluemicro840/Kconfig.defconfig index ff61ec92f..81573146e 100644 --- a/app/boards/arm/bluemicro840/Kconfig.defconfig +++ b/app/boards/jpconstantineau/bluemicro840/Kconfig.defconfig @@ -3,10 +3,7 @@ # Copyright (c) 2020 Pete Johanson, Derek Schmell # SPDX-License-Identifier: MIT -if BOARD_BLUEMICRO840_V1 - -config BOARD - default "bluemicro840_v1" +if BOARD_BLUEMICRO840 if USB_DEVICE_STACK @@ -18,4 +15,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -endif # BOARD_BLUEMICRO840_V1 +endif # BOARD_BLUEMICRO840 diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/boards/jpconstantineau/bluemicro840/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi rename to app/boards/jpconstantineau/bluemicro840/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi b/app/boards/jpconstantineau/bluemicro840/bluemicro840-pinctrl.dtsi similarity index 100% rename from app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi rename to app/boards/jpconstantineau/bluemicro840/bluemicro840-pinctrl.dtsi diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/jpconstantineau/bluemicro840/bluemicro840.dts similarity index 96% rename from app/boards/arm/bluemicro840/bluemicro840_v1.dts rename to app/boards/jpconstantineau/bluemicro840/bluemicro840.dts index 84d3ebaec..6c4e8ced7 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840.dts @@ -6,8 +6,10 @@ /dts-v1/; #include +#include + #include "arduino_pro_micro_pins.dtsi" -#include "bluemicro840_v1-pinctrl.dtsi" +#include "bluemicro840-pinctrl.dtsi" / { model = "BlueMicro840_V1"; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.yaml b/app/boards/jpconstantineau/bluemicro840/bluemicro840.yaml similarity index 85% rename from app/boards/arm/bluemicro840/bluemicro840_v1.yaml rename to app/boards/jpconstantineau/bluemicro840/bluemicro840.yaml index 9e1dd54c2..c36eee0c9 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.yaml +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840.yaml @@ -1,4 +1,4 @@ -identifier: bluemicro840_v1 +identifier: bluemicro840 name: BlueMicro840_V1 type: mcu arch: arm diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.zmk.yml b/app/boards/jpconstantineau/bluemicro840/bluemicro840.zmk.yml similarity index 89% rename from app/boards/arm/bluemicro840/bluemicro840_v1.zmk.yml rename to app/boards/jpconstantineau/bluemicro840/bluemicro840.zmk.yml index c1d3c6b94..10afcbf1f 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.zmk.yml +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bluemicro840_v1 +id: bluemicro840 name: BlueMicro840 v1 type: board arch: arm diff --git a/app/boards/jpconstantineau/bluemicro840/bluemicro840_defconfig b/app/boards/jpconstantineau/bluemicro840/bluemicro840_defconfig new file mode 100644 index 000000000..b41fbe47f --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/bluemicro840_defconfig @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +# Enable MPU +CONFIG_ARM_MPU=y + +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/bt60/board.cmake b/app/boards/jpconstantineau/bluemicro840/board.cmake similarity index 100% rename from app/boards/arm/bt60/board.cmake rename to app/boards/jpconstantineau/bluemicro840/board.cmake diff --git a/app/boards/jpconstantineau/bluemicro840/board.yml b/app/boards/jpconstantineau/bluemicro840/board.yml new file mode 100644 index 000000000..0a9ebdd5d --- /dev/null +++ b/app/boards/jpconstantineau/bluemicro840/board.yml @@ -0,0 +1,5 @@ +board: + name: bluemicro840 + vendor: jpconstantineau + socs: + - name: nrf52840 diff --git a/app/boards/arm/bluemicro840/pre_dt_board.cmake b/app/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/bluemicro840/pre_dt_board.cmake rename to app/boards/jpconstantineau/bluemicro840/pre_dt_board.cmake diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig b/app/boards/kbdfans/tofu65/Kconfig.defconfig similarity index 74% rename from app/boards/arm/kbdfans_tofu65/Kconfig.defconfig rename to app/boards/kbdfans/tofu65/Kconfig.defconfig index 0444f5101..0a524c4e2 100644 --- a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig +++ b/app/boards/kbdfans/tofu65/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_KBDFANS_TOFU65_V2 +if BOARD_TOFU65 config ZMK_KEYBOARD_NAME default "kbdfans tofu65" @@ -9,4 +9,4 @@ config ZMK_KEYBOARD_NAME config RP2_FLASH_W25Q080 default y -endif # BOARD_KBDFANS_TOFU65_V2 +endif # BOARD_TOFU65 diff --git a/app/boards/kbdfans/tofu65/Kconfig.tofu65 b/app/boards/kbdfans/tofu65/Kconfig.tofu65 new file mode 100644 index 000000000..3754f9369 --- /dev/null +++ b/app/boards/kbdfans/tofu65/Kconfig.tofu65 @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_TOFU65 + select SOC_RP2040 + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/kbdfans/tofu65/board.yml b/app/boards/kbdfans/tofu65/board.yml new file mode 100644 index 000000000..a044fea25 --- /dev/null +++ b/app/boards/kbdfans/tofu65/board.yml @@ -0,0 +1,5 @@ +board: + name: tofu65 + vendor: kbdfans + socs: + - name: rp2040 diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts b/app/boards/kbdfans/tofu65/tofu65.dts similarity index 91% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts rename to app/boards/kbdfans/tofu65/tofu65.dts index bc6a9d02b..d1249c838 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts +++ b/app/boards/kbdfans/tofu65/tofu65.dts @@ -5,7 +5,9 @@ /dts-v1/; -#include +#include +#include + #include #include @@ -15,17 +17,12 @@ chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,flash-controller = &ssi; zephyr,code-partition = &code_partition; zmk,kscan = &kscan0; zmk,physical-layout = &layout_65_ansi; }; - xtal_clk: xtal-clk { - compatible = "fixed-clock"; - clock-frequency = <12000000>; - #clock-cells = <0>; - }; - default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <15>; @@ -107,11 +104,23 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9) }; }; +&timer { + status = "okay"; +}; + +&rtc { + clocks = <&clocks RPI_PICO_CLKID_CLK_RTC>; + status = "okay"; +}; zephyr_udc0: &usbd { status = "okay"; }; +&vreg { + regulator-always-on; + regulator-allowed-modes = ; +}; &gpio0 { status = "okay"; diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap b/app/boards/kbdfans/tofu65/tofu65.keymap similarity index 100% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap rename to app/boards/kbdfans/tofu65/tofu65.keymap diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml b/app/boards/kbdfans/tofu65/tofu65.yaml similarity index 84% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml rename to app/boards/kbdfans/tofu65/tofu65.yaml index e1089766d..458b157f0 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml +++ b/app/boards/kbdfans/tofu65/tofu65.yaml @@ -1,4 +1,4 @@ -identifier: kbdfans_tofu65_v2 +identifier: tofu65 name: KBDfans Tofu65 2.0 type: mcu arch: arm diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml b/app/boards/kbdfans/tofu65/tofu65.zmk.yml similarity index 88% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml rename to app/boards/kbdfans/tofu65/tofu65.zmk.yml index 382e7dd36..b8ef43b36 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml +++ b/app/boards/kbdfans/tofu65/tofu65.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: kbdfans_tofu65_v2 +id: tofu65 name: KBDfans Tofu65 2.0 type: board arch: arm diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig b/app/boards/kbdfans/tofu65/tofu65_defconfig similarity index 83% rename from app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig rename to app/boards/kbdfans/tofu65/tofu65_defconfig index 57014acf3..a0ac1c3b9 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig +++ b/app/boards/kbdfans/tofu65/tofu65_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_RP2XXX=y -CONFIG_SOC_RP2040=y -CONFIG_BOARD_KBDFANS_TOFU65_V2=y - CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 # Enable USB CDC ACM logging for debugging @@ -12,6 +8,7 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 # Enable reset by default CONFIG_RESET=y +CONFIG_CLOCK_CONTROL=y # Code partition needed to target the correct flash range CONFIG_USE_DT_CODE_PARTITION=y diff --git a/app/boards/keebio/bdn9/Kconfig.bdn9 b/app/boards/keebio/bdn9/Kconfig.bdn9 new file mode 100644 index 000000000..29055ef57 --- /dev/null +++ b/app/boards/keebio/bdn9/Kconfig.bdn9 @@ -0,0 +1,5 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_BDN9 + select SOC_STM32F072XB diff --git a/app/boards/arm/bdn9/Kconfig.defconfig b/app/boards/keebio/bdn9/Kconfig.defconfig similarity index 78% rename from app/boards/arm/bdn9/Kconfig.defconfig rename to app/boards/keebio/bdn9/Kconfig.defconfig index 96b7fe553..3b6c06527 100644 --- a/app/boards/arm/bdn9/Kconfig.defconfig +++ b/app/boards/keebio/bdn9/Kconfig.defconfig @@ -11,8 +11,4 @@ config BOARD config ZMK_KEYBOARD_NAME default "BDN9 Rev2" -config ZMK_RGB_UNDERGLOW - select SPI - select WS2812_STRIP - endif # BOARD_BDN9 diff --git a/app/boards/arm/bdn9/README.md b/app/boards/keebio/bdn9/README.md similarity index 100% rename from app/boards/arm/bdn9/README.md rename to app/boards/keebio/bdn9/README.md diff --git a/app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi b/app/boards/keebio/bdn9/bdn9-layouts.dtsi similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2-layouts.dtsi rename to app/boards/keebio/bdn9/bdn9-layouts.dtsi diff --git a/app/boards/arm/bdn9/bdn9_rev2.conf b/app/boards/keebio/bdn9/bdn9.conf similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2.conf rename to app/boards/keebio/bdn9/bdn9.conf diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/keebio/bdn9/bdn9.dts similarity index 99% rename from app/boards/arm/bdn9/bdn9_rev2.dts rename to app/boards/keebio/bdn9/bdn9.dts index 389d23b7d..542c5341c 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/keebio/bdn9/bdn9.dts @@ -11,7 +11,7 @@ #include -#include "bdn9_rev2-layouts.dtsi" +#include "bdn9-layouts.dtsi" &physical_layout0 { transform = <&matrix_transform0>; diff --git a/app/boards/arm/bdn9/bdn9_rev2.keymap b/app/boards/keebio/bdn9/bdn9.keymap similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2.keymap rename to app/boards/keebio/bdn9/bdn9.keymap diff --git a/app/boards/arm/bdn9/bdn9_rev2.yaml b/app/boards/keebio/bdn9/bdn9.yaml similarity index 100% rename from app/boards/arm/bdn9/bdn9_rev2.yaml rename to app/boards/keebio/bdn9/bdn9.yaml diff --git a/app/boards/arm/bdn9/bdn9_rev2.zmk.yml b/app/boards/keebio/bdn9/bdn9.zmk.yml similarity index 72% rename from app/boards/arm/bdn9/bdn9_rev2.zmk.yml rename to app/boards/keebio/bdn9/bdn9.zmk.yml index 4680746f2..4991888c4 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.zmk.yml +++ b/app/boards/keebio/bdn9/bdn9.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: bdn9_rev2 -name: BDN9 Rev2 +id: bdn9 +name: BDN9 (Rev2) type: board arch: arm outputs: @@ -9,3 +9,6 @@ features: - keys - encoder url: https://keeb.io/collections/bdn9-collection/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb +revisions: + - "2.0.0" +default_revision: "2.0.0" diff --git a/app/boards/arm/bdn9/bdn9_rev2_defconfig b/app/boards/keebio/bdn9/bdn9_defconfig similarity index 85% rename from app/boards/arm/bdn9/bdn9_rev2_defconfig rename to app/boards/keebio/bdn9/bdn9_defconfig index a59fa5221..ce598bd23 100644 --- a/app/boards/arm/bdn9/bdn9_rev2_defconfig +++ b/app/boards/keebio/bdn9/bdn9_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F0X=y -CONFIG_SOC_STM32F072XB=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 @@ -14,6 +12,7 @@ CONFIG_PINCTRL=y # Poll to avoid interrupt overlap issues CONFIG_ZMK_KSCAN_DIRECT_POLLING=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1024 # clock configuration diff --git a/app/boards/arm/bdn9/board.cmake b/app/boards/keebio/bdn9/board.cmake similarity index 100% rename from app/boards/arm/bdn9/board.cmake rename to app/boards/keebio/bdn9/board.cmake diff --git a/app/boards/keebio/bdn9/board.yml b/app/boards/keebio/bdn9/board.yml new file mode 100644 index 000000000..45eaad641 --- /dev/null +++ b/app/boards/keebio/bdn9/board.yml @@ -0,0 +1,10 @@ +board: + name: bdn9 + vendor: keebio + socs: + - name: stm32f072xb + revision: + format: major.minor.patch + default: 2.0.0 + revisions: + - name: 2.0.0 diff --git a/app/boards/arm/nrfmicro/CMakeLists.txt b/app/boards/keycapsss/puchi_ble/CMakeLists.txt similarity index 100% rename from app/boards/arm/nrfmicro/CMakeLists.txt rename to app/boards/keycapsss/puchi_ble/CMakeLists.txt diff --git a/app/boards/arm/puchi_ble/Kconfig b/app/boards/keycapsss/puchi_ble/Kconfig similarity index 100% rename from app/boards/arm/puchi_ble/Kconfig rename to app/boards/keycapsss/puchi_ble/Kconfig diff --git a/app/boards/arm/puchi_ble/Kconfig.defconfig b/app/boards/keycapsss/puchi_ble/Kconfig.defconfig similarity index 81% rename from app/boards/arm/puchi_ble/Kconfig.defconfig rename to app/boards/keycapsss/puchi_ble/Kconfig.defconfig index 0ba7eefd0..0411ee3f2 100644 --- a/app/boards/arm/puchi_ble/Kconfig.defconfig +++ b/app/boards/keycapsss/puchi_ble/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_PUCHI_BLE_v1 +if BOARD_PUCHI_BLE config BOARD default "puchi_ble" @@ -16,4 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -endif # BOARD_PUCHI_BLE_v1 +endif # BOARD_PUCHI_BLE diff --git a/app/boards/keycapsss/puchi_ble/Kconfig.puchi_ble b/app/boards/keycapsss/puchi_ble/Kconfig.puchi_ble new file mode 100644 index 000000000..313279026 --- /dev/null +++ b/app/boards/keycapsss/puchi_ble/Kconfig.puchi_ble @@ -0,0 +1,10 @@ +# Puchi-BLE board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_PUCHI_BLE + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi b/app/boards/keycapsss/puchi_ble/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi rename to app/boards/keycapsss/puchi_ble/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/puchi_ble/board.cmake b/app/boards/keycapsss/puchi_ble/board.cmake similarity index 100% rename from app/boards/arm/puchi_ble/board.cmake rename to app/boards/keycapsss/puchi_ble/board.cmake diff --git a/app/boards/keycapsss/puchi_ble/board.yml b/app/boards/keycapsss/puchi_ble/board.yml new file mode 100644 index 000000000..d192a3063 --- /dev/null +++ b/app/boards/keycapsss/puchi_ble/board.yml @@ -0,0 +1,5 @@ +board: + name: puchi_ble + vendor: keycapsss + socs: + - name: nrf52840 diff --git a/app/boards/arm/puchi_ble/pinmux.c b/app/boards/keycapsss/puchi_ble/pinmux.c similarity index 95% rename from app/boards/arm/puchi_ble/pinmux.c rename to app/boards/keycapsss/puchi_ble/pinmux.c index 8475cfb1b..42689383d 100644 --- a/app/boards/arm/puchi_ble/pinmux.c +++ b/app/boards/keycapsss/puchi_ble/pinmux.c @@ -12,7 +12,7 @@ #include static int pinmux_puchi_ble_init(void) { -#if CONFIG_BOARD_PUCHI_BLE_v1 +#if CONFIG_BOARD_PUCHI_BLE const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0)); #if CONFIG_BOARD_PUCHI_BLE_CHARGER gpio_pin_configure(p0, 5, GPIO_OUTPUT); diff --git a/app/boards/arm/bt60/pre_dt_board.cmake b/app/boards/keycapsss/puchi_ble/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/bt60/pre_dt_board.cmake rename to app/boards/keycapsss/puchi_ble/pre_dt_board.cmake diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi b/app/boards/keycapsss/puchi_ble/puchi_ble-pinctrl.dtsi similarity index 100% rename from app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi rename to app/boards/keycapsss/puchi_ble/puchi_ble-pinctrl.dtsi diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/boards/keycapsss/puchi_ble/puchi_ble.dts similarity index 96% rename from app/boards/arm/puchi_ble/puchi_ble_v1.dts rename to app/boards/keycapsss/puchi_ble/puchi_ble.dts index 9f3194e03..8195f5680 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/boards/keycapsss/puchi_ble/puchi_ble.dts @@ -6,8 +6,10 @@ /dts-v1/; #include +#include + #include "arduino_pro_micro_pins.dtsi" -#include "puchi_ble_v1-pinctrl.dtsi" +#include "puchi_ble-pinctrl.dtsi" / { model = "puchi_ble"; diff --git a/app/boards/arm/bt60/bt60_v1.yaml b/app/boards/keycapsss/puchi_ble/puchi_ble.yaml similarity index 77% rename from app/boards/arm/bt60/bt60_v1.yaml rename to app/boards/keycapsss/puchi_ble/puchi_ble.yaml index 41fd7e409..19d1b122f 100644 --- a/app/boards/arm/bt60/bt60_v1.yaml +++ b/app/boards/keycapsss/puchi_ble/puchi_ble.yaml @@ -1,5 +1,5 @@ -identifier: bt60_v1 -name: BT60 V1 Soldered +identifier: puchi_ble +name: puchi_ble type: mcu arch: arm toolchain: diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml b/app/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml similarity index 92% rename from app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml rename to app/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml index f31140080..18f6463cb 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml +++ b/app/boards/keycapsss/puchi_ble/puchi_ble.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: puchi_ble_v1 +id: puchi_ble name: Puchi-BLE V1 type: board arch: arm diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig b/app/boards/keycapsss/puchi_ble/puchi_ble_defconfig similarity index 81% rename from app/boards/arm/puchi_ble/puchi_ble_v1_defconfig rename to app/boards/keycapsss/puchi_ble/puchi_ble_defconfig index ab197df0a..f6aaf5fde 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig +++ b/app/boards/keycapsss/puchi_ble/puchi_ble_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_PUCHI_BLE_v1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -27,4 +23,4 @@ CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/kinesis/adv360pro/Kconfig.adv360pro_left b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_left new file mode 100644 index 000000000..dcb021841 --- /dev/null +++ b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_left @@ -0,0 +1,10 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +config BOARD_ADV360PRO_LEFT + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE \ No newline at end of file diff --git a/app/boards/kinesis/adv360pro/Kconfig.adv360pro_right b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_right new file mode 100644 index 000000000..69cde9d71 --- /dev/null +++ b/app/boards/kinesis/adv360pro/Kconfig.adv360pro_right @@ -0,0 +1,10 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +config BOARD_ADV360PRO_RIGHT + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE \ No newline at end of file diff --git a/app/boards/arm/adv360pro/Kconfig.defconfig b/app/boards/kinesis/adv360pro/Kconfig.defconfig similarity index 100% rename from app/boards/arm/adv360pro/Kconfig.defconfig rename to app/boards/kinesis/adv360pro/Kconfig.defconfig diff --git a/app/boards/arm/adv360pro/README.md b/app/boards/kinesis/adv360pro/README.md similarity index 100% rename from app/boards/arm/adv360pro/README.md rename to app/boards/kinesis/adv360pro/README.md diff --git a/app/boards/arm/adv360pro/adv360pro-layouts.dtsi b/app/boards/kinesis/adv360pro/adv360pro-layouts.dtsi similarity index 100% rename from app/boards/arm/adv360pro/adv360pro-layouts.dtsi rename to app/boards/kinesis/adv360pro/adv360pro-layouts.dtsi diff --git a/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi b/app/boards/kinesis/adv360pro/adv360pro-pinctrl.dtsi similarity index 100% rename from app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi rename to app/boards/kinesis/adv360pro/adv360pro-pinctrl.dtsi diff --git a/app/boards/arm/adv360pro/adv360pro.dtsi b/app/boards/kinesis/adv360pro/adv360pro.dtsi similarity index 97% rename from app/boards/arm/adv360pro/adv360pro.dtsi rename to app/boards/kinesis/adv360pro/adv360pro.dtsi index ca7eaacca..d9a00b018 100644 --- a/app/boards/arm/adv360pro/adv360pro.dtsi +++ b/app/boards/kinesis/adv360pro/adv360pro.dtsi @@ -7,6 +7,7 @@ /dts-v1/; #include +#include #include #include @@ -71,6 +72,10 @@ }; +®1 { + regulator-initial-mode = ; +}; + &pwm0 { status = "okay"; pinctrl-0 = <&pwm0_default>; diff --git a/app/boards/arm/adv360pro/adv360pro.keymap b/app/boards/kinesis/adv360pro/adv360pro.keymap similarity index 100% rename from app/boards/arm/adv360pro/adv360pro.keymap rename to app/boards/kinesis/adv360pro/adv360pro.keymap diff --git a/app/boards/arm/adv360pro/adv360pro.yaml b/app/boards/kinesis/adv360pro/adv360pro.yaml similarity index 100% rename from app/boards/arm/adv360pro/adv360pro.yaml rename to app/boards/kinesis/adv360pro/adv360pro.yaml diff --git a/app/boards/arm/adv360pro/adv360pro.zmk.yml b/app/boards/kinesis/adv360pro/adv360pro.zmk.yml similarity index 100% rename from app/boards/arm/adv360pro/adv360pro.zmk.yml rename to app/boards/kinesis/adv360pro/adv360pro.zmk.yml diff --git a/app/boards/arm/adv360pro/adv360pro_left.dts b/app/boards/kinesis/adv360pro/adv360pro_left.dts similarity index 100% rename from app/boards/arm/adv360pro/adv360pro_left.dts rename to app/boards/kinesis/adv360pro/adv360pro_left.dts diff --git a/app/boards/arm/adv360pro/adv360pro_left_defconfig b/app/boards/kinesis/adv360pro/adv360pro_left_defconfig similarity index 90% rename from app/boards/arm/adv360pro/adv360pro_left_defconfig rename to app/boards/kinesis/adv360pro/adv360pro_left_defconfig index 6eb5a8d04..7a8db4dc1 100644 --- a/app/boards/arm/adv360pro/adv360pro_left_defconfig +++ b/app/boards/kinesis/adv360pro/adv360pro_left_defconfig @@ -3,10 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_ADV360PRO_LEFT=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,7 +28,6 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y #RGB leds config -CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n diff --git a/app/boards/arm/adv360pro/adv360pro_right.dts b/app/boards/kinesis/adv360pro/adv360pro_right.dts similarity index 100% rename from app/boards/arm/adv360pro/adv360pro_right.dts rename to app/boards/kinesis/adv360pro/adv360pro_right.dts diff --git a/app/boards/arm/adv360pro/adv360pro_right_defconfig b/app/boards/kinesis/adv360pro/adv360pro_right_defconfig similarity index 90% rename from app/boards/arm/adv360pro/adv360pro_right_defconfig rename to app/boards/kinesis/adv360pro/adv360pro_right_defconfig index b5174549e..1cda90c0c 100644 --- a/app/boards/arm/adv360pro/adv360pro_right_defconfig +++ b/app/boards/kinesis/adv360pro/adv360pro_right_defconfig @@ -3,10 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_ADV360PRO_RIGHT=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,7 +28,6 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y #RGB leds config -CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n diff --git a/app/boards/arm/adv360pro/board.cmake b/app/boards/kinesis/adv360pro/board.cmake similarity index 100% rename from app/boards/arm/adv360pro/board.cmake rename to app/boards/kinesis/adv360pro/board.cmake diff --git a/app/boards/kinesis/adv360pro/board.yml b/app/boards/kinesis/adv360pro/board.yml new file mode 100644 index 000000000..1332451e5 --- /dev/null +++ b/app/boards/kinesis/adv360pro/board.yml @@ -0,0 +1,9 @@ +boards: + - name: adv360pro_left + vendor: kinesis + socs: + - name: nrf52840 + - name: adv360pro_right + vendor: kinesis + socs: + - name: nrf52840 diff --git a/app/boards/arm/ckp/pre_dt_board.cmake b/app/boards/kinesis/adv360pro/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/ckp/pre_dt_board.cmake rename to app/boards/kinesis/adv360pro/pre_dt_board.cmake diff --git a/app/boards/arm/corneish_zen/CMakeLists.txt b/app/boards/lowprokb/corneish_zen/CMakeLists.txt similarity index 100% rename from app/boards/arm/corneish_zen/CMakeLists.txt rename to app/boards/lowprokb/corneish_zen/CMakeLists.txt diff --git a/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left new file mode 100644 index 000000000..7c0dfd7ca --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_left @@ -0,0 +1,10 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +config BOARD_CORNEISH_ZEN_LEFT + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right new file mode 100644 index 000000000..4d8e0320b --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/Kconfig.corneish_zen_right @@ -0,0 +1,10 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +config BOARD_CORNEISH_ZEN_RIGHT + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/corneish_zen/Kconfig.defconfig b/app/boards/lowprokb/corneish_zen/Kconfig.defconfig similarity index 88% rename from app/boards/arm/corneish_zen/Kconfig.defconfig rename to app/boards/lowprokb/corneish_zen/Kconfig.defconfig index 11f932b53..e4ff579a4 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/lowprokb/corneish_zen/Kconfig.defconfig @@ -40,7 +40,7 @@ config ZMK_DISPLAY select LV_FONT_MONTSERRAT_26 select LV_FONT_MONTSERRAT_16 select LV_USE_LABEL - select LV_USE_IMG + select LV_USE_IMAGE choice ZMK_DISPLAY_STATUS_SCREEN default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM @@ -79,10 +79,3 @@ menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS bool "custom peripheral status widget" endif # BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT - -if BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT - -config BQ274XX - default y - -endif # BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT diff --git a/app/boards/arm/ckp/board.cmake b/app/boards/lowprokb/corneish_zen/board.cmake similarity index 100% rename from app/boards/arm/ckp/board.cmake rename to app/boards/lowprokb/corneish_zen/board.cmake diff --git a/app/boards/lowprokb/corneish_zen/board.yml b/app/boards/lowprokb/corneish_zen/board.yml new file mode 100644 index 000000000..97d63ec68 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/board.yml @@ -0,0 +1,23 @@ +boards: + - name: corneish_zen_left + vendor: lowprokb + socs: + - name: nrf52840 + revision: + format: major.minor.patch + default: 2.0.0 + exact: false + revisions: + - name: 2.0.0 + - name: 1.0.0 + - name: corneish_zen_right + vendor: lowprokb + socs: + - name: nrf52840 + revision: + format: major.minor.patch + default: 2.0.0 + exact: false + revisions: + - name: 2.0.0 + - name: 1.0.0 diff --git a/app/boards/arm/corneish_zen/corneish_zen.conf b/app/boards/lowprokb/corneish_zen/corneish_zen.conf similarity index 100% rename from app/boards/arm/corneish_zen/corneish_zen.conf rename to app/boards/lowprokb/corneish_zen/corneish_zen.conf diff --git a/app/boards/arm/corneish_zen/corneish_zen.dtsi b/app/boards/lowprokb/corneish_zen/corneish_zen.dtsi similarity index 98% rename from app/boards/arm/corneish_zen/corneish_zen.dtsi rename to app/boards/lowprokb/corneish_zen/corneish_zen.dtsi index 788b7613a..583f7ed3d 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.dtsi +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.dtsi @@ -7,6 +7,7 @@ /dts-v1/; #include +#include #include diff --git a/app/boards/arm/corneish_zen/corneish_zen.keymap b/app/boards/lowprokb/corneish_zen/corneish_zen.keymap similarity index 100% rename from app/boards/arm/corneish_zen/corneish_zen.keymap rename to app/boards/lowprokb/corneish_zen/corneish_zen.keymap diff --git a/app/boards/arm/corneish_zen/corneish_zen.yaml b/app/boards/lowprokb/corneish_zen/corneish_zen.yaml similarity index 90% rename from app/boards/arm/corneish_zen/corneish_zen.yaml rename to app/boards/lowprokb/corneish_zen/corneish_zen.yaml index 7975b262a..f4092f4fb 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.yaml +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.yaml @@ -1,4 +1,4 @@ -identifier: corne-ish_zen_v2 +identifier: corne-ish_zen name: Corne-ish Zen v2 url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen type: mcu diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1.zmk.yml b/app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml similarity index 62% rename from app/boards/arm/corneish_zen/corneish_zen_v1.zmk.yml rename to app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml index 8bb5e18ec..9630386de 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1.zmk.yml +++ b/app/boards/lowprokb/corneish_zen/corneish_zen.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: corneish_zen_v1 -name: Corneish Zen v1 +id: corneish_zen +name: Corneish Zen url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen type: board arch: arm @@ -11,6 +11,9 @@ features: outputs: - usb - ble +revisions: + - 2.0.0 + - 1.0.0 siblings: - - corneish_zen_v1_left - - corneish_zen_v1_right + - corneish_zen_left + - corneish_zen_right diff --git a/app/boards/lowprokb/corneish_zen/corneish_zen_left.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_left.dts new file mode 100644 index 000000000..6849efa39 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left.dts @@ -0,0 +1,8 @@ +/* +* +* Copyright (c) 2025 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "corneish_zen.dtsi" \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0.overlay similarity index 99% rename from app/boards/arm/corneish_zen/corneish_zen_v1_left.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0.overlay index 4230147ec..9b6617b1d 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0.overlay @@ -5,7 +5,6 @@ * */ -#include "corneish_zen.dtsi" /{ chosen { diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0_defconfig index d4de8ed3c..cba717e39 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_1_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V1_LEFT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -50,7 +47,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0.overlay similarity index 98% rename from app/boards/arm/corneish_zen/corneish_zen_v2_left.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0.overlay index 42839b616..a72c9be23 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0.overlay @@ -5,8 +5,6 @@ * */ -#include "corneish_zen.dtsi" - /{ chosen { zephyr,display = &epd; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0_defconfig index b6670fd8d..a549c29c7 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_left_2_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V2_LEFT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -46,7 +43,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/lowprokb/corneish_zen/corneish_zen_right.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_right.dts new file mode 100644 index 000000000..6849efa39 --- /dev/null +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right.dts @@ -0,0 +1,8 @@ +/* +* +* Copyright (c) 2025 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "corneish_zen.dtsi" \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_right_1_0_0.overlay similarity index 99% rename from app/boards/arm/corneish_zen/corneish_zen_v1_right.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_1_0_0.overlay index 820d31637..205948569 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_1_0_0.overlay @@ -5,8 +5,6 @@ * */ -#include "corneish_zen.dtsi" - /{ chosen { zephyr,display = &epd; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_right_1_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_1_0_0_defconfig index ad78217f6..e44e010a4 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_1_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V1_RIGHT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -50,7 +47,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts b/app/boards/lowprokb/corneish_zen/corneish_zen_right_2_0_0.overlay similarity index 98% rename from app/boards/arm/corneish_zen/corneish_zen_v2_right.dts rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_2_0_0.overlay index b47d122fe..dc8ef626c 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_2_0_0.overlay @@ -5,8 +5,6 @@ * */ -#include "corneish_zen.dtsi" - /{ chosen { zephyr,display = &epd; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig b/app/boards/lowprokb/corneish_zen/corneish_zen_right_2_0_0_defconfig similarity index 92% rename from app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig rename to app/boards/lowprokb/corneish_zen/corneish_zen_right_2_0_0_defconfig index 90cfe7698..63b098e13 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/lowprokb/corneish_zen/corneish_zen_right_2_0_0_defconfig @@ -3,9 +3,6 @@ # SPDX-License-Identifier: MIT # -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNEISH_ZEN_V2_RIGHT=y CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y @@ -46,7 +43,7 @@ CONFIG_LV_COLOR_DEPTH_1=y CONFIG_LV_DPI_DEF=145 CONFIG_LV_Z_VDB_SIZE=100 CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +# CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y CONFIG_LV_FONT_MONTSERRAT_26=y CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y diff --git a/app/boards/arm/corneish_zen/custom_status_screen.c b/app/boards/lowprokb/corneish_zen/custom_status_screen.c similarity index 92% rename from app/boards/arm/corneish_zen/custom_status_screen.c rename to app/boards/lowprokb/corneish_zen/custom_status_screen.c index 492239c8a..86c1a2265 100644 --- a/app/boards/arm/corneish_zen/custom_status_screen.c +++ b/app/boards/lowprokb/corneish_zen/custom_status_screen.c @@ -56,9 +56,9 @@ lv_obj_t *zmk_display_status_screen() { #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS) lv_obj_t *LayersHeading; - LayersHeading = lv_img_create(screen); + LayersHeading = lv_image_create(screen); lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30); - lv_img_set_src(LayersHeading, &layers2); + lv_image_set_src(LayersHeading, &layers2); zmk_widget_layer_status_init(&layer_status_widget, screen); lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget), @@ -68,8 +68,8 @@ lv_obj_t *zmk_display_status_screen() { #if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) lv_obj_t *zenlogo_icon; - zenlogo_icon = lv_img_create(screen); - lv_img_set_src(zenlogo_icon, &zenlogo); + zenlogo_icon = lv_image_create(screen); + lv_image_set_src(zenlogo_icon, &zenlogo); lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5); #endif diff --git a/app/boards/arm/corneish_zen/custom_status_screen.h b/app/boards/lowprokb/corneish_zen/custom_status_screen.h similarity index 100% rename from app/boards/arm/corneish_zen/custom_status_screen.h rename to app/boards/lowprokb/corneish_zen/custom_status_screen.h diff --git a/app/boards/arm/corneish_zen/pre_dt_board.cmake b/app/boards/lowprokb/corneish_zen/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/corneish_zen/pre_dt_board.cmake rename to app/boards/lowprokb/corneish_zen/pre_dt_board.cmake diff --git a/app/boards/arm/corneish_zen/widgets/battery_status.c b/app/boards/lowprokb/corneish_zen/widgets/battery_status.c similarity index 83% rename from app/boards/arm/corneish_zen/widgets/battery_status.c rename to app/boards/lowprokb/corneish_zen/widgets/battery_status.c index 622e39df6..044d3cee0 100644 --- a/app/boards/arm/corneish_zen/widgets/battery_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/battery_status.c @@ -45,17 +45,17 @@ static void set_battery_symbol(lv_obj_t *icon, struct battery_status_state state #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) if (level > 95) { - lv_img_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100); + lv_image_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100); } else if (level > 74) { - lv_img_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75); + lv_image_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75); } else if (level > 49) { - lv_img_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50); + lv_image_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50); } else if (level > 24) { - lv_img_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25); + lv_image_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25); } else if (level > 5) { - lv_img_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5); + lv_image_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5); } else { - lv_img_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0); + lv_image_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0); } #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ } @@ -85,7 +85,7 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent); + widget->obj = lv_image_create(parent); sys_slist_append(&widgets, &widget->node); widget_battery_status_init(); diff --git a/app/boards/arm/corneish_zen/widgets/battery_status.h b/app/boards/lowprokb/corneish_zen/widgets/battery_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/battery_status.h rename to app/boards/lowprokb/corneish_zen/widgets/battery_status.h diff --git a/app/boards/arm/corneish_zen/widgets/icons/CMakeLists.txt b/app/boards/lowprokb/corneish_zen/widgets/icons/CMakeLists.txt similarity index 100% rename from app/boards/arm/corneish_zen/widgets/icons/CMakeLists.txt rename to app/boards/lowprokb/corneish_zen/widgets/icons/CMakeLists.txt diff --git a/app/boards/arm/corneish_zen/widgets/icons/USB_connected.c b/app/boards/lowprokb/corneish_zen/widgets/icons/USB_connected.c similarity index 84% rename from app/boards/arm/corneish_zen/widgets/icons/USB_connected.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/USB_connected.c index b3b604222..266eaead9 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/USB_connected.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/USB_connected.c @@ -31,11 +31,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_USB_CONNECTED uint8_t USB_connecte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t USB_connected = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 164, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t USB_connected = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(USB_connected_map), .data = USB_connected_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_0.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_0.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c index a6066b95a..4df34e652 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_0.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0 ui 0x00, 0x00, 0x7c, 0x00, 0x00, }; -const lv_img_dsc_t batt_0 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_0 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_0_map), .data = batt_0_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_0_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_0_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c index 368ba288d..95fd4eae3 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_0_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_0_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0_CH 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_0_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_0_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_0_chg_map), .data = batt_0_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_100.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_100.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c index e6aa27bab..975508c21 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_100.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_100 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_100 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_100_map), .data = batt_100_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_100_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_100_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_100_chg.c index 9b2c18d4c..7c8b739ae 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_100_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_100_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100_ 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_100_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_100_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_100_chg_map), .data = batt_100_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_25.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_25.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c index 2445ef395..aae7338f4 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_25.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25 u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_25 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_25 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_25_map), .data = batt_25_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_25_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_25_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c index 37c30812f..0e1852ee4 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_25_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_25_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25_C 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_25_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_25_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_25_chg_map), .data = batt_25_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_5.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_5.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c index e9824572f..e9427a8e5 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_5.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5 ui 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_5 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_5 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_5_map), .data = batt_5_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_50.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_50.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c index bbb0af485..1e606bfc8 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_50.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50 u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_50 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_50 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_50_map), .data = batt_50_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_50_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_50_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c index c2ced92e6..9e31d934d 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_50_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_50_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50_C 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_50_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_50_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_50_chg_map), .data = batt_50_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_5_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_5_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c index 6a6d9d446..5ed20b10c 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_5_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_5_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5_CH 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_5_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_5_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_5_chg_map), .data = batt_5_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_75.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_75.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c index 9918386d0..eaa78c750 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_75.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_75 u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_75 = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_75 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_75_map), .data = batt_75_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/batt_75_chg.c b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c similarity index 85% rename from app/boards/arm/corneish_zen/widgets/icons/batt_75_chg.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c index 422aaabc7..5b2d796d8 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/batt_75_chg.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/batt_75_chg.c @@ -33,11 +33,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_75_C 0x00, 0x10, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t batt_75_chg = { - .header.always_zero = 0, - .header.w = 40, - .header.h = 31, - .data_size = 163, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t batt_75_chg = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 40, + .h = 31, + .stride = 5, + }, + .data_size = sizeof(batt_75_chg_map), .data = batt_75_chg_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising.c similarity index 83% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising.c index daeee223a..b57b59c8c 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising.c @@ -32,11 +32,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising = { - .header.always_zero = 0, - .header.w = 29, - .header.h = 35, - .data_size = 148, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 29, + .h = 35, + .stride = 4, + }, + .data_size = sizeof(bluetooth_advertising_map), .data = bluetooth_advertising_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_1.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_1.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_1.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_1.c index cf5b81974..28a65ac29 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_1.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_1.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_1 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_1 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_1 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_1_map), .data = bluetooth_advertising_1_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_2.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_2.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_2.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_2.c index 184a5ce85..4c7447cce 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_2.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_2.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_2 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_2 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_2 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_2_map), .data = bluetooth_advertising_2_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_3.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_3.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_3.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_3.c index e9665ff91..e2072eec2 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_3.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_3.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_3 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_3 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_3 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_3_map), .data = bluetooth_advertising_3_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_4.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_4.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_4.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_4.c index d591f17f3..a92310770 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_4.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_4.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_4 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_4 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_4 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_4_map), .data = bluetooth_advertising_4_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_5.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_5.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_5.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_5.c index 882131581..53cb37895 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_advertising_5.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_advertising_5.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_ADVERTISING_5 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_advertising_5 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_advertising_5 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_advertising_5_map), .data = bluetooth_advertising_5_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_1.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_1.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_1.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_1.c index a3cb5a2cd..179b7f6fa 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_1.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_1.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_1 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_1 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_1 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_1_map), .data = bluetooth_connected_1_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_2.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_2.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_2.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_2.c index 2ce5b9394..29122930e 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_2.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_2.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_2 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_2 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_2 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_2_map), .data = bluetooth_connected_2_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_3.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_3.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_3.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_3.c index edac091f6..c25c163bf 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_3.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_3.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_3 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_3 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_3 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_3_map), .data = bluetooth_connected_3_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_4.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_4.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_4.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_4.c index e79d6cb6d..83ae53c2a 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_4.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_4.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_4 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_4 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_4 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_4_map), .data = bluetooth_connected_4_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_5.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_5.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_5.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_5.c index b567aa2df..9dbbcea94 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_5.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_5.c @@ -37,11 +37,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_BLUETOOTH_CONNECTED_5 uint8_t 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_5 = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 254, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_5 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_5_map), .data = bluetooth_connected_5_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_right.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_right.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_right.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_right.c index 2a28a9039..6e14c17b0 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_connected_right.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_connected_right.c @@ -39,11 +39,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_connected_right = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 253, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_connected_right = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_connected_right_map), .data = bluetooth_connected_right_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_disconnected_right.c b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_disconnected_right.c similarity index 88% rename from app/boards/arm/corneish_zen/widgets/icons/bluetooth_disconnected_right.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_disconnected_right.c index 37974d698..71c679574 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/bluetooth_disconnected_right.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/bluetooth_disconnected_right.c @@ -39,11 +39,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BLUETOOTH 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t bluetooth_disconnected_right = { - .header.always_zero = 0, - .header.w = 54, - .header.h = 35, - .data_size = 253, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t bluetooth_disconnected_right = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 54, + .h = 35, + .stride = 7, + }, + .data_size = sizeof(bluetooth_disconnected_right_map), .data = bluetooth_disconnected_right_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/layers.c b/app/boards/lowprokb/corneish_zen/widgets/icons/layers.c similarity index 86% rename from app/boards/arm/corneish_zen/widgets/icons/layers.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/layers.c index 86bc8dfcf..d6f4baabf 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/layers.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/layers.c @@ -34,11 +34,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS ui 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t layers = { - .header.always_zero = 0, - .header.w = 35, - .header.h = 35, - .data_size = 183, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t layers = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 35, + .h = 35, + .stride = 5, + }, + .data_size = sizeof(layers_map), .data = layers_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/layers2.c b/app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c similarity index 83% rename from app/boards/arm/corneish_zen/widgets/icons/layers2.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c index 068b07576..53f6a445e 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/layers2.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/layers2.c @@ -30,11 +30,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_LAYERS2 u 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t layers2 = { - .header.always_zero = 0, - .header.w = 78, - .header.h = 12, - .data_size = 128, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t layers2 = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 78, + .h = 12, + .stride = 10, + }, + .data_size = sizeof(layers2_map), .data = layers2_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/icons/zenlogo.c b/app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c similarity index 92% rename from app/boards/arm/corneish_zen/widgets/icons/zenlogo.c rename to app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c index cc4240416..677df4893 100644 --- a/app/boards/arm/corneish_zen/widgets/icons/zenlogo.c +++ b/app/boards/lowprokb/corneish_zen/widgets/icons/zenlogo.c @@ -48,11 +48,15 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ZENLOGO u 0x00, 0x00, 0x00, 0x00, 0x00, }; -const lv_img_dsc_t zenlogo = { - .header.always_zero = 0, - .header.w = 80, - .header.h = 38, - .data_size = 388, - .header.cf = LV_IMG_CF_INDEXED_1BIT, +const lv_image_dsc_t zenlogo = { + .header = + { + .magic = LV_IMAGE_HEADER_MAGIC, + .cf = LV_COLOR_FORMAT_I1, + .w = 80, + .h = 38, + .stride = 10, + }, + .data_size = sizeof(zenlogo_map), .data = zenlogo_map, }; diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.c b/app/boards/lowprokb/corneish_zen/widgets/layer_status.c similarity index 100% rename from app/boards/arm/corneish_zen/widgets/layer_status.c rename to app/boards/lowprokb/corneish_zen/widgets/layer_status.c diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.h b/app/boards/lowprokb/corneish_zen/widgets/layer_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/layer_status.h rename to app/boards/lowprokb/corneish_zen/widgets/layer_status.h diff --git a/app/boards/arm/corneish_zen/widgets/output_status.c b/app/boards/lowprokb/corneish_zen/widgets/output_status.c similarity index 81% rename from app/boards/arm/corneish_zen/widgets/output_status.c rename to app/boards/lowprokb/corneish_zen/widgets/output_status.c index 8e9457ebe..a54aaada0 100644 --- a/app/boards/arm/corneish_zen/widgets/output_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/output_status.c @@ -54,7 +54,7 @@ static struct output_status_state get_state(const zmk_event_t *_eh) { static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) { switch (state.selected_endpoint.transport) { case ZMK_TRANSPORT_USB: - lv_img_set_src(icon, &USB_connected); + lv_image_set_src(icon, &USB_connected); break; case ZMK_TRANSPORT_BLE: if (state.active_profile_bonded) { @@ -62,40 +62,40 @@ static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) // sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index); switch (state.selected_endpoint.ble.profile_index) { case 0: - lv_img_set_src(icon, &bluetooth_connected_1); + lv_image_set_src(icon, &bluetooth_connected_1); break; case 1: - lv_img_set_src(icon, &bluetooth_connected_2); + lv_image_set_src(icon, &bluetooth_connected_2); break; case 2: - lv_img_set_src(icon, &bluetooth_connected_3); + lv_image_set_src(icon, &bluetooth_connected_3); break; case 3: - lv_img_set_src(icon, &bluetooth_connected_4); + lv_image_set_src(icon, &bluetooth_connected_4); break; case 4: - lv_img_set_src(icon, &bluetooth_connected_5); + lv_image_set_src(icon, &bluetooth_connected_5); break; } } else { - lv_img_set_src(icon, &bluetooth_disconnected_right); + lv_image_set_src(icon, &bluetooth_disconnected_right); } } else { switch (state.selected_endpoint.ble.profile_index) { case 0: - lv_img_set_src(icon, &bluetooth_advertising_1); + lv_image_set_src(icon, &bluetooth_advertising_1); break; case 1: - lv_img_set_src(icon, &bluetooth_advertising_2); + lv_image_set_src(icon, &bluetooth_advertising_2); break; case 2: - lv_img_set_src(icon, &bluetooth_advertising_3); + lv_image_set_src(icon, &bluetooth_advertising_3); break; case 3: - lv_img_set_src(icon, &bluetooth_advertising_4); + lv_image_set_src(icon, &bluetooth_advertising_4); break; case 4: - lv_img_set_src(icon, &bluetooth_advertising_5); + lv_image_set_src(icon, &bluetooth_advertising_5); break; } } @@ -118,7 +118,7 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent); + widget->obj = lv_image_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/arm/corneish_zen/widgets/output_status.h b/app/boards/lowprokb/corneish_zen/widgets/output_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/output_status.h rename to app/boards/lowprokb/corneish_zen/widgets/output_status.h diff --git a/app/boards/arm/corneish_zen/widgets/peripheral_status.c b/app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c similarity index 91% rename from app/boards/arm/corneish_zen/widgets/peripheral_status.c rename to app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c index b94d45f69..0f7c7c6d0 100644 --- a/app/boards/arm/corneish_zen/widgets/peripheral_status.c +++ b/app/boards/lowprokb/corneish_zen/widgets/peripheral_status.c @@ -32,8 +32,8 @@ static struct peripheral_status_state get_state(const zmk_event_t *_eh) { static void set_status_symbol(lv_obj_t *icon, struct peripheral_status_state state) { LOG_DBG("halves connected? %s", state.connected ? "true" : "false"); - lv_img_set_src(icon, - state.connected ? &bluetooth_connected_right : &bluetooth_disconnected_right); + lv_image_set_src(icon, + state.connected ? &bluetooth_connected_right : &bluetooth_disconnected_right); } static void output_status_update_cb(struct peripheral_status_state state) { @@ -47,7 +47,7 @@ ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed); int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent); + widget->obj = lv_image_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/arm/corneish_zen/widgets/peripheral_status.h b/app/boards/lowprokb/corneish_zen/widgets/peripheral_status.h similarity index 100% rename from app/boards/arm/corneish_zen/widgets/peripheral_status.h rename to app/boards/lowprokb/corneish_zen/widgets/peripheral_status.h diff --git a/app/boards/arm/nrf52840_m2/Kconfig b/app/boards/makerdiary/nrf52840_m2/Kconfig similarity index 100% rename from app/boards/arm/nrf52840_m2/Kconfig rename to app/boards/makerdiary/nrf52840_m2/Kconfig diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/boards/makerdiary/nrf52840_m2/Kconfig.defconfig similarity index 85% rename from app/boards/arm/nrf52840_m2/Kconfig.defconfig rename to app/boards/makerdiary/nrf52840_m2/Kconfig.defconfig index a5227fc0a..a7851c3b1 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/boards/makerdiary/nrf52840_m2/Kconfig.defconfig @@ -3,9 +3,6 @@ if BOARD_NRF52840_M2 -config BOARD - default "nrf52480_m2" - if USB_DEVICE_STACK config USB_NRFX diff --git a/app/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 b/app/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 new file mode 100644 index 000000000..acb746cdc --- /dev/null +++ b/app/boards/makerdiary/nrf52840_m2/Kconfig.nrf52840_m2 @@ -0,0 +1,8 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NRF52840_M2 + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/nrf52840_m2/board.cmake b/app/boards/makerdiary/nrf52840_m2/board.cmake similarity index 100% rename from app/boards/arm/nrf52840_m2/board.cmake rename to app/boards/makerdiary/nrf52840_m2/board.cmake diff --git a/app/boards/makerdiary/nrf52840_m2/board.yml b/app/boards/makerdiary/nrf52840_m2/board.yml new file mode 100644 index 000000000..a1675e245 --- /dev/null +++ b/app/boards/makerdiary/nrf52840_m2/board.yml @@ -0,0 +1,5 @@ +board: + name: nrf52840_m2 + vendor: makerdiary + socs: + - name: nrf52840 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.dts similarity index 97% rename from app/boards/arm/nrf52840_m2/nrf52840_m2.dts rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2.dts index 39569f0b7..f9ffee623 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts +++ b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include / { model = "Makerdiary nRF52840 M.2 module"; diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.yaml b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml similarity index 100% rename from app/boards/arm/nrf52840_m2/nrf52840_m2.yaml rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2.yaml diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.zmk.yml b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2.zmk.yml similarity index 100% rename from app/boards/arm/nrf52840_m2/nrf52840_m2.zmk.yml rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2.zmk.yml diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_defconfig similarity index 81% rename from app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig rename to app/boards/makerdiary/nrf52840_m2/nrf52840_m2_defconfig index 93eef9e6e..d0b01539e 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig +++ b/app/boards/makerdiary/nrf52840_m2/nrf52840_m2_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NRF52840_M2=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/glove80/pre_dt_board.cmake b/app/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/glove80/pre_dt_board.cmake rename to app/boards/makerdiary/nrf52840_m2/pre_dt_board.cmake diff --git a/app/boards/arm/pillbug/Kconfig b/app/boards/mechwild/pillbug/Kconfig similarity index 100% rename from app/boards/arm/pillbug/Kconfig rename to app/boards/mechwild/pillbug/Kconfig diff --git a/app/boards/arm/pillbug/Kconfig.defconfig b/app/boards/mechwild/pillbug/Kconfig.defconfig similarity index 86% rename from app/boards/arm/pillbug/Kconfig.defconfig rename to app/boards/mechwild/pillbug/Kconfig.defconfig index 48427ed3e..e29ed6789 100644 --- a/app/boards/arm/pillbug/Kconfig.defconfig +++ b/app/boards/mechwild/pillbug/Kconfig.defconfig @@ -3,9 +3,6 @@ if BOARD_PILLBUG -config BOARD - default "PillBug" - if USB_DEVICE_STACK config USB_NRFX diff --git a/app/boards/mechwild/pillbug/Kconfig.pillbug b/app/boards/mechwild/pillbug/Kconfig.pillbug new file mode 100644 index 000000000..b8e0e1482 --- /dev/null +++ b/app/boards/mechwild/pillbug/Kconfig.pillbug @@ -0,0 +1,8 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PILLBUG + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/pillbug/blackpill_pins.dtsi b/app/boards/mechwild/pillbug/blackpill_pins.dtsi similarity index 100% rename from app/boards/arm/pillbug/blackpill_pins.dtsi rename to app/boards/mechwild/pillbug/blackpill_pins.dtsi diff --git a/app/boards/arm/pillbug/board.cmake b/app/boards/mechwild/pillbug/board.cmake similarity index 100% rename from app/boards/arm/pillbug/board.cmake rename to app/boards/mechwild/pillbug/board.cmake diff --git a/app/boards/mechwild/pillbug/board.yml b/app/boards/mechwild/pillbug/board.yml new file mode 100644 index 000000000..abd15044f --- /dev/null +++ b/app/boards/mechwild/pillbug/board.yml @@ -0,0 +1,5 @@ +board: + name: pillbug + vendor: mechwild + socs: + - name: nrf52840 diff --git a/app/boards/arm/pillbug/pillbug-pinctrl.dtsi b/app/boards/mechwild/pillbug/pillbug-pinctrl.dtsi similarity index 100% rename from app/boards/arm/pillbug/pillbug-pinctrl.dtsi rename to app/boards/mechwild/pillbug/pillbug-pinctrl.dtsi diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/mechwild/pillbug/pillbug.dts similarity index 97% rename from app/boards/arm/pillbug/pillbug.dts rename to app/boards/mechwild/pillbug/pillbug.dts index cf4f62fc9..cb2db7c46 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/mechwild/pillbug/pillbug.dts @@ -7,6 +7,8 @@ /dts-v1/; #include +#include + #include "pillbug-pinctrl.dtsi" #include "blackpill_pins.dtsi" diff --git a/app/boards/arm/pillbug/pillbug.yaml b/app/boards/mechwild/pillbug/pillbug.yaml similarity index 100% rename from app/boards/arm/pillbug/pillbug.yaml rename to app/boards/mechwild/pillbug/pillbug.yaml diff --git a/app/boards/arm/pillbug/pillbug.zmk.yml b/app/boards/mechwild/pillbug/pillbug.zmk.yml similarity index 100% rename from app/boards/arm/pillbug/pillbug.zmk.yml rename to app/boards/mechwild/pillbug/pillbug.zmk.yml diff --git a/app/boards/arm/pillbug/pillbug_defconfig b/app/boards/mechwild/pillbug/pillbug_defconfig similarity index 83% rename from app/boards/arm/pillbug/pillbug_defconfig rename to app/boards/mechwild/pillbug/pillbug_defconfig index 9ec72c417..f325d3588 100644 --- a/app/boards/arm/pillbug/pillbug_defconfig +++ b/app/boards/mechwild/pillbug/pillbug_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_PILLBUG=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/mikoto/pre_dt_board.cmake b/app/boards/mechwild/pillbug/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/mikoto/pre_dt_board.cmake rename to app/boards/mechwild/pillbug/pre_dt_board.cmake diff --git a/app/boards/arm/s40nc/Kconfig.defconfig b/app/boards/mechwild/s40nc/Kconfig.defconfig similarity index 100% rename from app/boards/arm/s40nc/Kconfig.defconfig rename to app/boards/mechwild/s40nc/Kconfig.defconfig diff --git a/app/boards/mechwild/s40nc/Kconfig.s40nc b/app/boards/mechwild/s40nc/Kconfig.s40nc new file mode 100644 index 000000000..749f8f11d --- /dev/null +++ b/app/boards/mechwild/s40nc/Kconfig.s40nc @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_S40NC + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/s40nc/README.md b/app/boards/mechwild/s40nc/README.md similarity index 100% rename from app/boards/arm/s40nc/README.md rename to app/boards/mechwild/s40nc/README.md diff --git a/app/boards/arm/s40nc/board.cmake b/app/boards/mechwild/s40nc/board.cmake similarity index 100% rename from app/boards/arm/s40nc/board.cmake rename to app/boards/mechwild/s40nc/board.cmake diff --git a/app/boards/mechwild/s40nc/board.yml b/app/boards/mechwild/s40nc/board.yml new file mode 100644 index 000000000..3df3c330f --- /dev/null +++ b/app/boards/mechwild/s40nc/board.yml @@ -0,0 +1,5 @@ +board: + name: s40nc + vendor: mechwild + socs: + - name: nrf52840 diff --git a/app/boards/arm/nice60/pre_dt_board.cmake b/app/boards/mechwild/s40nc/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nice60/pre_dt_board.cmake rename to app/boards/mechwild/s40nc/pre_dt_board.cmake diff --git a/app/boards/arm/s40nc/s40nc.dts b/app/boards/mechwild/s40nc/s40nc.dts similarity index 98% rename from app/boards/arm/s40nc/s40nc.dts rename to app/boards/mechwild/s40nc/s40nc.dts index 4c37030db..814a08017 100644 --- a/app/boards/arm/s40nc/s40nc.dts +++ b/app/boards/mechwild/s40nc/s40nc.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include + #include / { diff --git a/app/boards/arm/s40nc/s40nc.keymap b/app/boards/mechwild/s40nc/s40nc.keymap similarity index 100% rename from app/boards/arm/s40nc/s40nc.keymap rename to app/boards/mechwild/s40nc/s40nc.keymap diff --git a/app/boards/arm/s40nc/s40nc.yaml b/app/boards/mechwild/s40nc/s40nc.yaml similarity index 100% rename from app/boards/arm/s40nc/s40nc.yaml rename to app/boards/mechwild/s40nc/s40nc.yaml diff --git a/app/boards/arm/s40nc/s40nc.zmk.yml b/app/boards/mechwild/s40nc/s40nc.zmk.yml similarity index 100% rename from app/boards/arm/s40nc/s40nc.zmk.yml rename to app/boards/mechwild/s40nc/s40nc.zmk.yml diff --git a/app/boards/arm/s40nc/s40nc_defconfig b/app/boards/mechwild/s40nc/s40nc_defconfig similarity index 82% rename from app/boards/arm/s40nc/s40nc_defconfig rename to app/boards/mechwild/s40nc/s40nc_defconfig index b523ceb80..79d4175f7 100644 --- a/app/boards/arm/s40nc/s40nc_defconfig +++ b/app/boards/mechwild/s40nc/s40nc_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_S40NC=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/glove80/CMakeLists.txt b/app/boards/moergo/glove80/CMakeLists.txt similarity index 100% rename from app/boards/arm/glove80/CMakeLists.txt rename to app/boards/moergo/glove80/CMakeLists.txt diff --git a/app/boards/arm/glove80/Kconfig.defconfig b/app/boards/moergo/glove80/Kconfig.defconfig similarity index 86% rename from app/boards/arm/glove80/Kconfig.defconfig rename to app/boards/moergo/glove80/Kconfig.defconfig index b79c752f7..6280a1512 100644 --- a/app/boards/arm/glove80/Kconfig.defconfig +++ b/app/boards/moergo/glove80/Kconfig.defconfig @@ -52,14 +52,4 @@ config LED_PWM endif # ZMK_BACKLIGHT -if ZMK_RGB_UNDERGLOW - -config SPI - default y - -config WS2812_STRIP - default y - -endif # ZMK_RGB_UNDERGLOW - endif # BOARD_GLOVE80_LH || BOARD_GLOVE80_RH diff --git a/app/boards/moergo/glove80/Kconfig.glove80_lh b/app/boards/moergo/glove80/Kconfig.glove80_lh new file mode 100644 index 000000000..97590cd72 --- /dev/null +++ b/app/boards/moergo/glove80/Kconfig.glove80_lh @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_GLOVE80_LH + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/moergo/glove80/Kconfig.glove80_rh b/app/boards/moergo/glove80/Kconfig.glove80_rh new file mode 100644 index 000000000..07450baa5 --- /dev/null +++ b/app/boards/moergo/glove80/Kconfig.glove80_rh @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_GLOVE80_RH + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/glove80/board.cmake b/app/boards/moergo/glove80/board.cmake similarity index 100% rename from app/boards/arm/glove80/board.cmake rename to app/boards/moergo/glove80/board.cmake diff --git a/app/boards/moergo/glove80/board.yml b/app/boards/moergo/glove80/board.yml new file mode 100644 index 000000000..fcbd7cf57 --- /dev/null +++ b/app/boards/moergo/glove80/board.yml @@ -0,0 +1,9 @@ +boards: + - name: glove80_rh + vendor: moergo + socs: + - name: nrf52840 + - name: glove80_lh + vendor: moergo + socs: + - name: nrf52840 diff --git a/app/boards/arm/glove80/glove80-layouts.dtsi b/app/boards/moergo/glove80/glove80-layouts.dtsi similarity index 100% rename from app/boards/arm/glove80/glove80-layouts.dtsi rename to app/boards/moergo/glove80/glove80-layouts.dtsi diff --git a/app/boards/arm/glove80/glove80.dtsi b/app/boards/moergo/glove80/glove80.dtsi similarity index 96% rename from app/boards/arm/glove80/glove80.dtsi rename to app/boards/moergo/glove80/glove80.dtsi index ae7601632..cf3ce7cc6 100644 --- a/app/boards/arm/glove80/glove80.dtsi +++ b/app/boards/moergo/glove80/glove80.dtsi @@ -5,6 +5,7 @@ /dts-v1/; #include +#include #include #include "glove80-layouts.dtsi" @@ -47,6 +48,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/glove80/glove80.keymap b/app/boards/moergo/glove80/glove80.keymap similarity index 100% rename from app/boards/arm/glove80/glove80.keymap rename to app/boards/moergo/glove80/glove80.keymap diff --git a/app/boards/arm/glove80/glove80.yaml b/app/boards/moergo/glove80/glove80.yaml similarity index 100% rename from app/boards/arm/glove80/glove80.yaml rename to app/boards/moergo/glove80/glove80.yaml diff --git a/app/boards/arm/glove80/glove80.zmk.yml b/app/boards/moergo/glove80/glove80.zmk.yml similarity index 100% rename from app/boards/arm/glove80/glove80.zmk.yml rename to app/boards/moergo/glove80/glove80.zmk.yml diff --git a/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi b/app/boards/moergo/glove80/glove80_lh-pinctrl.dtsi similarity index 100% rename from app/boards/arm/glove80/glove80_lh-pinctrl.dtsi rename to app/boards/moergo/glove80/glove80_lh-pinctrl.dtsi diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/moergo/glove80/glove80_lh.dts similarity index 100% rename from app/boards/arm/glove80/glove80_lh.dts rename to app/boards/moergo/glove80/glove80_lh.dts diff --git a/app/boards/arm/glove80/glove80_lh.keymap b/app/boards/moergo/glove80/glove80_lh.keymap similarity index 100% rename from app/boards/arm/glove80/glove80_lh.keymap rename to app/boards/moergo/glove80/glove80_lh.keymap diff --git a/app/boards/arm/glove80/glove80_lh_defconfig b/app/boards/moergo/glove80/glove80_lh_defconfig similarity index 96% rename from app/boards/arm/glove80/glove80_lh_defconfig rename to app/boards/moergo/glove80/glove80_lh_defconfig index a93f27cd8..9973e953e 100644 --- a/app/boards/arm/glove80/glove80_lh_defconfig +++ b/app/boards/moergo/glove80/glove80_lh_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_GLOVE80_LH=y - # Enable both USB and BLE CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi b/app/boards/moergo/glove80/glove80_rh-pinctrl.dtsi similarity index 100% rename from app/boards/arm/glove80/glove80_rh-pinctrl.dtsi rename to app/boards/moergo/glove80/glove80_rh-pinctrl.dtsi diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/moergo/glove80/glove80_rh.dts similarity index 100% rename from app/boards/arm/glove80/glove80_rh.dts rename to app/boards/moergo/glove80/glove80_rh.dts diff --git a/app/boards/arm/glove80/glove80_rh.keymap b/app/boards/moergo/glove80/glove80_rh.keymap similarity index 100% rename from app/boards/arm/glove80/glove80_rh.keymap rename to app/boards/moergo/glove80/glove80_rh.keymap diff --git a/app/boards/arm/glove80/glove80_rh_defconfig b/app/boards/moergo/glove80/glove80_rh_defconfig similarity index 96% rename from app/boards/arm/glove80/glove80_rh_defconfig rename to app/boards/moergo/glove80/glove80_rh_defconfig index ef29d682a..d45e0ded8 100644 --- a/app/boards/arm/glove80/glove80_rh_defconfig +++ b/app/boards/moergo/glove80/glove80_rh_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_GLOVE80_RH=y - # Enable both USB and BLE CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nice_nano/pre_dt_board.cmake b/app/boards/moergo/glove80/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nice_nano/pre_dt_board.cmake rename to app/boards/moergo/glove80/pre_dt_board.cmake diff --git a/app/boards/arm/glove80/readme.md b/app/boards/moergo/glove80/readme.md similarity index 100% rename from app/boards/arm/glove80/readme.md rename to app/boards/moergo/glove80/readme.md diff --git a/app/boards/arm/glove80/usb_serial_number.c b/app/boards/moergo/glove80/usb_serial_number.c similarity index 100% rename from app/boards/arm/glove80/usb_serial_number.c rename to app/boards/moergo/glove80/usb_serial_number.c diff --git a/app/boards/native_posix.conf b/app/boards/native_posix.conf deleted file mode 100644 index c3d0260e8..000000000 --- a/app/boards/native_posix.conf +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_GPIO=n -CONFIG_ZMK_BLE=n -CONFIG_LOG=y -CONFIG_LOG_BACKEND_SHOW_COLOR=n -CONFIG_ZMK_LOG_LEVEL_DBG=y -CONFIG_DEBUG=y -CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 diff --git a/app/boards/native_posix.overlay b/app/boards/native_posix.overlay deleted file mode 100644 index d5ebcf184..000000000 --- a/app/boards/native_posix.overlay +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include - -/ { - chosen { - zmk,kscan = &kscan; - }; - - kscan: kscan { - compatible = "zmk,kscan-mock"; - - rows = <2>; - columns = <2>; - exit-after; - }; -}; diff --git a/app/boards/arm/nice60/Kconfig b/app/boards/nicekeyboards/nice60/Kconfig similarity index 100% rename from app/boards/arm/nice60/Kconfig rename to app/boards/nicekeyboards/nice60/Kconfig diff --git a/app/boards/arm/nice60/Kconfig.defconfig b/app/boards/nicekeyboards/nice60/Kconfig.defconfig similarity index 100% rename from app/boards/arm/nice60/Kconfig.defconfig rename to app/boards/nicekeyboards/nice60/Kconfig.defconfig diff --git a/app/boards/nicekeyboards/nice60/Kconfig.nice60 b/app/boards/nicekeyboards/nice60/Kconfig.nice60 new file mode 100644 index 000000000..bfeedf0f9 --- /dev/null +++ b/app/boards/nicekeyboards/nice60/Kconfig.nice60 @@ -0,0 +1,8 @@ +# Copyright (c) 2021 Nick Winans +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NICE60 + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE \ No newline at end of file diff --git a/app/boards/arm/nice60/README.md b/app/boards/nicekeyboards/nice60/README.md similarity index 100% rename from app/boards/arm/nice60/README.md rename to app/boards/nicekeyboards/nice60/README.md diff --git a/app/boards/arm/nice60/board.cmake b/app/boards/nicekeyboards/nice60/board.cmake similarity index 100% rename from app/boards/arm/nice60/board.cmake rename to app/boards/nicekeyboards/nice60/board.cmake diff --git a/app/boards/nicekeyboards/nice60/board.yml b/app/boards/nicekeyboards/nice60/board.yml new file mode 100644 index 000000000..fdbe7cef1 --- /dev/null +++ b/app/boards/nicekeyboards/nice60/board.yml @@ -0,0 +1,5 @@ +board: + name: nice60 + vendor: nicekeyboards + socs: + - name: nrf52840 diff --git a/app/boards/arm/nice60/nice60-pinctrl.dtsi b/app/boards/nicekeyboards/nice60/nice60-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nice60/nice60-pinctrl.dtsi rename to app/boards/nicekeyboards/nice60/nice60-pinctrl.dtsi diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/nicekeyboards/nice60/nice60.dts similarity index 97% rename from app/boards/arm/nice60/nice60.dts rename to app/boards/nicekeyboards/nice60/nice60.dts index 35eececd4..acecda4d8 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/nicekeyboards/nice60/nice60.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include #include #include @@ -92,6 +93,10 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/nice60/nice60.keymap b/app/boards/nicekeyboards/nice60/nice60.keymap similarity index 100% rename from app/boards/arm/nice60/nice60.keymap rename to app/boards/nicekeyboards/nice60/nice60.keymap diff --git a/app/boards/arm/nice60/nice60.yaml b/app/boards/nicekeyboards/nice60/nice60.yaml similarity index 100% rename from app/boards/arm/nice60/nice60.yaml rename to app/boards/nicekeyboards/nice60/nice60.yaml diff --git a/app/boards/arm/nice60/nice60.zmk.yml b/app/boards/nicekeyboards/nice60/nice60.zmk.yml similarity index 100% rename from app/boards/arm/nice60/nice60.zmk.yml rename to app/boards/nicekeyboards/nice60/nice60.zmk.yml diff --git a/app/boards/arm/nice60/nice60_defconfig b/app/boards/nicekeyboards/nice60/nice60_defconfig similarity index 79% rename from app/boards/arm/nice60/nice60_defconfig rename to app/boards/nicekeyboards/nice60/nice60_defconfig index fabcb7edd..9b3a9144f 100644 --- a/app/boards/arm/nice60/nice60_defconfig +++ b/app/boards/nicekeyboards/nice60/nice60_defconfig @@ -1,10 +1,6 @@ # Copyright (c) 2021 Nick Winans # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NICE60=y - # Enable MPU CONFIG_ARM_MPU=y @@ -24,11 +20,9 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 - CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/nrf52840_m2/pre_dt_board.cmake b/app/boards/nicekeyboards/nice60/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nrf52840_m2/pre_dt_board.cmake rename to app/boards/nicekeyboards/nice60/pre_dt_board.cmake diff --git a/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano b/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano new file mode 100644 index 000000000..d1be26ef9 --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/Kconfig.nice_nano @@ -0,0 +1,8 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NICE_NANO + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE \ No newline at end of file diff --git a/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi b/app/boards/nicekeyboards/nice_nano/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi rename to app/boards/nicekeyboards/nice_nano/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/corneish_zen/board.cmake b/app/boards/nicekeyboards/nice_nano/board.cmake similarity index 100% rename from app/boards/arm/corneish_zen/board.cmake rename to app/boards/nicekeyboards/nice_nano/board.cmake diff --git a/app/boards/nicekeyboards/nice_nano/board.yml b/app/boards/nicekeyboards/nice_nano/board.yml new file mode 100644 index 000000000..89171957c --- /dev/null +++ b/app/boards/nicekeyboards/nice_nano/board.yml @@ -0,0 +1,11 @@ +board: + name: nice_nano + vendor: nicekeyboards + socs: + - name: nrf52840 + revision: + format: major.minor.patch + default: 2.0.0 + revisions: + - name: 1.0.0 + - name: 2.0.0 diff --git a/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi b/app/boards/nicekeyboards/nice_nano/nice_nano-pinctrl.dtsi similarity index 100% rename from app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi rename to app/boards/nicekeyboards/nice_nano/nice_nano-pinctrl.dtsi diff --git a/app/boards/arm/nice_nano/nice_nano.dtsi b/app/boards/nicekeyboards/nice_nano/nice_nano.dts similarity index 94% rename from app/boards/arm/nice_nano/nice_nano.dtsi rename to app/boards/nicekeyboards/nice_nano/nice_nano.dts index 839845c8e..0595ce137 100644 --- a/app/boards/arm/nice_nano/nice_nano.dtsi +++ b/app/boards/nicekeyboards/nice_nano/nice_nano.dts @@ -4,10 +4,14 @@ * SPDX-License-Identifier: MIT */ +/dts-v1/; + #include +#include #include "nice_nano-pinctrl.dtsi" #include "arduino_pro_micro_pins.dtsi" + / { model = "nice!nano"; compatible = "nice,nano"; @@ -26,6 +30,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/nice_nano/nice_nano.yaml b/app/boards/nicekeyboards/nice_nano/nice_nano.yaml similarity index 100% rename from app/boards/arm/nice_nano/nice_nano.yaml rename to app/boards/nicekeyboards/nice_nano/nice_nano.yaml diff --git a/app/boards/arm/nice_nano/nice_nano.zmk.yml b/app/boards/nicekeyboards/nice_nano/nice_nano.zmk.yml similarity index 64% rename from app/boards/arm/nice_nano/nice_nano.zmk.yml rename to app/boards/nicekeyboards/nice_nano/nice_nano.zmk.yml index 1799c0def..2245a89ee 100644 --- a/app/boards/arm/nice_nano/nice_nano.zmk.yml +++ b/app/boards/nicekeyboards/nice_nano/nice_nano.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" id: nice_nano -name: nice!nano v1 +name: nice!nano type: board arch: arm outputs: @@ -8,3 +8,7 @@ outputs: - ble url: https://nicekeyboards.com/nice-nano exposes: [pro_micro] +revisions: + - "1.0.0" + - "2.0.0" +default_revision: "2.0.0" diff --git a/app/boards/arm/nice_nano/nice_nano.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_1_0_0.overlay similarity index 85% rename from app/boards/arm/nice_nano/nice_nano.dts rename to app/boards/nicekeyboards/nice_nano/nice_nano_1_0_0.overlay index 06be88e1c..6c1590bb2 100644 --- a/app/boards/arm/nice_nano/nice_nano.dts +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_1_0_0.overlay @@ -1,12 +1,9 @@ /* - * Copyright (c) 2021 The ZMK Contributors + * Copyright (c) 2025 The ZMK Contributors * * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "nice_nano.dtsi" - / { chosen { zmk,battery = &vbatt; diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/nicekeyboards/nice_nano/nice_nano_1_0_0_defconfig similarity index 81% rename from app/boards/arm/nice_nano/nice_nano_defconfig rename to app/boards/nicekeyboards/nice_nano/nice_nano_1_0_0_defconfig index 6b7fcab25..babddaac9 100644 --- a/app/boards/arm/nice_nano/nice_nano_defconfig +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_1_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NICE_NANO=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/app/boards/arm/nice_nano/nice_nano_v2.dts b/app/boards/nicekeyboards/nice_nano/nice_nano_2_0_0.overlay similarity index 92% rename from app/boards/arm/nice_nano/nice_nano_v2.dts rename to app/boards/nicekeyboards/nice_nano/nice_nano_2_0_0.overlay index c4f7a821c..34c635ffa 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2.dts +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_2_0_0.overlay @@ -4,9 +4,6 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "nice_nano.dtsi" - / { chosen { zmk,battery = &vbatt; @@ -23,3 +20,7 @@ compatible = "zmk,battery-nrf-vddh"; }; }; + +®0 { + status = "okay"; +}; diff --git a/app/boards/arm/nice_nano/nice_nano_v2_defconfig b/app/boards/nicekeyboards/nice_nano/nice_nano_2_0_0_defconfig similarity index 76% rename from app/boards/arm/nice_nano/nice_nano_v2_defconfig rename to app/boards/nicekeyboards/nice_nano/nice_nano_2_0_0_defconfig index 6b5044e5e..03d08c91c 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2_defconfig +++ b/app/boards/nicekeyboards/nice_nano/nice_nano_2_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NICE_NANO_V2=y - # Enable MPU CONFIG_ARM_MPU=y @@ -24,4 +20,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_BLE=y -CONFIG_ZMK_USB=y \ No newline at end of file +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/nrfmicro/pre_dt_board.cmake b/app/boards/nicekeyboards/nice_nano/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/nrfmicro/pre_dt_board.cmake rename to app/boards/nicekeyboards/nice_nano/pre_dt_board.cmake diff --git a/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml b/app/boards/nordic/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml similarity index 88% rename from app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml rename to app/boards/nordic/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml index 2a0d99460..47cb6461a 100644 --- a/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml +++ b/app/boards/nordic/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: nrf52840dk_nrf52840 +id: nrf52840dk/nrf52840 name: Nordic nRF52840 DK type: board arch: arm diff --git a/app/boards/arm/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml.disabled b/app/boards/nordic/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml similarity index 86% rename from app/boards/arm/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml.disabled rename to app/boards/nordic/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml index 444de996b..96a461fe8 100644 --- a/app/boards/arm/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml.disabled +++ b/app/boards/nordic/nrf5340dk_nrf5340_cpuapp/nrf5340dk_nrf5340_cpuapp.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: nrf5340dk_nrf5340_cpuapp +id: nrf5340dk/nrf5340/cpuapp name: Nordic nRF5340 DK type: board arch: arm diff --git a/app/boards/arm/planck/CMakeLists.txt b/app/boards/olkb/planck/CMakeLists.txt similarity index 100% rename from app/boards/arm/planck/CMakeLists.txt rename to app/boards/olkb/planck/CMakeLists.txt diff --git a/app/boards/arm/planck/Kconfig.defconfig b/app/boards/olkb/planck/Kconfig.defconfig similarity index 100% rename from app/boards/arm/planck/Kconfig.defconfig rename to app/boards/olkb/planck/Kconfig.defconfig diff --git a/app/boards/arm/planck/Kconfig.board b/app/boards/olkb/planck/Kconfig.planck similarity index 55% rename from app/boards/arm/planck/Kconfig.board rename to app/boards/olkb/planck/Kconfig.planck index 28b7381fb..f8d42f068 100644 --- a/app/boards/arm/planck/Kconfig.board +++ b/app/boards/olkb/planck/Kconfig.planck @@ -3,6 +3,6 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -config BOARD_PLANCK_REV6 - bool "Planck V6 Keyboard" - depends on SOC_STM32F303XC +config BOARD_PLANCK + bool "Planck Keyboard" + select SOC_STM32F303XC diff --git a/app/boards/arm/planck/board.cmake b/app/boards/olkb/planck/board.cmake similarity index 100% rename from app/boards/arm/planck/board.cmake rename to app/boards/olkb/planck/board.cmake diff --git a/app/boards/olkb/planck/board.yml b/app/boards/olkb/planck/board.yml new file mode 100644 index 000000000..b81bcddbf --- /dev/null +++ b/app/boards/olkb/planck/board.yml @@ -0,0 +1,10 @@ +board: + name: planck + vendor: olkb + socs: + - name: stm32f303xc + revision: + format: major.minor.patch + default: 6.0.0 + revisions: + - name: 6.0.0 diff --git a/app/boards/arm/planck/planck_rev6.dts b/app/boards/olkb/planck/planck.dts similarity index 100% rename from app/boards/arm/planck/planck_rev6.dts rename to app/boards/olkb/planck/planck.dts diff --git a/app/boards/arm/planck/planck_rev6.keymap b/app/boards/olkb/planck/planck.keymap similarity index 100% rename from app/boards/arm/planck/planck_rev6.keymap rename to app/boards/olkb/planck/planck.keymap diff --git a/app/boards/arm/planck/planck_rev6.yaml b/app/boards/olkb/planck/planck.yaml similarity index 100% rename from app/boards/arm/planck/planck_rev6.yaml rename to app/boards/olkb/planck/planck.yaml diff --git a/app/boards/arm/planck/planck_rev6.zmk.yml b/app/boards/olkb/planck/planck.zmk.yml similarity index 61% rename from app/boards/arm/planck/planck_rev6.zmk.yml rename to app/boards/olkb/planck/planck.zmk.yml index f9d424247..42e83d12f 100644 --- a/app/boards/arm/planck/planck_rev6.zmk.yml +++ b/app/boards/olkb/planck/planck.zmk.yml @@ -1,6 +1,6 @@ file_format: "1" -id: planck_rev6 -name: Planck Rev6 +id: planck +name: Planck (Rev6) type: board arch: arm features: @@ -9,3 +9,6 @@ features: outputs: - usb url: https://olkb.com/collections/planck +revisions: + - "6.0.0" +default_revision: "6.0.0" diff --git a/app/boards/arm/planck/planck_rev6_defconfig b/app/boards/olkb/planck/planck_6_0_0_defconfig similarity index 85% rename from app/boards/arm/planck/planck_rev6_defconfig rename to app/boards/olkb/planck/planck_6_0_0_defconfig index f45306390..154e7687b 100644 --- a/app/boards/arm/planck/planck_rev6_defconfig +++ b/app/boards/olkb/planck/planck_6_0_0_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 diff --git a/app/boards/arm/preonic/CMakeLists.txt b/app/boards/olkb/preonic/CMakeLists.txt similarity index 100% rename from app/boards/arm/preonic/CMakeLists.txt rename to app/boards/olkb/preonic/CMakeLists.txt diff --git a/app/boards/arm/preonic/Kconfig.defconfig b/app/boards/olkb/preonic/Kconfig.defconfig similarity index 80% rename from app/boards/arm/preonic/Kconfig.defconfig rename to app/boards/olkb/preonic/Kconfig.defconfig index 86b2e3d0e..ab7b9b525 100644 --- a/app/boards/arm/preonic/Kconfig.defconfig +++ b/app/boards/olkb/preonic/Kconfig.defconfig @@ -3,7 +3,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_PREONIC_REV3 +if BOARD_PREONIC config ZMK_KEYBOARD_NAME default "Preonic V3" @@ -11,4 +11,4 @@ config ZMK_KEYBOARD_NAME config ZMK_KSCAN_MATRIX_POLLING default y -endif # BOARD_PREONIC_REV3 +endif # BOARD_PREONIC diff --git a/app/boards/arm/preonic/Kconfig.board b/app/boards/olkb/preonic/Kconfig.preonic similarity index 55% rename from app/boards/arm/preonic/Kconfig.board rename to app/boards/olkb/preonic/Kconfig.preonic index 39f35db6b..d7caf7336 100644 --- a/app/boards/arm/preonic/Kconfig.board +++ b/app/boards/olkb/preonic/Kconfig.preonic @@ -3,6 +3,5 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -config BOARD_PREONIC_REV3 - bool "Preonic V3 Keyboard" - depends on SOC_STM32F303XC +config BOARD_PREONIC + select SOC_STM32F303XC diff --git a/app/boards/arm/preonic/board.cmake b/app/boards/olkb/preonic/board.cmake similarity index 100% rename from app/boards/arm/preonic/board.cmake rename to app/boards/olkb/preonic/board.cmake diff --git a/app/boards/olkb/preonic/board.yml b/app/boards/olkb/preonic/board.yml new file mode 100644 index 000000000..688df6846 --- /dev/null +++ b/app/boards/olkb/preonic/board.yml @@ -0,0 +1,10 @@ +board: + name: preonic + vendor: olkb + socs: + - name: stm32f303xc + revision: + format: major.minor.patch + default: 3.0.0 + revisions: + - name: 3.0.0 diff --git a/app/boards/arm/preonic/preonic_rev3.dts b/app/boards/olkb/preonic/preonic.dts similarity index 100% rename from app/boards/arm/preonic/preonic_rev3.dts rename to app/boards/olkb/preonic/preonic.dts diff --git a/app/boards/arm/preonic/preonic_rev3.keymap b/app/boards/olkb/preonic/preonic.keymap similarity index 100% rename from app/boards/arm/preonic/preonic_rev3.keymap rename to app/boards/olkb/preonic/preonic.keymap diff --git a/app/boards/arm/preonic/preonic_rev3.yaml b/app/boards/olkb/preonic/preonic.yaml similarity index 100% rename from app/boards/arm/preonic/preonic_rev3.yaml rename to app/boards/olkb/preonic/preonic.yaml diff --git a/app/boards/arm/preonic/preonic_rev3.zmk.yml b/app/boards/olkb/preonic/preonic.zmk.yml similarity index 69% rename from app/boards/arm/preonic/preonic_rev3.zmk.yml rename to app/boards/olkb/preonic/preonic.zmk.yml index bd9d95794..692f91a83 100644 --- a/app/boards/arm/preonic/preonic_rev3.zmk.yml +++ b/app/boards/olkb/preonic/preonic.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: preonic_rev3 +id: preonic name: Preonic Rev3 type: board arch: arm @@ -8,3 +8,6 @@ features: outputs: - usb url: https://olkb.com/collections/preonic +revisions: + - "3.0.0" +default_revision: "3.0.0" diff --git a/app/boards/arm/preonic/preonic_rev3_defconfig b/app/boards/olkb/preonic/preonic_defconfig similarity index 74% rename from app/boards/arm/preonic/preonic_rev3_defconfig rename to app/boards/olkb/preonic/preonic_defconfig index e063827a4..fbe05d589 100644 --- a/app/boards/arm/preonic/preonic_rev3_defconfig +++ b/app/boards/olkb/preonic/preonic_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 @@ -14,4 +12,4 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y -CONFIG_ZMK_USB=y \ No newline at end of file +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/ferris/Kconfig.defconfig b/app/boards/pierrechevalier83/ferris/Kconfig.defconfig similarity index 85% rename from app/boards/arm/ferris/Kconfig.defconfig rename to app/boards/pierrechevalier83/ferris/Kconfig.defconfig index 420ea01fa..1c8ed02c2 100644 --- a/app/boards/arm/ferris/Kconfig.defconfig +++ b/app/boards/pierrechevalier83/ferris/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_FERRIS -config BOARD - default "ferris_rev02" - config ZMK_KEYBOARD_NAME default "Ferris rev 0.2" diff --git a/app/boards/pierrechevalier83/ferris/Kconfig.ferris b/app/boards/pierrechevalier83/ferris/Kconfig.ferris new file mode 100644 index 000000000..66f0aa237 --- /dev/null +++ b/app/boards/pierrechevalier83/ferris/Kconfig.ferris @@ -0,0 +1,13 @@ +# Ferris board configuration + +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_FERRIS + select SOC_STM32F072XB + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE + imply STM32_BOOTLOADER + imply RTC + imply BBRAM diff --git a/app/boards/arm/ferris/README.md b/app/boards/pierrechevalier83/ferris/README.md similarity index 79% rename from app/boards/arm/ferris/README.md rename to app/boards/pierrechevalier83/ferris/README.md index b6fdcdf26..3dbfb1ba4 100644 --- a/app/boards/arm/ferris/README.md +++ b/app/boards/pierrechevalier83/ferris/README.md @@ -3,7 +3,7 @@ ## Standard Build ``` -west build -p -d build/ferris --board ferris_rev02 +west build -p -d build/ferris --board ferris ``` ## Flashing diff --git a/app/boards/arm/ferris/board.cmake b/app/boards/pierrechevalier83/ferris/board.cmake similarity index 100% rename from app/boards/arm/ferris/board.cmake rename to app/boards/pierrechevalier83/ferris/board.cmake diff --git a/app/boards/pierrechevalier83/ferris/board.yml b/app/boards/pierrechevalier83/ferris/board.yml new file mode 100644 index 000000000..3bed9d0b4 --- /dev/null +++ b/app/boards/pierrechevalier83/ferris/board.yml @@ -0,0 +1,5 @@ +board: + name: ferris + vendor: pierrechevalier83 + socs: + - name: stm32f072xb diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/pierrechevalier83/ferris/ferris.dts similarity index 85% rename from app/boards/arm/ferris/ferris_rev02.dts rename to app/boards/pierrechevalier83/ferris/ferris.dts index 1ec9a8043..c49ae602a 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/pierrechevalier83/ferris/ferris.dts @@ -106,7 +106,7 @@ clock-frequency = ; right_io: mcp23017@20 { - compatible = "microchip,mcp230xx"; + compatible = "microchip,mcp23017"; status = "okay"; gpio-controller; reg = <0x20>; @@ -147,9 +147,37 @@ zephyr_udc0: &usb { apb1-prescaler = <1>; }; - &rtc { + clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, + <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; + + backup_regs { + status = "okay"; + }; +}; + +&bbram { + status = "okay"; + + retainedmem0: retainedmem { + compatible = "zephyr,retained-bbram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + retention0: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; + +/ { + chosen { + zephyr,boot-mode = &retention0; + }; }; &flash0 { diff --git a/app/boards/arm/ferris/ferris_rev02.keymap b/app/boards/pierrechevalier83/ferris/ferris.keymap similarity index 100% rename from app/boards/arm/ferris/ferris_rev02.keymap rename to app/boards/pierrechevalier83/ferris/ferris.keymap diff --git a/app/boards/arm/ferris/ferris_rev02.yaml b/app/boards/pierrechevalier83/ferris/ferris.yaml similarity index 83% rename from app/boards/arm/ferris/ferris_rev02.yaml rename to app/boards/pierrechevalier83/ferris/ferris.yaml index f4cbdcaf7..d2dbfa0a3 100644 --- a/app/boards/arm/ferris/ferris_rev02.yaml +++ b/app/boards/pierrechevalier83/ferris/ferris.yaml @@ -1,4 +1,4 @@ -identifier: ferris_rev02 +identifier: ferris name: Ferris 0.2 type: mcu arch: arm diff --git a/app/boards/arm/ferris/ferris_rev02.zmk.yml b/app/boards/pierrechevalier83/ferris/ferris.zmk.yml similarity index 90% rename from app/boards/arm/ferris/ferris_rev02.zmk.yml rename to app/boards/pierrechevalier83/ferris/ferris.zmk.yml index da3a7f534..841f437a4 100644 --- a/app/boards/arm/ferris/ferris_rev02.zmk.yml +++ b/app/boards/pierrechevalier83/ferris/ferris.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: ferris_rev02 +id: ferris name: Ferris 0.2 type: board arch: arm diff --git a/app/boards/arm/ferris/ferris_rev02_defconfig b/app/boards/pierrechevalier83/ferris/ferris_defconfig similarity index 84% rename from app/boards/arm/ferris/ferris_rev02_defconfig rename to app/boards/pierrechevalier83/ferris/ferris_defconfig index bd03c3050..eb55b0193 100644 --- a/app/boards/arm/ferris/ferris_rev02_defconfig +++ b/app/boards/pierrechevalier83/ferris/ferris_defconfig @@ -1,8 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_BOARD_FERRIS=y -CONFIG_SOC_SERIES_STM32F0X=y -CONFIG_SOC_STM32F072XB=y # 48MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000 diff --git a/app/boards/polarityworks/bt60/Kconfig.bt60 b/app/boards/polarityworks/bt60/Kconfig.bt60 new file mode 100644 index 000000000..62c6c3dd5 --- /dev/null +++ b/app/boards/polarityworks/bt60/Kconfig.bt60 @@ -0,0 +1,10 @@ +# CKP BT60 board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT60 + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/polarityworks/bt60/Kconfig.bt60_hs b/app/boards/polarityworks/bt60/Kconfig.bt60_hs new file mode 100644 index 000000000..f026d266b --- /dev/null +++ b/app/boards/polarityworks/bt60/Kconfig.bt60_hs @@ -0,0 +1,10 @@ +# BT60 HS board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT60_HS + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/polarityworks/bt60/Kconfig.defconfig b/app/boards/polarityworks/bt60/Kconfig.defconfig new file mode 100644 index 000000000..1b681d07c --- /dev/null +++ b/app/boards/polarityworks/bt60/Kconfig.defconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_KEYBOARD_NAME + default "BT60" if BOARD_BT60 || BOARD_BT60_HS + +if BOARD_BT60 || BOARD_BT60_HS + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config BT_CTLR + default BT + +endif # BOARD_BT60 || BOARD_BT60_HS diff --git a/app/boards/arm/mikoto/board.cmake b/app/boards/polarityworks/bt60/board.cmake similarity index 100% rename from app/boards/arm/mikoto/board.cmake rename to app/boards/polarityworks/bt60/board.cmake diff --git a/app/boards/polarityworks/bt60/board.yml b/app/boards/polarityworks/bt60/board.yml new file mode 100644 index 000000000..2db078f6b --- /dev/null +++ b/app/boards/polarityworks/bt60/board.yml @@ -0,0 +1,15 @@ +boards: + - name: bt60_hs + vendor: polarityworks + socs: + - name: nrf52840 + - name: bt60 + vendor: polarityworks + socs: + - name: nrf52840 + revision: + format: major.minor.patch + default: 2.0.0 + revisions: + - name: 1.0.0 + - name: 2.0.0 diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/polarityworks/bt60/bt60.dts similarity index 65% rename from app/boards/arm/bt60/bt60.dtsi rename to app/boards/polarityworks/bt60/bt60.dts index 5e176e602..d4c52c1c9 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/polarityworks/bt60/bt60.dts @@ -1,17 +1,14 @@ /* -* Copyright (c) 2021 Polarity Works +* Copyright (c) 2022 The ZMK Contributors * * SPDX-License-Identifier: MIT */ /dts-v1/; #include -#include +#include / { - model = "BT60"; - compatible = "polarityworks,bt60"; - chosen { zephyr,code-partition = &code_partition; zephyr,sram = &sram0; @@ -19,35 +16,9 @@ zmk,battery = &vbatt; }; - sensors: sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - triggers-per-rotation = <20>; - }; - - - - left_encoder: encoder_left { - compatible = "alps,ec11"; - a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <80>; - status = "okay"; - }; - - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - }; - }; - vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; }; }; @@ -71,7 +42,6 @@ zephyr_udc0: &usbd { status = "okay"; }; - &flash0 { /* * For more information, see: diff --git a/app/boards/arm/ckp/bt60_v2.yaml b/app/boards/polarityworks/bt60/bt60.yaml similarity index 88% rename from app/boards/arm/ckp/bt60_v2.yaml rename to app/boards/polarityworks/bt60/bt60.yaml index 2a3f3b47a..c2dc3736b 100644 --- a/app/boards/arm/ckp/bt60_v2.yaml +++ b/app/boards/polarityworks/bt60/bt60.yaml @@ -1,4 +1,4 @@ -identifier: bt60_v2 +identifier: bt60 name: BT60 V2 type: mcu arch: arm diff --git a/app/boards/arm/ckp/bt60_v2.zmk.yml b/app/boards/polarityworks/bt60/bt60.zmk.yml similarity index 82% rename from app/boards/arm/ckp/bt60_v2.zmk.yml rename to app/boards/polarityworks/bt60/bt60.zmk.yml index eef36a4e2..bec416a97 100644 --- a/app/boards/arm/ckp/bt60_v2.zmk.yml +++ b/app/boards/polarityworks/bt60/bt60.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bt60_v2 +id: bt60 name: BT60 V2 type: board arch: arm @@ -12,4 +12,7 @@ features: outputs: - usb - ble +revisions: + - 2.0.0 + - 1.0.0 url: https://polarityworks.com/btckp diff --git a/app/boards/polarityworks/bt60/bt60_1_0_0.dtsi b/app/boards/polarityworks/bt60/bt60_1_0_0.dtsi new file mode 100644 index 000000000..d760b2844 --- /dev/null +++ b/app/boards/polarityworks/bt60/bt60_1_0_0.dtsi @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2021 Polarity Works +* +* SPDX-License-Identifier: MIT +*/ + +#include + +/ { + model = "BT60"; + compatible = "polarityworks,bt60"; + + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + triggers-per-rotation = <20>; + }; + + left_encoder: encoder_left { + compatible = "alps,ec11"; + a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <80>; + status = "okay"; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&vbatt { + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; +}; diff --git a/app/boards/arm/bt60/bt60_v1.keymap b/app/boards/polarityworks/bt60/bt60_1_0_0.keymap similarity index 99% rename from app/boards/arm/bt60/bt60_v1.keymap rename to app/boards/polarityworks/bt60/bt60_1_0_0.keymap index 65442b582..939576957 100644 --- a/app/boards/arm/bt60/bt60_v1.keymap +++ b/app/boards/polarityworks/bt60/bt60_1_0_0.keymap @@ -20,7 +20,7 @@ #elif defined(HHKB) zmk,physical-layout = &layout_60_hhkb; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v1.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; @@ -147,7 +147,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; }; diff --git a/app/boards/arm/bt60/bt60_v1.dts b/app/boards/polarityworks/bt60/bt60_1_0_0.overlay similarity index 99% rename from app/boards/arm/bt60/bt60_v1.dts rename to app/boards/polarityworks/bt60/bt60_1_0_0.overlay index 5790458d0..c132266d3 100644 --- a/app/boards/arm/bt60/bt60_v1.dts +++ b/app/boards/polarityworks/bt60/bt60_1_0_0.overlay @@ -4,8 +4,7 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "bt60.dtsi" +#include "bt60_1_0_0.dtsi" #include #include #include diff --git a/app/boards/arm/bt60/bt60_v1_defconfig b/app/boards/polarityworks/bt60/bt60_1_0_0_defconfig similarity index 79% rename from app/boards/arm/bt60/bt60_v1_defconfig rename to app/boards/polarityworks/bt60/bt60_1_0_0_defconfig index 04adb8a3c..6925f1750 100644 --- a/app/boards/arm/bt60/bt60_v1_defconfig +++ b/app/boards/polarityworks/bt60/bt60_1_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT60_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/ckp/bt60_v2.keymap b/app/boards/polarityworks/bt60/bt60_2_0_0.keymap similarity index 99% rename from app/boards/arm/ckp/bt60_v2.keymap rename to app/boards/polarityworks/bt60/bt60_2_0_0.keymap index 478cf7bde..c9829589c 100644 --- a/app/boards/arm/ckp/bt60_v2.keymap +++ b/app/boards/polarityworks/bt60/bt60_2_0_0.keymap @@ -20,7 +20,7 @@ #elif defined(HHKB) zmk,physical-layout = &layout_60_hhkb; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; @@ -170,7 +170,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap" #endif }; diff --git a/app/boards/arm/ckp/bt60_v2.dts b/app/boards/polarityworks/bt60/bt60_2_0_0.overlay similarity index 98% rename from app/boards/arm/ckp/bt60_v2.dts rename to app/boards/polarityworks/bt60/bt60_2_0_0.overlay index 1cdb0307a..c9aac427b 100644 --- a/app/boards/arm/ckp/bt60_v2.dts +++ b/app/boards/polarityworks/bt60/bt60_2_0_0.overlay @@ -4,8 +4,7 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "ckp.dtsi" +#include "../common/ckp.dtsi" #include #include #include @@ -14,7 +13,7 @@ / { model = "BT60_V2"; - compatible = "polarityworks,bt60_v2"; + compatible = "polarityworks,bt60"; chosen { zmk,physical-layout = &layout_60_ansi; diff --git a/app/boards/arm/ckp/bt60_v2_defconfig b/app/boards/polarityworks/bt60/bt60_2_0_0_defconfig similarity index 84% rename from app/boards/arm/ckp/bt60_v2_defconfig rename to app/boards/polarityworks/bt60/bt60_2_0_0_defconfig index fd1ae9859..27b0681e3 100644 --- a/app/boards/arm/ckp/bt60_v2_defconfig +++ b/app/boards/polarityworks/bt60/bt60_2_0_0_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT60_V2=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,8 +28,6 @@ CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262 -CONFIG_WS2812_STRIP=y -CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/app/boards/arm/bt60/bt60_v1_hs.dts b/app/boards/polarityworks/bt60/bt60_hs.dts similarity index 97% rename from app/boards/arm/bt60/bt60_v1_hs.dts rename to app/boards/polarityworks/bt60/bt60_hs.dts index 23d4d55bb..c152a62a0 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.dts +++ b/app/boards/polarityworks/bt60/bt60_hs.dts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include "bt60.dtsi" +#include "bt60.dts" +#include "bt60_1_0_0.dtsi" #include / { diff --git a/app/boards/arm/bt60/bt60_v1_hs.keymap b/app/boards/polarityworks/bt60/bt60_hs.keymap similarity index 100% rename from app/boards/arm/bt60/bt60_v1_hs.keymap rename to app/boards/polarityworks/bt60/bt60_hs.keymap diff --git a/app/boards/arm/bt60/bt60_v1_hs.zmk.yml b/app/boards/polarityworks/bt60/bt60_hs.zmk.yml similarity index 91% rename from app/boards/arm/bt60/bt60_v1_hs.zmk.yml rename to app/boards/polarityworks/bt60/bt60_hs.zmk.yml index 1c61f6b2a..2d156370f 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.zmk.yml +++ b/app/boards/polarityworks/bt60/bt60_hs.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bt60_v1_hs +id: bt60_hs name: BT60 V1 Hotswap type: board arch: arm diff --git a/app/boards/arm/bt60/bt60_v1_hs_defconfig b/app/boards/polarityworks/bt60/bt60_hs_defconfig similarity index 78% rename from app/boards/arm/bt60/bt60_v1_hs_defconfig rename to app/boards/polarityworks/bt60/bt60_hs_defconfig index f16d82ac4..6925f1750 100644 --- a/app/boards/arm/bt60/bt60_v1_hs_defconfig +++ b/app/boards/polarityworks/bt60/bt60_hs_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT60_V1_HS=y - # Enable MPU CONFIG_ARM_MPU=y @@ -25,4 +21,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/pillbug/pre_dt_board.cmake b/app/boards/polarityworks/bt60/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/pillbug/pre_dt_board.cmake rename to app/boards/polarityworks/bt60/pre_dt_board.cmake diff --git a/app/boards/polarityworks/bt65/Kconfig.bt65 b/app/boards/polarityworks/bt65/Kconfig.bt65 new file mode 100644 index 000000000..3aaa410c2 --- /dev/null +++ b/app/boards/polarityworks/bt65/Kconfig.bt65 @@ -0,0 +1,10 @@ +# CKP BT65 board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT65 + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/arm/bt60/Kconfig.defconfig b/app/boards/polarityworks/bt65/Kconfig.defconfig similarity index 55% rename from app/boards/arm/bt60/Kconfig.defconfig rename to app/boards/polarityworks/bt65/Kconfig.defconfig index c44901bd8..ac6b221e1 100644 --- a/app/boards/arm/bt60/Kconfig.defconfig +++ b/app/boards/polarityworks/bt65/Kconfig.defconfig @@ -1,10 +1,10 @@ -# Copyright (c) 2021 Polarity Works +# Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if BOARD_BT60_V1_HS || BOARD_BT60_V1 +config ZMK_KEYBOARD_NAME + default "BT65" if BOARD_BT65 -config BOARD - default "bt60" +if BOARD_BT65 if USB @@ -19,7 +19,4 @@ endif # USB config BT_CTLR default BT -config ZMK_KEYBOARD_NAME - default "BT60" - -endif # BOARD_BT60 +endif # BOARD_BT65 diff --git a/app/boards/arm/nice_nano/board.cmake b/app/boards/polarityworks/bt65/board.cmake similarity index 100% rename from app/boards/arm/nice_nano/board.cmake rename to app/boards/polarityworks/bt65/board.cmake diff --git a/app/boards/polarityworks/bt65/board.yml b/app/boards/polarityworks/bt65/board.yml new file mode 100644 index 000000000..97f443cfd --- /dev/null +++ b/app/boards/polarityworks/bt65/board.yml @@ -0,0 +1,5 @@ +board: + name: bt65 + vendor: polarityworks + socs: + - name: nrf52840 diff --git a/app/boards/arm/ckp/bt65_v1.dts b/app/boards/polarityworks/bt65/bt65.dts similarity index 95% rename from app/boards/arm/ckp/bt65_v1.dts rename to app/boards/polarityworks/bt65/bt65.dts index 77e81289f..d7de5143d 100644 --- a/app/boards/arm/ckp/bt65_v1.dts +++ b/app/boards/polarityworks/bt65/bt65.dts @@ -5,7 +5,11 @@ */ /dts-v1/; -#include "ckp.dtsi" +#include +#include + +#include "../common/ckp-base.dtsi" +#include "../common/ckp.dtsi" #include #include #include @@ -14,7 +18,7 @@ / { model = "BT65_V1"; - compatible = "polarityworks,bt65_v1"; + compatible = "polarityworks,bt65"; chosen { zmk,physical-layout = &layout_65_ansi; diff --git a/app/boards/arm/ckp/bt65_v1.keymap b/app/boards/polarityworks/bt65/bt65.keymap similarity index 99% rename from app/boards/arm/ckp/bt65_v1.keymap rename to app/boards/polarityworks/bt65/bt65.keymap index da4941438..b3b34b219 100644 --- a/app/boards/arm/ckp/bt65_v1.keymap +++ b/app/boards/polarityworks/bt65/bt65.keymap @@ -20,7 +20,7 @@ #elif defined(HHKB) zmk,physical-layout = &layout_65_hhkb; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65.keymap" #endif }; @@ -170,7 +170,7 @@ sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; #else - #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap" + #error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65.keymap" #endif }; diff --git a/app/boards/arm/ckp/bt65_v1.yaml b/app/boards/polarityworks/bt65/bt65.yaml similarity index 88% rename from app/boards/arm/ckp/bt65_v1.yaml rename to app/boards/polarityworks/bt65/bt65.yaml index 61edacce6..52bc38ae9 100644 --- a/app/boards/arm/ckp/bt65_v1.yaml +++ b/app/boards/polarityworks/bt65/bt65.yaml @@ -1,4 +1,4 @@ -identifier: bt65_v1 +identifier: bt65 name: BT65_V1 type: mcu arch: arm diff --git a/app/boards/arm/ckp/bt65_v1.zmk.yml b/app/boards/polarityworks/bt65/bt65.zmk.yml similarity index 93% rename from app/boards/arm/ckp/bt65_v1.zmk.yml rename to app/boards/polarityworks/bt65/bt65.zmk.yml index b0be40bbb..136ace23c 100644 --- a/app/boards/arm/ckp/bt65_v1.zmk.yml +++ b/app/boards/polarityworks/bt65/bt65.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bt65_v1 +id: bt65 name: BT65 type: board arch: arm diff --git a/app/boards/arm/ckp/bt75_v1_defconfig b/app/boards/polarityworks/bt65/bt65_defconfig similarity index 82% rename from app/boards/arm/ckp/bt75_v1_defconfig rename to app/boards/polarityworks/bt65/bt65_defconfig index b4d85338a..27b0681e3 100644 --- a/app/boards/arm/ckp/bt75_v1_defconfig +++ b/app/boards/polarityworks/bt65/bt65_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT75_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,10 +28,8 @@ CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262 -CONFIG_WS2812_STRIP=y -CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/puchi_ble/pre_dt_board.cmake b/app/boards/polarityworks/bt65/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/puchi_ble/pre_dt_board.cmake rename to app/boards/polarityworks/bt65/pre_dt_board.cmake diff --git a/app/boards/polarityworks/bt75/Kconfig.bt75 b/app/boards/polarityworks/bt75/Kconfig.bt75 new file mode 100644 index 000000000..43fe295d6 --- /dev/null +++ b/app/boards/polarityworks/bt75/Kconfig.bt75 @@ -0,0 +1,10 @@ +# CKP BT75 board configuration + +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BT75 + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE diff --git a/app/boards/polarityworks/bt75/Kconfig.defconfig b/app/boards/polarityworks/bt75/Kconfig.defconfig new file mode 100644 index 000000000..ded51c247 --- /dev/null +++ b/app/boards/polarityworks/bt75/Kconfig.defconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_KEYBOARD_NAME + default "BT75" if BOARD_BT75 + +if BOARD_BT75 + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config BT_CTLR + default BT + +endif # BOARD_BT75 diff --git a/app/boards/arm/nrfmicro/board.cmake b/app/boards/polarityworks/bt75/board.cmake similarity index 100% rename from app/boards/arm/nrfmicro/board.cmake rename to app/boards/polarityworks/bt75/board.cmake diff --git a/app/boards/polarityworks/bt75/board.yml b/app/boards/polarityworks/bt75/board.yml new file mode 100644 index 000000000..d12dcb3a1 --- /dev/null +++ b/app/boards/polarityworks/bt75/board.yml @@ -0,0 +1,5 @@ +board: + name: bt75 + vendor: polarityworks + socs: + - name: nrf52840 diff --git a/app/boards/arm/ckp/bt75_v1.dts b/app/boards/polarityworks/bt75/bt75.dts similarity index 94% rename from app/boards/arm/ckp/bt75_v1.dts rename to app/boards/polarityworks/bt75/bt75.dts index 7c9ab664e..bfbef0a27 100644 --- a/app/boards/arm/ckp/bt75_v1.dts +++ b/app/boards/polarityworks/bt75/bt75.dts @@ -5,7 +5,11 @@ */ /dts-v1/; -#include "ckp.dtsi" +#include +#include + +#include "../common/ckp-base.dtsi" +#include "../common/ckp.dtsi" #include #include #include @@ -13,7 +17,7 @@ / { model = "BT75_V1"; - compatible = "polarityworks,bt75_v1"; + compatible = "polarityworks,bt75"; chosen { zmk,physical-layout = &layout_75_ansi; diff --git a/app/boards/arm/ckp/bt75_v1.keymap b/app/boards/polarityworks/bt75/bt75.keymap similarity index 99% rename from app/boards/arm/ckp/bt75_v1.keymap rename to app/boards/polarityworks/bt75/bt75.keymap index ff0db7b0c..42833cb04 100644 --- a/app/boards/arm/ckp/bt75_v1.keymap +++ b/app/boards/polarityworks/bt75/bt75.keymap @@ -17,7 +17,7 @@ #elif defined(ALL_1U) zmk,physical-layout = &layout_75_all1u; #else - #error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75_v1.keymap" + #error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75.keymap" #endif }; diff --git a/app/boards/arm/ckp/bt75_v1.yaml b/app/boards/polarityworks/bt75/bt75.yaml similarity index 88% rename from app/boards/arm/ckp/bt75_v1.yaml rename to app/boards/polarityworks/bt75/bt75.yaml index e4faa09f5..b628d81cf 100644 --- a/app/boards/arm/ckp/bt75_v1.yaml +++ b/app/boards/polarityworks/bt75/bt75.yaml @@ -1,4 +1,4 @@ -identifier: bt75_v1 +identifier: bt75 name: BT75_V1 type: mcu arch: arm diff --git a/app/boards/arm/ckp/bt75_v1.zmk.yml b/app/boards/polarityworks/bt75/bt75.zmk.yml similarity index 93% rename from app/boards/arm/ckp/bt75_v1.zmk.yml rename to app/boards/polarityworks/bt75/bt75.zmk.yml index e135abfac..d4424a4bb 100644 --- a/app/boards/arm/ckp/bt75_v1.zmk.yml +++ b/app/boards/polarityworks/bt75/bt75.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: bt75_v1 +id: bt75 name: BT75 V1 type: board arch: arm diff --git a/app/boards/arm/ckp/bt65_v1_defconfig b/app/boards/polarityworks/bt75/bt75_defconfig similarity index 82% rename from app/boards/arm/ckp/bt65_v1_defconfig rename to app/boards/polarityworks/bt75/bt75_defconfig index be5f17eb5..27b0681e3 100644 --- a/app/boards/arm/ckp/bt65_v1_defconfig +++ b/app/boards/polarityworks/bt75/bt75_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BT65_V1=y - # Enable MPU CONFIG_ARM_MPU=y @@ -32,10 +28,8 @@ CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262 -CONFIG_WS2812_STRIP=y -CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y \ No newline at end of file +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/s40nc/pre_dt_board.cmake b/app/boards/polarityworks/bt75/pre_dt_board.cmake similarity index 100% rename from app/boards/arm/s40nc/pre_dt_board.cmake rename to app/boards/polarityworks/bt75/pre_dt_board.cmake diff --git a/app/boards/polarityworks/common/ckp-base.dtsi b/app/boards/polarityworks/common/ckp-base.dtsi new file mode 100644 index 000000000..0b1d9d131 --- /dev/null +++ b/app/boards/polarityworks/common/ckp-base.dtsi @@ -0,0 +1,61 @@ +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +zephyr_udc0: &usbd { + status = "okay"; +}; + +®1 { + regulator-initial-mode = ; +}; + + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + reg = <0x00026000 0x000c6000>; + }; + + /* + * The flash starting at 0x000ec000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@ec000 { + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + reg = <0x000f4000 0x0000c000>; + }; + }; +}; + diff --git a/app/boards/arm/ckp/ckp-pinctrl.dtsi b/app/boards/polarityworks/common/ckp-pinctrl.dtsi similarity index 100% rename from app/boards/arm/ckp/ckp-pinctrl.dtsi rename to app/boards/polarityworks/common/ckp-pinctrl.dtsi diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/polarityworks/common/ckp.dtsi similarity index 78% rename from app/boards/arm/ckp/ckp.dtsi rename to app/boards/polarityworks/common/ckp.dtsi index b127cabc7..ba3374687 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/polarityworks/common/ckp.dtsi @@ -4,9 +4,6 @@ * SPDX-License-Identifier: MIT */ -/dts-v1/; -#include - #include #include @@ -119,8 +116,9 @@ }; }; -&adc { - status = "okay"; +&vbatt { + output-ohms = <100000>; + full-ohms = <(100000 + 100000)>; }; &pwm0 { @@ -130,59 +128,6 @@ pinctrl-names = "default", "sleep"; }; -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -zephyr_udc0: &usbd { - status = "okay"; -}; - - -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - sd_partition: partition@0 { - reg = <0x00000000 0x00026000>; - }; - code_partition: partition@26000 { - reg = <0x00026000 0x000c6000>; - }; - - /* - * The flash starting at 0x000ec000 and ending at - * 0x000f3fff is reserved for use by the application. - */ - - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@ec000 { - reg = <0x000ec000 0x00008000>; - }; - - boot_partition: partition@f4000 { - reg = <0x000f4000 0x0000c000>; - }; - }; -}; - &spi3 { compatible = "nordic,nrf-spim"; status = "okay"; diff --git a/app/boards/post_boards_shields.cmake b/app/boards/post_boards_shields.cmake new file mode 100644 index 000000000..3bd7eb1da --- /dev/null +++ b/app/boards/post_boards_shields.cmake @@ -0,0 +1,100 @@ +# TODO: Check for env or command line "ZMK_CONFIG" setting. +# * That directory should load +# * defconfigs, +# * .conf file, +# * single overlay, +# * or per board/shield. + +list(APPEND KEYMAP_DIRS ${BOARD_DIR}) +get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME) +# Give a shield like `kyria_rev2_left` we want to use `kyria_rev2` and `kyria` as candidate names for +# overlay/conf/keymap files. +if(DEFINED SHIELD) + list(APPEND KEYMAP_DIRS ${SHIELD_DIRS}) + foreach(s ${SHIELD_AS_LIST}) + if (DEFINED SHIELD_DIR_${s}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + list(APPEND shield_candidate_names ${shield_dir_name}) + endif() + string(REPLACE "_" ";" S_PIECES ${s}) + list(LENGTH S_PIECES S_PIECES_LEN) + while(NOT S_PIECES STREQUAL "") + list(POP_BACK S_PIECES) + list(JOIN S_PIECES "_" s_substr) + if ("${s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL "${shield_dir_name}") + break() + endif() + list(APPEND shield_candidate_names ${s_substr}) + endwhile() + endforeach() +endif() + +if (ZMK_CONFIG) + if (EXISTS ${ZMK_CONFIG}) + message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") + list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") + + if (DEFINED SHIELD) + foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) + if (DEFINED ${SHIELD_DIR_${s}}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + endif() + list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}.overlay") + if (NOT "${shield_dir_name}" STREQUAL "${s}") + list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}_${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}.conf") + endif() + list(APPEND config_candidates "${ZMK_CONFIG}/${s}_${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${s}.conf") + endforeach() + endif() + + # TODO: Board revisions? + list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/default.overlay") + list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/default.conf") + + foreach(overlay ${overlay_candidates}) + if (EXISTS "${overlay}") + message(STATUS "ZMK Config devicetree overlay: ${overlay}") + list(APPEND shield_dts_files "${overlay}") + break() + endif() + endforeach() + + foreach(conf ${config_candidates}) + if (EXISTS "${conf}") + message(STATUS "ZMK Config Kconfig: ${conf}") + list(APPEND shield_conf_files "${conf}") + endif() + endforeach() + else() + message(WARNING "Unable to locate ZMK config at: ${ZMK_CONFIG}") + endif() +endif() + + +if(NOT KEYMAP_FILE) + message("${NORMALIZED_BOARD_TARGET} for ${NORMALIZED_BOARD_QUALIFIERS} for ${BOARD} with version ${BOARD_REVISION}") + foreach(keymap_dir ${KEYMAP_DIRS}) + foreach(keymap_prefix ${shield_candidate_names} ${SHIELD_AS_LIST} ${SHIELD_DIR} "${BOARD}_${BOARD_REVISION_STRING}" ${BOARD} ${BOARD_DIR_NAME}) + if (EXISTS ${keymap_dir}/${keymap_prefix}.keymap) + set(KEYMAP_FILE "${keymap_dir}/${keymap_prefix}.keymap" CACHE STRING "Selected keymap file") + message(STATUS "Using keymap file: ${KEYMAP_FILE}") + set(EXTRA_DTC_OVERLAY_FILE ${KEYMAP_FILE}) + break() + endif() + endforeach() + endforeach() +else() + message(STATUS "Using keymap file: ${KEYMAP_FILE}") + set(EXTRA_DTC_OVERLAY_FILE ${KEYMAP_FILE}) +endif() + +if (NOT KEYMAP_FILE) + message(WARNING "Failed to locate keymap file!") +endif() diff --git a/app/boards/qmk/proton_c/Kconfig.proton_c b/app/boards/qmk/proton_c/Kconfig.proton_c new file mode 100644 index 000000000..ba5edaf8f --- /dev/null +++ b/app/boards/qmk/proton_c/Kconfig.proton_c @@ -0,0 +1,5 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PROTON_C + select SOC_STM32F303XC diff --git a/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi b/app/boards/qmk/proton_c/arduino_pro_micro_pins.dtsi similarity index 100% rename from app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi rename to app/boards/qmk/proton_c/arduino_pro_micro_pins.dtsi diff --git a/app/boards/arm/dz60rgb/board.cmake b/app/boards/qmk/proton_c/board.cmake similarity index 100% rename from app/boards/arm/dz60rgb/board.cmake rename to app/boards/qmk/proton_c/board.cmake diff --git a/app/boards/qmk/proton_c/board.yml b/app/boards/qmk/proton_c/board.yml new file mode 100644 index 000000000..54ecb64bb --- /dev/null +++ b/app/boards/qmk/proton_c/board.yml @@ -0,0 +1,5 @@ +board: + name: proton_c + vendor: qmk + socs: + - name: stm32f303xc diff --git a/app/boards/arm/proton_c/proton_c.dts b/app/boards/qmk/proton_c/proton_c.dts similarity index 100% rename from app/boards/arm/proton_c/proton_c.dts rename to app/boards/qmk/proton_c/proton_c.dts diff --git a/app/boards/arm/proton_c/proton_c.yaml b/app/boards/qmk/proton_c/proton_c.yaml similarity index 100% rename from app/boards/arm/proton_c/proton_c.yaml rename to app/boards/qmk/proton_c/proton_c.yaml diff --git a/app/boards/arm/proton_c/proton_c.zmk.yml b/app/boards/qmk/proton_c/proton_c.zmk.yml similarity index 100% rename from app/boards/arm/proton_c/proton_c.zmk.yml rename to app/boards/qmk/proton_c/proton_c.zmk.yml diff --git a/app/boards/arm/proton_c/proton_c_defconfig b/app/boards/qmk/proton_c/proton_c_defconfig similarity index 82% rename from app/boards/arm/proton_c/proton_c_defconfig rename to app/boards/qmk/proton_c/proton_c_defconfig index c552bf15d..f7abf0123 100644 --- a/app/boards/arm/proton_c/proton_c_defconfig +++ b/app/boards/qmk/proton_c/proton_c_defconfig @@ -1,7 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_STM32F3X=y -CONFIG_SOC_STM32F303XC=y # 72MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 diff --git a/app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml b/app/boards/seeed/seeeduino_xiao/seeeduino_xiao.zmk.yml similarity index 100% rename from app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml rename to app/boards/seeed/seeeduino_xiao/seeeduino_xiao.zmk.yml diff --git a/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml b/app/boards/seeed/xiao_ble/xiao_ble.zmk.yml similarity index 87% rename from app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml rename to app/boards/seeed/xiao_ble/xiao_ble.zmk.yml index 55bbe5932..270d80906 100644 --- a/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml +++ b/app/boards/seeed/xiao_ble/xiao_ble.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: seeeduino_xiao_ble +id: xiao_ble name: Seeed Studio XIAO nRF52840 type: board arch: arm diff --git a/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml b/app/boards/seeed/xiao_rp2040/xiao_rp2040.zmk.yml similarity index 85% rename from app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml rename to app/boards/seeed/xiao_rp2040/xiao_rp2040.zmk.yml index 1260a9928..ea6f04f30 100644 --- a/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml +++ b/app/boards/seeed/xiao_rp2040/xiao_rp2040.zmk.yml @@ -1,5 +1,5 @@ file_format: "1" -id: seeeduino_xiao_rp2040 +id: xiao_rp2040 name: Seeed Studio XIAO RP2040 type: board arch: arm diff --git a/app/boards/shields/chalice/boards/nice_nano_v2.overlay b/app/boards/shields/chalice/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/chalice/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/chalice/chalice.conf b/app/boards/shields/chalice/chalice.conf index da6422568..6ca70f41b 100644 --- a/app/boards/shields/chalice/chalice.conf +++ b/app/boards/shields/chalice/chalice.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/corne/boards/nice_nano_v2.overlay b/app/boards/shields/corne/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/corne/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/corne/corne.conf b/app/boards/shields/corne/corne.conf index 974243c8a..b10586ccf 100644 --- a/app/boards/shields/corne/corne.conf +++ b/app/boards/shields/corne/corne.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Corne RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Corne OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/elephant42/elephant42.conf b/app/boards/shields/elephant42/elephant42.conf index 1b41763fa..3a123f340 100644 --- a/app/boards/shields/elephant42/elephant42.conf +++ b/app/boards/shields/elephant42/elephant42.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Elephant42 RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Elephant42 OLED Display -# CONFIG_ZMK_DISPLAY=y \ No newline at end of file +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/eternal_keypad/eternal_keypad.conf b/app/boards/shields/eternal_keypad/eternal_keypad.conf index 65fa29551..5f7c33bc2 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad.conf +++ b/app/boards/shields/eternal_keypad/eternal_keypad.conf @@ -6,4 +6,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/helix/boards/nice_nano_v2.overlay b/app/boards/shields/helix/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/helix/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/helix/helix.conf b/app/boards/shields/helix/helix.conf index a8e57338d..d8cb2f2e4 100644 --- a/app/boards/shields/helix/helix.conf +++ b/app/boards/shields/helix/helix.conf @@ -3,4 +3,3 @@ # Enables RGB functionality (Uncomment lines below to enable.) # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/jorne/boards/nice_nano_v2.overlay b/app/boards/shields/jorne/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/jorne/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/jorne/jorne.conf b/app/boards/shields/jorne/jorne.conf index c4e62fc0c..c94389a24 100644 --- a/app/boards/shields/jorne/jorne.conf +++ b/app/boards/shields/jorne/jorne.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Jorne RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Jorne OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/knob_goblin/knob_goblin.conf b/app/boards/shields/knob_goblin/knob_goblin.conf index 2eefae4d9..23673a476 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.conf +++ b/app/boards/shields/knob_goblin/knob_goblin.conf @@ -6,4 +6,4 @@ CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment the following line to enable the Knob Goblin OLED Display -CONFIG_ZMK_DISPLAY=y +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/kyria/boards/nice_nano_v2.overlay b/app/boards/shields/kyria/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/kyria/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/kyria/kyria.conf b/app/boards/shields/kyria/kyria.conf index 7a0b5b6c5..bb2b843dd 100644 --- a/app/boards/shields/kyria/kyria.conf +++ b/app/boards/shields/kyria/kyria.conf @@ -7,4 +7,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/kyria/kyria_rev2.conf b/app/boards/shields/kyria/kyria_rev2.conf index 7a0b5b6c5..bb2b843dd 100644 --- a/app/boards/shields/kyria/kyria_rev2.conf +++ b/app/boards/shields/kyria/kyria_rev2.conf @@ -7,4 +7,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/kyria/kyria_rev3.conf b/app/boards/shields/kyria/kyria_rev3.conf index 7a0b5b6c5..bb2b843dd 100644 --- a/app/boards/shields/kyria/kyria_rev3.conf +++ b/app/boards/shields/kyria/kyria_rev3.conf @@ -7,4 +7,3 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/leeloo/README.md b/app/boards/shields/leeloo/README.md index 27d5e872b..c9c189b0f 100644 --- a/app/boards/shields/leeloo/README.md +++ b/app/boards/shields/leeloo/README.md @@ -47,29 +47,29 @@ Development Environment: [Basic Setup](https://zmk.dev/docs/development/setup) Build commands for the default keymap of Leeloo v1: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_left +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_right ``` Build commands for the default keymap of Leeloo v2: ``` -west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right +west build -d build/left_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_left +west build -d build/right_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_right ``` Build commands for your custom keymap of Leeloo v1: ``` -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" ``` Build commands for your custom keymap of Leeloo v2: ``` -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" -west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" +west build -d build/right_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" +west build -d build/left_v2 -p -b nice_nano -- -DSHIELD=leeloo_rev2_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" ``` ## Building Leeloo's ZMK Firmware with nice!view Displays @@ -101,22 +101,22 @@ Save your changes and close the file. Build commands for the default keymap of Leeloo v1: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_left nice_view_adapter nice_view" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_right nice_view_adapter nice_view" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_left nice_view_adapter nice_view" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_right nice_view_adapter nice_view" ``` Build commands for the default keymap of Leeloo v2: ``` -west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" +west build -d build/left_v2 -p -b nice_nano -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" +west build -d build/right_v2 -p -b nice_nano -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" ``` Build commands for your custom keymap of Leeloo v2: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" ``` # Support diff --git a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo/boards/nice_nano_v2.overlay deleted file mode 100644 index e95fac9dc..000000000 --- a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <37>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2.conf b/app/boards/shields/leeloo/leeloo_rev2.conf index 8c1cf3eed..35b12c2d3 100644 --- a/app/boards/shields/leeloo/leeloo_rev2.conf +++ b/app/boards/shields/leeloo/leeloo_rev2.conf @@ -14,9 +14,6 @@ # Uncomment the following line to enable per-key lighting # CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -# CONFIG_WS2812_STRIP=y - # Keep OLED or nice!view Displays on even when toggling off LEDs # Change to y if you wish to toggle Displays on and off with LEDs # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n @@ -40,4 +37,4 @@ # Uncomment if you are experiencing connectivity issues; this # configuration item boosts the BLE transmit power. -# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y \ No newline at end of file +# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/app/boards/shields/leeloo_micro/README.md b/app/boards/shields/leeloo_micro/README.md index c1827f82b..3471a35bb 100644 --- a/app/boards/shields/leeloo_micro/README.md +++ b/app/boards/shields/leeloo_micro/README.md @@ -30,15 +30,15 @@ Development Environment: [Basic Setup](https://zmk.dev/docs/development/setup) Build commands for the default keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_micro_left +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_micro_right ``` Build commands for your custom keymap of Leeloo-Micro: ``` -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" +west build -d build/right -p -b nice_nano -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" +west build -d build/left -p -b nice_nano -- -DSHIELD=leeloo_micro_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" ``` ## Building Leeloo-Micro's ZMK Firmware with nice!view Displays @@ -70,15 +70,15 @@ Save your changes and close the file. Build commands for the default keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" ``` Build commands for your custom keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +west build -d build/left -p -b nice_nano -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +west build -d build/right -p -b nice_nano -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" ``` # Support diff --git a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay deleted file mode 100644 index ba29cb2c0..000000000 --- a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <20>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.conf b/app/boards/shields/leeloo_micro/leeloo_micro.conf index 02c1d6058..deba268a8 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.conf +++ b/app/boards/shields/leeloo_micro/leeloo_micro.conf @@ -14,9 +14,6 @@ # Uncomment the following line to enable per-key lighting # CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -# CONFIG_WS2812_STRIP=y - # Keep OLED or nice!view Displays on even when toggling off LEDs # Change to y if you wish to toggle Displays on and off with LEDs # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n @@ -35,4 +32,4 @@ # Uncomment these two lines to add support for encoders # CONFIG_EC11=y -# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/lily58/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/lily58/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/microdox/boards/nice_nano_v2.overlay b/app/boards/shields/microdox/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/microdox/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/microdox/microdox.conf b/app/boards/shields/microdox/microdox.conf index 0d38398c0..b5df29aad 100644 --- a/app/boards/shields/microdox/microdox.conf +++ b/app/boards/shields/microdox/microdox.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Microdox RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Microdox OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/microdox/microdox_v2.conf b/app/boards/shields/microdox/microdox_v2.conf index 0d38398c0..b5df29aad 100644 --- a/app/boards/shields/microdox/microdox_v2.conf +++ b/app/boards/shields/microdox/microdox_v2.conf @@ -1,6 +1,5 @@ # Uncomment the following lines to enable the Microdox RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to enable the Microdox OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/murphpad/Kconfig.defconfig b/app/boards/shields/murphpad/Kconfig.defconfig index 3d9685843..9d80a1393 100644 --- a/app/boards/shields/murphpad/Kconfig.defconfig +++ b/app/boards/shields/murphpad/Kconfig.defconfig @@ -6,9 +6,6 @@ if SHIELD_MURPHPAD config ZMK_KEYBOARD_NAME default "MurphPad" -config ZMK_DISPLAY - default y - if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay deleted file mode 100644 index 21bb17b00..000000000 --- a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <8>; /* number of SMD LED footprints on PCB */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/murphpad/murphpad.conf b/app/boards/shields/murphpad/murphpad.conf index e9236917e..c954a946c 100644 --- a/app/boards/shields/murphpad/murphpad.conf +++ b/app/boards/shields/murphpad/murphpad.conf @@ -6,10 +6,9 @@ CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y -# Uncomment to disable OLED -#CONFIG_ZMK_DISPLAY=n +# Uncomment to enable OLED +#CONFIG_ZMK_DISPLAY=y # Uncomment both to enable underglow # Note that this will only work if an implementation exists for your board; check under the shield folder for board-specific overlays. #CONFIG_ZMK_RGB_UNDERGLOW=y -#CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/nibble/README.md b/app/boards/shields/nibble/README.md index 42646f970..a6d2add57 100644 --- a/app/boards/shields/nibble/README.md +++ b/app/boards/shields/nibble/README.md @@ -8,7 +8,6 @@ If you built your nibble without the LEDs _and_ are using a nice!nano board, you ``` CONFIG_ZMK_RGB_UNDERGLOW=n -CONFIG_WS2812_STRIP=n ``` ## Encoder Notes diff --git a/app/boards/shields/nibble/boards/nice_nano.conf b/app/boards/shields/nibble/boards/nice_nano.conf index 14bed3d0f..d1b76b841 100644 --- a/app/boards/shields/nibble/boards/nice_nano.conf +++ b/app/boards/shields/nibble/boards/nice_nano.conf @@ -1,4 +1,2 @@ # Enable underglow CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/nibble/boards/nice_nano_v2.overlay b/app/boards/shields/nibble/boards/nice_nano_v2.overlay deleted file mode 100644 index 3849a8fb1..000000000 --- a/app/boards/shields/nibble/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/nice_view/Kconfig.defconfig b/app/boards/shields/nice_view/Kconfig.defconfig index c31cec89f..57126edfc 100644 --- a/app/boards/shields/nice_view/Kconfig.defconfig +++ b/app/boards/shields/nice_view/Kconfig.defconfig @@ -25,7 +25,7 @@ choice ZMK_DISPLAY_STATUS_SCREEN endchoice config LV_Z_MEM_POOL_SIZE - default 4096 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM + default 8192 if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM imply NICE_VIEW_WIDGET_STATUS @@ -33,7 +33,7 @@ config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM config NICE_VIEW_WIDGET_STATUS bool "Custom nice!view status widget" select LV_FONT_MONTSERRAT_16 - select LV_USE_IMG + select LV_USE_IMAGE select LV_USE_CANVAS config NICE_VIEW_WIDGET_INVERTED diff --git a/app/boards/shields/nice_view/nice_view.conf b/app/boards/shields/nice_view/nice_view.conf index e6f9158f1..51408bb3d 100644 --- a/app/boards/shields/nice_view/nice_view.conf +++ b/app/boards/shields/nice_view/nice_view.conf @@ -2,3 +2,4 @@ CONFIG_ZMK_DISPLAY=y # Disable idle blanking CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=n +CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096 diff --git a/app/boards/shields/nice_view/widgets/art.c b/app/boards/shields/nice_view/widgets/art.c index 56c891462..c91af376b 100644 --- a/app/boards/shields/nice_view/widgets/art.c +++ b/app/boards/shields/nice_view/widgets/art.c @@ -111,9 +111,8 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BALLOON u }; const lv_img_dsc_t balloon = { - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .header.always_zero = 0, - .header.reserved = 0, + .header.cf = LV_COLOR_FORMAT_I1, + .header.w = 140, .header.h = 68, .data_size = 1232, @@ -219,9 +218,8 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MOUNTAIN }; const lv_img_dsc_t mountain = { - .header.cf = LV_IMG_CF_INDEXED_1BIT, - .header.always_zero = 0, - .header.reserved = 0, + .header.cf = LV_COLOR_FORMAT_I1, + .header.w = 140, .header.h = 68, .data_size = 1232, diff --git a/app/boards/shields/nice_view/widgets/bolt.c b/app/boards/shields/nice_view/widgets/bolt.c index 74dcc2b00..bb5c5aa13 100644 --- a/app/boards/shields/nice_view/widgets/bolt.c +++ b/app/boards/shields/nice_view/widgets/bolt.c @@ -35,9 +35,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BOLT uint }; const lv_img_dsc_t bolt = { - .header.cf = LV_IMG_CF_INDEXED_2BIT, - .header.always_zero = 0, - .header.reserved = 0, + .header.cf = LV_COLOR_FORMAT_I2, .header.w = 11, .header.h = 18, .data_size = 70, diff --git a/app/boards/shields/nice_view/widgets/peripheral_status.c b/app/boards/shields/nice_view/widgets/peripheral_status.c index e9002b33e..40c338d30 100644 --- a/app/boards/shields/nice_view/widgets/peripheral_status.c +++ b/app/boards/shields/nice_view/widgets/peripheral_status.c @@ -41,17 +41,17 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); // Draw battery draw_battery(canvas, state); // Draw output status - lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, - state->connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); + canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, + state->connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } static void set_battery_status(struct zmk_widget_status *widget, @@ -112,11 +112,11 @@ int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) { lv_obj_set_size(widget->obj, 160, 68); lv_obj_t *top = lv_canvas_create(widget->obj); lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0); - lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); lv_obj_t *art = lv_img_create(widget->obj); bool random = sys_rand32_get() & 1; - lv_img_set_src(art, random ? &balloon : &mountain); + lv_image_set_src(art, random ? &balloon : &mountain); lv_obj_align(art, LV_ALIGN_TOP_LEFT, 0, 0); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c index 9769f4d7b..601ff546e 100644 --- a/app/boards/shields/nice_view/widgets/status.c +++ b/app/boards/shields/nice_view/widgets/status.c @@ -46,7 +46,7 @@ struct wpm_status_state { uint8_t wpm; }; -static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { +static void draw_top(lv_obj_t *widget, const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 0); lv_draw_label_dsc_t label_dsc; @@ -61,7 +61,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st init_line_dsc(&line_dsc, LVGL_FOREGROUND, 1); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); // Draw battery draw_battery(canvas, state); @@ -86,15 +86,15 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st break; } - lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, output_text); + canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, output_text); // Draw WPM - lv_canvas_draw_rect(canvas, 0, 21, 68, 42, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc); + canvas_draw_rect(canvas, 0, 21, 68, 42, &rect_white_dsc); + canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc); char wpm_text[6] = {}; snprintf(wpm_text, sizeof(wpm_text), "%d", state->wpm[9]); - lv_canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text); + canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text); int max = 0; int min = 256; @@ -118,13 +118,13 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_st points[i].x = 2 + i * 7; points[i].y = 60 - (state->wpm[i] - min) * 36 / range; } - lv_canvas_draw_line(canvas, points, 10, &line_dsc); + canvas_draw_line(canvas, points, 10, &line_dsc); // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } -static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { +static void draw_middle(lv_obj_t *widget, const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 1); lv_draw_rect_dsc_t rect_black_dsc; @@ -141,7 +141,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status init_label_dsc(&label_dsc_black, LVGL_BACKGROUND, &lv_font_montserrat_18, LV_TEXT_ALIGN_CENTER); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); // Draw circles int circle_offsets[NICEVIEW_PROFILE_COUNT][2] = { @@ -152,33 +152,33 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status bool selected = i == state->active_profile_index; if (state->profiles_connected[i]) { - lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 360, - &arc_dsc); + canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 360, + &arc_dsc); } else if (state->profiles_bonded[i]) { const int segments = 8; const int gap = 20; for (int j = 0; j < segments; ++j) - lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, - 360. / segments * j + gap / 2.0, - 360. / segments * (j + 1) - gap / 2.0, &arc_dsc); + canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, + 360. / segments * j + gap / 2.0, + 360. / segments * (j + 1) - gap / 2.0, &arc_dsc); } if (selected) { - lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 9, 0, 359, - &arc_dsc_filled); + canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 9, 0, 359, + &arc_dsc_filled); } char label[2]; snprintf(label, sizeof(label), "%d", i + 1); - lv_canvas_draw_text(canvas, circle_offsets[i][0] - 8, circle_offsets[i][1] - 10, 16, - (selected ? &label_dsc_black : &label_dsc), label); + canvas_draw_text(canvas, circle_offsets[i][0] - 8, circle_offsets[i][1] - 10, 16, + (selected ? &label_dsc_black : &label_dsc), label); } // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } -static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { +static void draw_bottom(lv_obj_t *widget, const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 2); lv_draw_rect_dsc_t rect_black_dsc; @@ -187,7 +187,7 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status init_label_dsc(&label_dsc, LVGL_FOREGROUND, &lv_font_montserrat_14, LV_TEXT_ALIGN_CENTER); // Fill background - lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); // Draw layer if (state->layer_label == NULL || strlen(state->layer_label) == 0) { @@ -195,13 +195,13 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status sprintf(text, "LAYER %i", state->layer_index); - lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text); + canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text); } else { - lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state->layer_label); + canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state->layer_label); } // Rotate canvas - rotate_canvas(canvas, cbuf); + rotate_canvas(canvas); } static void set_battery_status(struct zmk_widget_status *widget, @@ -212,7 +212,7 @@ static void set_battery_status(struct zmk_widget_status *widget, widget->state.battery = state.level; - draw_top(widget->obj, widget->cbuf, &widget->state); + draw_top(widget->obj, &widget->state); } static void battery_status_update_cb(struct battery_status_state state) { @@ -250,8 +250,8 @@ static void set_output_status(struct zmk_widget_status *widget, widget->state.profiles_bonded[i] = state->profiles_bonded[i]; } - draw_top(widget->obj, widget->cbuf, &widget->state); - draw_middle(widget->obj, widget->cbuf2, &widget->state); + draw_top(widget->obj, &widget->state); + draw_middle(widget->obj, &widget->state); } static void output_status_update_cb(struct output_status_state state) { @@ -288,7 +288,7 @@ static void set_layer_status(struct zmk_widget_status *widget, struct layer_stat widget->state.layer_index = state.index; widget->state.layer_label = state.label; - draw_bottom(widget->obj, widget->cbuf3, &widget->state); + draw_bottom(widget->obj, &widget->state); } static void layer_status_update_cb(struct layer_status_state state) { @@ -313,7 +313,7 @@ static void set_wpm_status(struct zmk_widget_status *widget, struct wpm_status_s } widget->state.wpm[9] = state.wpm; - draw_top(widget->obj, widget->cbuf, &widget->state); + draw_top(widget->obj, &widget->state); } static void wpm_status_update_cb(struct wpm_status_state state) { @@ -334,13 +334,13 @@ int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) { lv_obj_set_size(widget->obj, 160, 68); lv_obj_t *top = lv_canvas_create(widget->obj); lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0); - lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); lv_obj_t *middle = lv_canvas_create(widget->obj); lv_obj_align(middle, LV_ALIGN_TOP_LEFT, 24, 0); - lv_canvas_set_buffer(middle, widget->cbuf2, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(middle, widget->cbuf2, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); lv_obj_t *bottom = lv_canvas_create(widget->obj); lv_obj_align(bottom, LV_ALIGN_TOP_LEFT, -44, 0); - lv_canvas_set_buffer(bottom, widget->cbuf3, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_canvas_set_buffer(bottom, widget->cbuf3, CANVAS_SIZE, CANVAS_SIZE, CANVAS_COLOR_FORMAT); sys_slist_append(&widgets, &widget->node); widget_battery_status_init(); diff --git a/app/boards/shields/nice_view/widgets/status.h b/app/boards/shields/nice_view/widgets/status.h index 53a22518d..66e41e5dc 100644 --- a/app/boards/shields/nice_view/widgets/status.h +++ b/app/boards/shields/nice_view/widgets/status.h @@ -14,9 +14,9 @@ struct zmk_widget_status { sys_snode_t node; lv_obj_t *obj; - lv_color_t cbuf[CANVAS_SIZE * CANVAS_SIZE]; - lv_color_t cbuf2[CANVAS_SIZE * CANVAS_SIZE]; - lv_color_t cbuf3[CANVAS_SIZE * CANVAS_SIZE]; + uint8_t cbuf[CANVAS_BUF_SIZE]; + uint8_t cbuf2[CANVAS_BUF_SIZE]; + uint8_t cbuf3[CANVAS_BUF_SIZE]; struct status_state state; }; diff --git a/app/boards/shields/nice_view/widgets/util.c b/app/boards/shields/nice_view/widgets/util.c index b4915ab76..90333910b 100644 --- a/app/boards/shields/nice_view/widgets/util.c +++ b/app/boards/shields/nice_view/widgets/util.c @@ -10,18 +10,14 @@ LV_IMG_DECLARE(bolt); -void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]) { - static lv_color_t cbuf_tmp[CANVAS_SIZE * CANVAS_SIZE]; - memcpy(cbuf_tmp, cbuf, sizeof(cbuf_tmp)); - lv_img_dsc_t img; - img.data = (void *)cbuf_tmp; - img.header.cf = LV_IMG_CF_TRUE_COLOR; - img.header.w = CANVAS_SIZE; - img.header.h = CANVAS_SIZE; +void rotate_canvas(lv_obj_t *canvas) { + uint8_t *buf = lv_canvas_get_draw_buf(canvas)->data; + static uint8_t buf_copy[CANVAS_BUF_SIZE]; + memcpy(buf_copy, buf, sizeof(buf_copy)); - lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); - lv_canvas_transform(canvas, &img, 900, LV_IMG_ZOOM_NONE, -1, 0, CANVAS_SIZE / 2, - CANVAS_SIZE / 2, true); + const uint32_t stride = lv_draw_buf_width_to_stride(CANVAS_SIZE, CANVAS_COLOR_FORMAT); + lv_draw_sw_rotate(buf_copy, buf, CANVAS_SIZE, CANVAS_SIZE, stride, stride, + LV_DISPLAY_ROTATION_270, CANVAS_COLOR_FORMAT); } void draw_battery(lv_obj_t *canvas, const struct status_state *state) { @@ -30,16 +26,16 @@ void draw_battery(lv_obj_t *canvas, const struct status_state *state) { lv_draw_rect_dsc_t rect_white_dsc; init_rect_dsc(&rect_white_dsc, LVGL_FOREGROUND); - lv_canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc); - lv_canvas_draw_rect(canvas, 2, 4, (state->battery + 2) / 4, 8, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc); - lv_canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc); + canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc); + canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc); + canvas_draw_rect(canvas, 2, 4, (state->battery + 2) / 4, 8, &rect_white_dsc); + canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc); + canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc); if (state->charging) { - lv_draw_img_dsc_t img_dsc; - lv_draw_img_dsc_init(&img_dsc); - lv_canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc); + lv_draw_image_dsc_t img_dsc; + lv_draw_image_dsc_init(&img_dsc); + canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc); } } @@ -67,3 +63,68 @@ void init_arc_dsc(lv_draw_arc_dsc_t *arc_dsc, lv_color_t color, uint8_t width) { arc_dsc->color = color; arc_dsc->width = width; } + +void canvas_draw_line(lv_obj_t *canvas, const lv_point_t points[], uint32_t point_cnt, + lv_draw_line_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + for (uint32_t i = 1; i < point_cnt; ++i) { + draw_dsc->p1.x = points[i - 1].x; + draw_dsc->p1.y = points[i - 1].y; + draw_dsc->p2.x = points[i].x; + draw_dsc->p2.y = points[i].y; + lv_draw_line(&layer, draw_dsc); + } + + lv_canvas_finish_layer(canvas, &layer); +} +void canvas_draw_rect(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, + lv_draw_rect_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + lv_area_t coords = {x, y, x + w - 1, y + h - 1}; + lv_draw_rect(&layer, draw_dsc, &coords); + + lv_canvas_finish_layer(canvas, &layer); +} + +void canvas_draw_arc(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, + int32_t start_angle, int32_t end_angle, lv_draw_arc_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + draw_dsc->center.x = x; + draw_dsc->center.y = y; + draw_dsc->radius = r; + draw_dsc->start_angle = start_angle; + draw_dsc->end_angle = end_angle; + lv_draw_arc(&layer, draw_dsc); + + lv_canvas_finish_layer(canvas, &layer); +} + +void canvas_draw_text(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, + lv_draw_label_dsc_t *draw_dsc, const char *txt) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + draw_dsc->text = txt; + lv_area_t coords = {x, y, x + max_w, y + CANVAS_SIZE}; + lv_draw_label(&layer, draw_dsc, &coords); + + lv_canvas_finish_layer(canvas, &layer); +} + +void canvas_draw_img(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, const lv_image_dsc_t *src, + lv_draw_image_dsc_t *draw_dsc) { + lv_layer_t layer; + lv_canvas_init_layer(canvas, &layer); + + draw_dsc->src = src; + lv_area_t coords = {x, y, x + src->header.w - 1, y + src->header.h - 1}; + lv_draw_image(&layer, draw_dsc, &coords); + + lv_canvas_finish_layer(canvas, &layer); +} \ No newline at end of file diff --git a/app/boards/shields/nice_view/widgets/util.h b/app/boards/shields/nice_view/widgets/util.h index 686e5af27..183d0ec34 100644 --- a/app/boards/shields/nice_view/widgets/util.h +++ b/app/boards/shields/nice_view/widgets/util.h @@ -11,6 +11,10 @@ #define NICEVIEW_PROFILE_COUNT 5 #define CANVAS_SIZE 68 +#define CANVAS_COLOR_FORMAT LV_COLOR_FORMAT_L8 // smallest type supported by sw_rotate +#define CANVAS_BUF_SIZE \ + LV_CANVAS_BUF_SIZE(CANVAS_SIZE, CANVAS_SIZE, LV_COLOR_FORMAT_GET_BPP(CANVAS_COLOR_FORMAT), \ + LV_DRAW_BUF_STRIDE_ALIGN) #define LVGL_BACKGROUND \ IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_INVERTED) ? lv_color_black() : lv_color_white() @@ -42,10 +46,21 @@ struct battery_status_state { #endif }; -void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]); +void rotate_canvas(lv_obj_t *canvas); void draw_battery(lv_obj_t *canvas, const struct status_state *state); void init_label_dsc(lv_draw_label_dsc_t *label_dsc, lv_color_t color, const lv_font_t *font, lv_text_align_t align); void init_rect_dsc(lv_draw_rect_dsc_t *rect_dsc, lv_color_t bg_color); void init_line_dsc(lv_draw_line_dsc_t *line_dsc, lv_color_t color, uint8_t width); void init_arc_dsc(lv_draw_arc_dsc_t *arc_dsc, lv_color_t color, uint8_t width); + +void canvas_draw_line(lv_obj_t *canvas, const lv_point_t points[], uint32_t point_cnt, + lv_draw_line_dsc_t *draw_dsc); +void canvas_draw_rect(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, + lv_draw_rect_dsc_t *draw_dsc); +void canvas_draw_arc(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, + int32_t start_angle, int32_t end_angle, lv_draw_arc_dsc_t *draw_dsc); +void canvas_draw_text(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, + lv_draw_label_dsc_t *draw_dsc, const char *txt); +void canvas_draw_img(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, const lv_image_dsc_t *src, + lv_draw_image_dsc_t *draw_dsc); diff --git a/app/boards/shields/nice_view_adapter/README.md b/app/boards/shields/nice_view_adapter/README.md index fe0a6f076..19812931c 100644 --- a/app/boards/shields/nice_view_adapter/README.md +++ b/app/boards/shields/nice_view_adapter/README.md @@ -7,5 +7,5 @@ To use this shield, you should add this shield to your list of shields _before_ The nice!view will use the SDA/SCL pins of the OLED, and then the adapter expects a final pin to be "bodged" from your microcontroller to the nice!view CS pin. This adapter assumes that the CS pin bodged is the `&pro_micro 1` pin or "D1", which is the top left pin when looking at the front of the board. If you can't use this pin, you'll need to override the `cs-gpios` for the `&nice_view_spi` bus (in your `zmk-config` keymap for example) or you will want to define your own `&nice_view_spi` bus without using this adapter. ``` -west build -b nice_nano_v2 -- -DSHIELD="lily58_left nice_view_adapter nice_view" +west build -b nice_nano -- -DSHIELD="lily58_left nice_view_adapter nice_view" ``` diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay deleted file mode 100644 index 45ba34ded..000000000 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -&pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; -}; - -nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; -}; - -&pro_micro_i2c { - status = "disabled"; -}; diff --git a/app/boards/shields/redox/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/redox/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/redox/redox.conf b/app/boards/shields/redox/redox.conf index a1837ef9f..25d3e6c40 100644 --- a/app/boards/shields/redox/redox.conf +++ b/app/boards/shields/redox/redox.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable the Redox RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay deleted file mode 100644 index d14b95db7..000000000 --- a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,47 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <9>; /* number of LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung34/reviung34.conf b/app/boards/shields/reviung34/reviung34.conf index 289f070ba..6ca70f41b 100644 --- a/app/boards/shields/reviung34/reviung34.conf +++ b/app/boards/shields/reviung34/reviung34.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay deleted file mode 100644 index 591800642..000000000 --- a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <11>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung41/reviung41.conf b/app/boards/shields/reviung41/reviung41.conf index 289f070ba..6ca70f41b 100644 --- a/app/boards/shields/reviung41/reviung41.conf +++ b/app/boards/shields/reviung41/reviung41.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung5/boards/nice_nano_v2.overlay b/app/boards/shields/reviung5/boards/nice_nano_v2.overlay deleted file mode 100644 index 540e345a0..000000000 --- a/app/boards/shields/reviung5/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2024 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <4>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung5/reviung5.conf b/app/boards/shields/reviung5/reviung5.conf index d5d38739f..78ebd1d1e 100644 --- a/app/boards/shields/reviung5/reviung5.conf +++ b/app/boards/shields/reviung5/reviung5.conf @@ -4,4 +4,3 @@ # Uncomment the following two lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay b/app/boards/shields/reviung53/boards/nice_nano_v2.overlay deleted file mode 100644 index 24905ac2e..000000000 --- a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/reviung53/reviung53.conf b/app/boards/shields/reviung53/reviung53.conf index 289f070ba..6ca70f41b 100644 --- a/app/boards/shields/reviung53/reviung53.conf +++ b/app/boards/shields/reviung53/reviung53.conf @@ -1,3 +1,2 @@ # Uncomment the following lines to enable RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/snap/boards/nice_nano_v2.overlay b/app/boards/shields/snap/boards/nice_nano_v2.overlay deleted file mode 100644 index 924151c71..000000000 --- a/app/boards/shields/snap/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/snap/snap.conf b/app/boards/shields/snap/snap.conf index e76bccb48..64c7602b4 100644 --- a/app/boards/shields/snap/snap.conf +++ b/app/boards/shields/snap/snap.conf @@ -12,6 +12,5 @@ # Uncomment the following lines to enable the RGB underglow # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=5 -# CONFIG_ZMK_RGB_UNDERGLOW_SPD_START=1 \ No newline at end of file +# CONFIG_ZMK_RGB_UNDERGLOW_SPD_START=1 diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 4eb3d743b..767ea35a4 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -43,10 +43,4 @@ endchoice endif # LVGL -if ZMK_RGB_UNDERGLOW - -config WS2812_STRIP - default y -endif - endif diff --git a/app/boards/shields/sofle/boards/nice_nano_v2.overlay b/app/boards/shields/sofle/boards/nice_nano_v2.overlay deleted file mode 100644 index f00f59f43..000000000 --- a/app/boards/shields/sofle/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,50 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <36>; /* 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; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig index d3ac6c77e..addfb8d13 100644 --- a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig @@ -16,10 +16,6 @@ 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 diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig index df32b83b2..d9bb0eac2 100644 --- a/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_HELIX_LEFT || SHIELD_SPLITKB_AURORA_HELIX_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay deleted file mode 100644 index 8228d530c..000000000 --- a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,45 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <6>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig index 861db44f0..9edcf3464 100644 --- a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_LILY58_LEFT || SHIELD_SPLITKB_AURORA_LILY58_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_DISPLAY if ZMK_DISPLAY diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay deleted file mode 100644 index 084522660..000000000 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,45 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <5>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig index 172548e87..603c35c7a 100644 --- a/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay deleted file mode 100644 index 8228d530c..000000000 --- a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,45 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <6>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig index 6a0e37286..c84cf94cd 100644 --- a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig @@ -16,10 +16,6 @@ if SHIELD_SPLITKB_AURORA_SWEEP_LEFT || SHIELD_SPLITKB_AURORA_SWEEP_RIGHT config ZMK_SPLIT default y -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_DISPLAY if ZMK_DISPLAY diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617b2..000000000 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/tg4x/boards/nice_nano.conf b/app/boards/shields/tg4x/boards/nice_nano.conf index 7b0779480..c93ed4de8 100644 --- a/app/boards/shields/tg4x/boards/nice_nano.conf +++ b/app/boards/shields/tg4x/boards/nice_nano.conf @@ -3,5 +3,3 @@ # Enable underglow CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay deleted file mode 100644 index 844418999..000000000 --- a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay deleted file mode 100644 index b08954339..000000000 --- a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/tidbit/tidbit.conf b/app/boards/shields/tidbit/tidbit.conf index 82bd3477e..bb2d0d9a8 100644 --- a/app/boards/shields/tidbit/tidbit.conf +++ b/app/boards/shields/tidbit/tidbit.conf @@ -7,8 +7,6 @@ CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment to enable underglow #CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -#CONFIG_WS2812_STRIP=y # Uncomment to enable the display # Note that an I2C OLED cannot be used at the same time as encoder 3. diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay deleted file mode 100644 index b08954339..000000000 --- a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/app/boards/shields/two_percent_milk/two_percent_milk.conf b/app/boards/shields/two_percent_milk/two_percent_milk.conf index 4baccacfd..077ebcf6b 100644 --- a/app/boards/shields/two_percent_milk/two_percent_milk.conf +++ b/app/boards/shields/two_percent_milk/two_percent_milk.conf @@ -3,7 +3,6 @@ # Uncomment the following lines to enable RGB Underglow # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y # Uncomment the following line to turn on logging, and set ZMK logging to debug output -# CONFIG_ZMK_USB_LOGGING=y \ No newline at end of file +# CONFIG_ZMK_USB_LOGGING=y diff --git a/app/boards/shields/zmk_uno/Kconfig.defconfig b/app/boards/shields/zmk_uno/Kconfig.defconfig index 95602ca73..9898a6e68 100644 --- a/app/boards/shields/zmk_uno/Kconfig.defconfig +++ b/app/boards/shields/zmk_uno/Kconfig.defconfig @@ -16,10 +16,6 @@ config SHIELD_SSD1306_128X64 config SHIELD_SSD1306_128X32 select ZMK_DISPLAY -config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI - config ZMK_PM_SOFT_OFF default y if BOARD_NRF52840DK_NRF52840 diff --git a/app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml b/app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml similarity index 100% rename from app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml rename to app/boards/sparkfun/pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml diff --git a/app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml b/app/boards/weact/blackpill_f401cc/blackpill_f401cc.zmk.yml similarity index 100% rename from app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml rename to app/boards/weact/blackpill_f401cc/blackpill_f401cc.zmk.yml diff --git a/app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml b/app/boards/weact/blackpill_f401ce/blackpill_f401ce.zmk.yml similarity index 100% rename from app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml rename to app/boards/weact/blackpill_f401ce/blackpill_f401ce.zmk.yml diff --git a/app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml b/app/boards/weact/blackpill_f411ce/blackpill_f411ce.zmk.yml similarity index 100% rename from app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml rename to app/boards/weact/blackpill_f411ce/blackpill_f411ce.zmk.yml diff --git a/app/boards/arm/puchi_ble/CMakeLists.txt b/app/boards/zhiayang/mikoto/CMakeLists.txt similarity index 100% rename from app/boards/arm/puchi_ble/CMakeLists.txt rename to app/boards/zhiayang/mikoto/CMakeLists.txt diff --git a/app/boards/arm/mikoto/Kconfig b/app/boards/zhiayang/mikoto/Kconfig similarity index 74% rename from app/boards/arm/mikoto/Kconfig rename to app/boards/zhiayang/mikoto/Kconfig index b40fdcff5..0313f68b1 100644 --- a/app/boards/arm/mikoto/Kconfig +++ b/app/boards/zhiayang/mikoto/Kconfig @@ -1,15 +1,3 @@ -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_MIKOTO) - -config BOARD_ENABLE_DCDC_HV - bool "High voltage DCDC converter" - select SOC_DCDC_NRF52X_HV - default n - depends on (BOARD_MIKOTO) - choice BOARD_MIKOTO_CHARGER_CURRENT prompt "Charge current to supply to attached batteries" depends on (BOARD_MIKOTO) diff --git a/app/boards/arm/mikoto/Kconfig.defconfig b/app/boards/zhiayang/mikoto/Kconfig.defconfig similarity index 91% rename from app/boards/arm/mikoto/Kconfig.defconfig rename to app/boards/zhiayang/mikoto/Kconfig.defconfig index 0710f6fde..ec6ee532d 100644 --- a/app/boards/arm/mikoto/Kconfig.defconfig +++ b/app/boards/zhiayang/mikoto/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_MIKOTO -config BOARD - default "mikoto" - if USB config USB_NRFX diff --git a/app/boards/zhiayang/mikoto/Kconfig.mikoto b/app/boards/zhiayang/mikoto/Kconfig.mikoto new file mode 100644 index 000000000..69ca49c0e --- /dev/null +++ b/app/boards/zhiayang/mikoto/Kconfig.mikoto @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_MIKOTO + select SOC_NRF52840_QIAA + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE + imply I2C if BOARD_REVISION="7.2.0" diff --git a/app/boards/arm/mikoto/arduino_pro_micro_pins_v5.dtsi b/app/boards/zhiayang/mikoto/arduino_pro_micro_pins_v5.dtsi similarity index 100% rename from app/boards/arm/mikoto/arduino_pro_micro_pins_v5.dtsi rename to app/boards/zhiayang/mikoto/arduino_pro_micro_pins_v5.dtsi diff --git a/app/boards/arm/mikoto/arduino_pro_micro_pins_v6.dtsi b/app/boards/zhiayang/mikoto/arduino_pro_micro_pins_v6.dtsi similarity index 100% rename from app/boards/arm/mikoto/arduino_pro_micro_pins_v6.dtsi rename to app/boards/zhiayang/mikoto/arduino_pro_micro_pins_v6.dtsi diff --git a/app/boards/zhiayang/mikoto/board.cmake b/app/boards/zhiayang/mikoto/board.cmake new file mode 100644 index 000000000..73fa64a9a --- /dev/null +++ b/app/boards/zhiayang/mikoto/board.cmake @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/boards/zhiayang/mikoto/board.yml b/app/boards/zhiayang/mikoto/board.yml new file mode 100644 index 000000000..d1f715576 --- /dev/null +++ b/app/boards/zhiayang/mikoto/board.yml @@ -0,0 +1,14 @@ +board: + name: mikoto + vendor: zhiayang + revision: + format: major.minor.patch + default: 5.20.0 + exact: false + revisions: + - name: 5.20.0 + - name: 6.1.0 + - name: 6.3.0 + - name: 7.2.0 + socs: + - name: nrf52840 diff --git a/app/boards/arm/mikoto/mikoto-pinctrl.dtsi b/app/boards/zhiayang/mikoto/mikoto-pinctrl.dtsi similarity index 100% rename from app/boards/arm/mikoto/mikoto-pinctrl.dtsi rename to app/boards/zhiayang/mikoto/mikoto-pinctrl.dtsi diff --git a/app/boards/arm/mikoto/mikoto.dts b/app/boards/zhiayang/mikoto/mikoto.dts similarity index 95% rename from app/boards/arm/mikoto/mikoto.dts rename to app/boards/zhiayang/mikoto/mikoto.dts index b8dca9503..c2a82a47c 100644 --- a/app/boards/arm/mikoto/mikoto.dts +++ b/app/boards/zhiayang/mikoto/mikoto.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include / { model = "mikoto"; @@ -40,6 +41,10 @@ }; }; +®1 { + regulator-initial-mode = ; +}; + &adc { status = "okay"; }; diff --git a/app/boards/arm/mikoto/mikoto.yaml b/app/boards/zhiayang/mikoto/mikoto.yaml similarity index 100% rename from app/boards/arm/mikoto/mikoto.yaml rename to app/boards/zhiayang/mikoto/mikoto.yaml diff --git a/app/boards/arm/mikoto/mikoto.zmk.yml b/app/boards/zhiayang/mikoto/mikoto.zmk.yml similarity index 100% rename from app/boards/arm/mikoto/mikoto.zmk.yml rename to app/boards/zhiayang/mikoto/mikoto.zmk.yml diff --git a/app/boards/arm/mikoto/mikoto_5_20_0.overlay b/app/boards/zhiayang/mikoto/mikoto_5_20_0.overlay similarity index 100% rename from app/boards/arm/mikoto/mikoto_5_20_0.overlay rename to app/boards/zhiayang/mikoto/mikoto_5_20_0.overlay diff --git a/app/boards/arm/mikoto/mikoto_6_1_0.overlay b/app/boards/zhiayang/mikoto/mikoto_6_1_0.overlay similarity index 100% rename from app/boards/arm/mikoto/mikoto_6_1_0.overlay rename to app/boards/zhiayang/mikoto/mikoto_6_1_0.overlay diff --git a/app/boards/arm/mikoto/mikoto_7_2_0.conf b/app/boards/zhiayang/mikoto/mikoto_7_2_0.conf similarity index 100% rename from app/boards/arm/mikoto/mikoto_7_2_0.conf rename to app/boards/zhiayang/mikoto/mikoto_7_2_0.conf diff --git a/app/boards/arm/mikoto/mikoto_7_2_0.overlay b/app/boards/zhiayang/mikoto/mikoto_7_2_0.overlay similarity index 100% rename from app/boards/arm/mikoto/mikoto_7_2_0.overlay rename to app/boards/zhiayang/mikoto/mikoto_7_2_0.overlay diff --git a/app/boards/arm/mikoto/mikoto_defconfig b/app/boards/zhiayang/mikoto/mikoto_defconfig similarity index 80% rename from app/boards/arm/mikoto/mikoto_defconfig rename to app/boards/zhiayang/mikoto/mikoto_defconfig index 4b3bc7d97..56aa9526f 100644 --- a/app/boards/arm/mikoto/mikoto_defconfig +++ b/app/boards/zhiayang/mikoto/mikoto_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: MIT -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_MIKOTO=y - # Enable MPU CONFIG_ARM_MPU=y CONFIG_PINCTRL=y diff --git a/app/boards/arm/mikoto/pinmux.c b/app/boards/zhiayang/mikoto/pinmux.c similarity index 100% rename from app/boards/arm/mikoto/pinmux.c rename to app/boards/zhiayang/mikoto/pinmux.c diff --git a/app/boards/zhiayang/mikoto/pre_dt_board.cmake b/app/boards/zhiayang/mikoto/pre_dt_board.cmake new file mode 100644 index 000000000..05b0efe5f --- /dev/null +++ b/app/boards/zhiayang/mikoto/pre_dt_board.cmake @@ -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") \ No newline at end of file diff --git a/app/core-coverage.yml b/app/core-coverage.yml index bc36495a7..6dc6a0519 100644 --- a/app/core-coverage.yml +++ b/app/core-coverage.yml @@ -1,6 +1,6 @@ board: - - nice_nano_v2 - - nrfmicro_13 + - nice_nano + - nrfmicro/nrf52840 - proton_c shield: - corne_left @@ -9,52 +9,52 @@ shield: - settings_reset - tidbit include: - - board: bdn9_rev2 + - board: bdn9 - board: nice60 - - board: seeeduino_xiao_ble + - board: xiao_ble shield: hummingbird - board: nrf52840_m2 shield: m60 - - board: planck_rev6 + - board: planck - board: proton_c shield: clueboard_california - - board: nice_nano_v2 + - board: nice_nano shield: kyria_left cmake-args: "-DCONFIG_ZMK_DISPLAY=y" nickname: "display" - - board: nice_nano_v2 + - board: nice_nano shield: kyria_left cmake-args: "-DCONFIG_ZMK_POINTING=y" nickname: "mouse" - board: sparkfun_pro_micro_rp2040 shield: reviung41 cmake-args: "-DSNIPPET='zmk-usb-logging'" - - board: nice_nano_v2 + - board: nice_nano shield: kyria_right cmake-args: "-DCONFIG_ZMK_DISPLAY=y" nickname: "display" - board: nice_nano shield: romac_plus - cmake-args: "-DCONFIG_ZMK_RGB_UNDERGLOW=y -DCONFIG_WS2812_STRIP=y" + cmake-args: "-DCONFIG_ZMK_RGB_UNDERGLOW=y" nickname: "underglow" - - board: nice_nano_v2 + - board: nice_nano shield: lily58_left nice_view_adapter nice_view nickname: "niceview" - - board: bdn9_rev2 + - board: bdn9 snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "stm32-studio" - - board: nice_nano_v2 + - board: nice_nano shield: reviung41 snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "nrf52-studio" - - board: nice_nano_v2 + - board: nice_nano shield: corne_left snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" nickname: "split-left-studio" - - board: nice_nano_v2 + - board: nice_nano shield: corne_right snippet: studio-rpc-usb-uart cmake-args: "-DCONFIG_ZMK_STUDIO=y" diff --git a/app/dts/behaviors/reset.dtsi b/app/dts/behaviors/reset.dtsi index 2aa41d7d6..1b29f9d19 100644 --- a/app/dts/behaviors/reset.dtsi +++ b/app/dts/behaviors/reset.dtsi @@ -19,6 +19,7 @@ bootloader: bootload { compatible = "zmk,behavior-reset"; type = ; + bootloader; #binding-cells = <0>; display-name = "Bootloader"; }; diff --git a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml index 9eb7aa6a3..aeb9450ee 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml @@ -11,3 +11,5 @@ properties: type: type: int default: 0 + bootloader: + type: boolean diff --git a/app/dts/bindings/retained_mem/zmk,bootmode-to-magic-mapper.yaml b/app/dts/bindings/retained_mem/zmk,bootmode-to-magic-mapper.yaml new file mode 100644 index 000000000..5d8b70c6a --- /dev/null +++ b/app/dts/bindings/retained_mem/zmk,bootmode-to-magic-mapper.yaml @@ -0,0 +1,9 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: | + Driver for mapping bootloader boot mode to a magic value + +compatible: "zmk,bootmode-to-magic-mapper" + +include: base.yaml diff --git a/app/dts/bindings/zmk,physical-layout.yaml b/app/dts/bindings/zmk,physical-layout.yaml index 3f9b8c244..7ed4cdc3d 100644 --- a/app/dts/bindings/zmk,physical-layout.yaml +++ b/app/dts/bindings/zmk,physical-layout.yaml @@ -21,6 +21,9 @@ properties: kscan: type: phandle description: The kscan to use along with this layout. The `zmk,kscan` chosen will be used as a fallback if this property is omitted. + input: + type: phandle + description: The input device to use along with this layout. The `zmk,matrix-input` chosen will be used as a fallback if this property is omitted. keys: type: phandle-array description: Array of key physical attributes. diff --git a/app/dts/common/nordic/nrf52840_uf2_boot_mode.dtsi b/app/dts/common/nordic/nrf52840_uf2_boot_mode.dtsi new file mode 100644 index 000000000..9087426c0 --- /dev/null +++ b/app/dts/common/nordic/nrf52840_uf2_boot_mode.dtsi @@ -0,0 +1,29 @@ + +&gpregret1 { + adafruit_boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; +}; + +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &adafruit_boot_retention; + }; + + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; \ No newline at end of file diff --git a/app/include/zmk/physical_layouts.h b/app/include/zmk/physical_layouts.h index d5cf65273..e28c194fe 100644 --- a/app/include/zmk/physical_layouts.h +++ b/app/include/zmk/physical_layouts.h @@ -33,6 +33,9 @@ struct zmk_physical_layout { zmk_matrix_transform_t matrix_transform; const struct device *kscan; +#if IS_ENABLED(CONFIG_INPUT) + const struct device *input; +#endif const struct zmk_key_physical_attrs *keys; size_t keys_len; diff --git a/app/keymap-module/modules/modules.cmake b/app/keymap-module/modules/modules.cmake index 6aa628851..eed289070 100644 --- a/app/keymap-module/modules/modules.cmake +++ b/app/keymap-module/modules/modules.cmake @@ -59,163 +59,3 @@ if (ZMK_CONFIG) list(APPEND DTS_ROOT ${ZMK_CONFIG}) endif() endif() - - -if(DEFINED SHIELD) - string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}") -endif() - -string(FIND "${BOARD}" "@" REVISION_SEPARATOR_INDEX) -if(NOT (REVISION_SEPARATOR_INDEX EQUAL -1)) - math(EXPR BOARD_REVISION_INDEX "${REVISION_SEPARATOR_INDEX} + 1") - string(SUBSTRING ${BOARD} ${BOARD_REVISION_INDEX} -1 BOARD_REVISION) - string(SUBSTRING ${BOARD} 0 ${REVISION_SEPARATOR_INDEX} BOARD) -endif() - -foreach(root ${BOARD_ROOT}) - set(shield_dir ${root}/boards/shields) - # Match the Kconfig.shield files in the shield directories to make sure we are - # finding shields, e.g. x_nucleo_iks01a1/Kconfig.shield - file(GLOB_RECURSE shields_refs_list ${shield_dir}/*/Kconfig.shield) - unset(SHIELD_LIST) - foreach(shields_refs ${shields_refs_list}) - get_filename_component(shield_path ${shields_refs} DIRECTORY) - file(GLOB shield_overlays RELATIVE ${shield_path} ${shield_path}/*.overlay) - foreach(overlay ${shield_overlays}) - get_filename_component(shield ${overlay} NAME_WE) - list(APPEND SHIELD_LIST ${shield}) - set(SHIELD_DIR_${shield} ${shield_path}) - endforeach() - endforeach() - - if (EXISTS "${root}/boards/${BOARD}.overlay") - list(APPEND shield_dts_files "${root}/boards/${BOARD}.overlay") - endif() - if (NOT DEFINED BOARD_DIR_NAME) - find_path(BOARD_DIR - NAMES ${BOARD}_defconfig - PATHS ${root}/boards/*/* - NO_DEFAULT_PATH - ) - if(BOARD_DIR) - get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME) - list(APPEND KEYMAP_DIRS ${BOARD_DIR}) - endif() - endif() - - if(DEFINED SHIELD) - foreach(s ${SHIELD_AS_LIST}) - if(NOT ${s} IN_LIST SHIELD_LIST) - continue() - endif() - message(STATUS "Adding ${SHIELD_DIR_${s}}") - list(APPEND KEYMAP_DIRS ${SHIELD_DIR_${s}}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - list(APPEND SHIELD_DIR ${shield_dir_name}) - endforeach() - endif() -endforeach() - -if(EXISTS ${BOARD_DIR}/revision.cmake) - # Board provides revision handling. - include(${BOARD_DIR}/revision.cmake) -elseif(BOARD_REVISION) - message(WARNING "Board revision ${BOARD_REVISION} specified for ${BOARD}, \ - but board has no revision so revision will be ignored.") -endif() - -if(DEFINED BOARD_REVISION) - string(REPLACE "." "_" BOARD_REVISION_STRING ${BOARD_REVISION}) - set(KEYMAP_BOARD_REVISION_PREFIX "${BOARD}_${BOARD_REVISION_STRING}") -else() - set(KEYMAP_BOARD_REVISION_PREFIX "") -endif() - -# Give a shield like `kyria_rev2_left` we want to use `kyria_rev2` and `kyria` as candidate names for -# overlay/conf/keymap files. -if(DEFINED SHIELD) - foreach(s ${SHIELD_AS_LIST}) - if (DEFINED $SHIELD_DIR_${s}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - endif() - string(REPLACE "_" ";" S_PIECES ${s}) - list(LENGTH S_PIECES S_PIECES_LEN) - while(NOT S_PIECES STREQUAL "") - list(POP_BACK S_PIECES) - list(JOIN S_PIECES "_" s_substr) - if ("${s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL "${shield_dir_name}") - break() - endif() - list(APPEND shield_candidate_names ${s_substr}) - endwhile() - endforeach() -endif() - -if (ZMK_CONFIG) - if (EXISTS ${ZMK_CONFIG}) - message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") - list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") - - if (DEFINED SHIELD) - foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) - if (DEFINED ${SHIELD_DIR_${s}}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - endif() - list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}.overlay") - if (NOT "${shield_dir_name}" STREQUAL "${s}") - list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}_${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}.conf") - endif() - list(APPEND config_candidates "${ZMK_CONFIG}/${s}_${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${s}.conf") - endforeach() - endif() - - # TODO: Board revisions? - list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/default.overlay") - list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/default.conf") - - foreach(overlay ${overlay_candidates}) - if (EXISTS "${overlay}") - message(STATUS "ZMK Config devicetree overlay: ${overlay}") - list(APPEND shield_dts_files "${overlay}") - break() - endif() - endforeach() - - foreach(conf ${config_candidates}) - if (EXISTS "${conf}") - message(STATUS "ZMK Config Kconfig: ${conf}") - list(APPEND shield_conf_files "${conf}") - endif() - endforeach() - else() - message(WARNING "Unable to locate ZMK config at: ${ZMK_CONFIG}") - endif() -endif() - - -if(NOT KEYMAP_FILE) - foreach(keymap_dir ${KEYMAP_DIRS}) - foreach(keymap_prefix ${shield_candidate_names} ${SHIELD_AS_LIST} ${SHIELD_DIR} ${KEYMAP_BOARD_REVISION_PREFIX} ${BOARD} ${BOARD_DIR_NAME}) - if (EXISTS ${keymap_dir}/${keymap_prefix}.keymap) - set(KEYMAP_FILE "${keymap_dir}/${keymap_prefix}.keymap" CACHE STRING "Selected keymap file") - message(STATUS "Using keymap file: ${KEYMAP_FILE}") - set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) - break() - endif() - endforeach() - endforeach() -else() - message(STATUS "Using keymap file: ${KEYMAP_FILE}") - set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) -endif() - -if (NOT KEYMAP_FILE) - message(WARNING "Failed to locate keymap file!") -endif() diff --git a/app/module/drivers/input/input_mock.c b/app/module/drivers/input/input_mock.c index 855b7dc37..23282cd04 100644 --- a/app/module/drivers/input/input_mock.c +++ b/app/module/drivers/input/input_mock.c @@ -48,10 +48,15 @@ static void input_mock_work_cb(struct k_work *work) { } } + bool sync = cfg->events[base_idx + 3]; input_report(dev, cfg->events[base_idx], cfg->events[base_idx + 1], cfg->events[base_idx + 2], - cfg->events[base_idx + 3], K_NO_WAIT); + sync, K_NO_WAIT); - k_work_schedule(&data->work, K_MSEC(cfg->event_period)); + if (sync) { + k_work_schedule(&data->work, K_MSEC(cfg->event_period)); + } else { + k_work_schedule(&data->work, K_NO_WAIT); + } } int input_mock_init(const struct device *dev) { diff --git a/app/run-test.sh b/app/run-test.sh index 1b10ed930..e22adff1b 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -25,7 +25,7 @@ fi ZMK_BUILD_DIR=${ZMK_BUILD_DIR:-${ZMK_SRC_DIR:-.}/build} mkdir -p ${ZMK_BUILD_DIR}/tests -testcases=$(find $path -name native_posix_64.keymap -exec dirname \{\} \;) +testcases=$(find $path -name native_sim.keymap -exec dirname \{\} \;) num_cases=$(echo "$testcases" | wc -l) if [ $num_cases -gt 1 ] || [ "$testcases" != "$path" ]; then echo "" >${ZMK_BUILD_DIR}/tests/pass-fail.log @@ -39,7 +39,7 @@ testcase=$(realpath $path | sed -n -e "s|.*/tests/||p") echo "Running $testcase:" build_cmd="west build ${ZMK_SRC_DIR:+-s $ZMK_SRC_DIR} -d ${ZMK_BUILD_DIR}/tests/$testcase \ - -b native_posix_64 -p -- -DCONFIG_ASSERT=y -DZMK_CONFIG="$(realpath $path)" \ + -b native_sim/native/64 -p -- -DCONFIG_ASSERT=y -DZMK_CONFIG="$(realpath $path)" \ ${ZMK_EXTRA_MODULES:+-DZMK_EXTRA_MODULES="$(realpath ${ZMK_EXTRA_MODULES})"}" if [ -z ${ZMK_TESTS_VERBOSE} ]; then diff --git a/app/src/activity.c b/app/src/activity.c index b109d46d8..f4dc35624 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -116,9 +116,11 @@ static void note_activity_work_cb(struct k_work *_work) { note_activity(); } K_WORK_DEFINE(note_activity_work, note_activity_work_cb); -static void activity_input_listener(struct input_event *ev) { k_work_submit(¬e_activity_work); } +static void activity_input_listener(struct input_event *ev, void *user_data) { + k_work_submit(¬e_activity_work); +} -INPUT_CALLBACK_DEFINE(NULL, activity_input_listener); +INPUT_CALLBACK_DEFINE(NULL, activity_input_listener, NULL); #endif diff --git a/app/src/behavior.c b/app/src/behavior.c index 6d5bbca31..c7899d62e 100644 --- a/app/src/behavior.c +++ b/app/src/behavior.c @@ -41,13 +41,13 @@ const struct device *z_impl_behavior_get_binding(const char *name) { } STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) { - if (z_device_is_ready(item->device) && item->device->name == name) { + if (device_is_ready(item->device) && item->device->name == name) { return item->device; } } STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) { - if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { + if (device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { return item->device; } } @@ -267,7 +267,7 @@ zmk_behavior_local_id_t zmk_behavior_get_local_id(const char *name) { } STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) { - if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { + if (device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { return item->local_id; } } @@ -277,7 +277,7 @@ zmk_behavior_local_id_t zmk_behavior_get_local_id(const char *name) { const char *zmk_behavior_find_behavior_name_from_local_id(zmk_behavior_local_id_t local_id) { STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) { - if (z_device_is_ready(item->device) && item->local_id == local_id) { + if (device_is_ready(item->device) && item->local_id == local_id) { return item->device->name; } } diff --git a/app/src/behaviors/behavior_input_two_axis.c b/app/src/behaviors/behavior_input_two_axis.c index ea8e948d2..40e82a8e4 100644 --- a/app/src/behaviors/behavior_input_two_axis.c +++ b/app/src/behaviors/behavior_input_two_axis.c @@ -143,7 +143,7 @@ static float update_movement_1d(const struct behavior_input_two_axis_config *con } int64_t move_duration = ticks_since_start(state->start_time, now, config->delay_ms); - LOG_DBG("Calculated speed: %f", speed(config, code, state->speed, move_duration)); + LOG_DBG("Calculated speed: %f", (double)speed(config, code, state->speed, move_duration)); move = (move_duration > 0) ? (speed(config, code, state->speed, move_duration) * config->trigger_period_ms / 1000) diff --git a/app/src/behaviors/behavior_reset.c b/app/src/behaviors/behavior_reset.c index 61df15afd..67f33aaed 100644 --- a/app/src/behaviors/behavior_reset.c +++ b/app/src/behaviors/behavior_reset.c @@ -14,11 +14,21 @@ #include +#if IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) + +#include + +#endif /* IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) */ + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) struct behavior_reset_config { +#if IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) + enum BOOT_MODE_TYPES boot_mode; +#else int type; +#endif /* IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) */ }; static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, @@ -26,10 +36,20 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_reset_config *cfg = dev->config; - // TODO: Correct magic code for going into DFU? +#if IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) + int ret = bootmode_set(cfg->boot_mode); + if (ret < 0) { + LOG_ERR("Failed to set the bootloader mode (%d)", ret); + return ZMK_BEHAVIOR_OPAQUE; + } + + sys_reboot(SYS_REBOOT_WARM); +#else // See // https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/d6b28e66053eea467166f44875e3c7ec741cb471/src/main.c#L107 sys_reboot(cfg->type); +#endif /* IS_ENABLED(CONFIG_RETENTION_BOOT_MODE) */ + return ZMK_BEHAVIOR_OPAQUE; } @@ -43,7 +63,11 @@ static const struct behavior_driver_api behavior_reset_driver_api = { #define RST_INST(n) \ static const struct behavior_reset_config behavior_reset_config_##n = { \ - .type = DT_INST_PROP(n, type)}; \ + COND_CODE_1( \ + IS_ENABLED(CONFIG_RETENTION_BOOT_MODE), \ + (DT_INST_PROP(n, bootloader) ? BOOT_MODE_TYPE_BOOTLOADER : BOOT_MODE_TYPE_NORMAL), \ + (.type = DT_INST_PROP(n, type))), \ + }; \ BEHAVIOR_DT_INST_DEFINE(n, NULL, NULL, NULL, &behavior_reset_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_reset_driver_api); diff --git a/app/src/ble.c b/app/src/ble.c index eb2a697e6..94c1b2936 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -56,8 +56,7 @@ enum advertising_type { #define CURR_ADV(adv) (adv << 4) #define ZMK_ADV_CONN_NAME \ - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_USE_NAME | \ - BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \ + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | BT_LE_ADV_OPT_FORCE_NAME_IN_AD, \ BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL) static struct zmk_ble_profile profiles[ZMK_BLE_PROFILE_COUNT]; diff --git a/app/src/boot/CMakeLists.txt b/app/src/boot/CMakeLists.txt new file mode 100644 index 000000000..6e75945a7 --- /dev/null +++ b/app/src/boot/CMakeLists.txt @@ -0,0 +1,3 @@ + +target_sources_ifdef(CONFIG_ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER app PRIVATE bootmode_to_magic_mapper.c) +target_sources_ifdef(CONFIG_ZMK_DBL_TAP_BOOTLOADER app PRIVATE dbl_tap_bootloader.c) \ No newline at end of file diff --git a/app/src/boot/Kconfig b/app/src/boot/Kconfig new file mode 100644 index 000000000..f98fbba57 --- /dev/null +++ b/app/src/boot/Kconfig @@ -0,0 +1,43 @@ + +config ZMK_DBL_TAP_BOOTLOADER + bool "Double Tap To Enter Bootloader" + depends on RETENTION_BOOT_MODE + +if ZMK_DBL_TAP_BOOTLOADER + +config ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS + int "Double Tap Timeout (ms)" + +config ZMK_DBL_TAP_BOOTLOADER_INIT_PRIORITY + int "Double Tap Init Priority" + +endif + +config ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER + bool "Magic Value Mapper" + default y + depends on DT_HAS_ZMK_BOOTMODE_TO_MAGIC_MAPPER_ENABLED + +if ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER + +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + prompt "Magic Value Bootloader Type" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_UNKNOWN + bool "Unknown" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2 + bool "tinyuf2" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA + bool "Adafruit BOSSA" + +config ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 + bool "Adafruit nRF52" + +endchoice + +config ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE + hex + +endif diff --git a/app/src/boot/Kconfig.defaults b/app/src/boot/Kconfig.defaults new file mode 100644 index 000000000..29e4e9bc4 --- /dev/null +++ b/app/src/boot/Kconfig.defaults @@ -0,0 +1,27 @@ + +config ZMK_DBL_TAP_BOOTLOADER + default y if STM32_BOOTLOADER || RPI_PICO_ROM_BOOTLOADER + depends on RETENTION_BOOT_MODE + +if ZMK_DBL_TAP_BOOTLOADER + +config ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS + default 500 + +config ZMK_DBL_TAP_BOOTLOADER_INIT_PRIORITY + default 20 + +endif + +if ZMK_BOOTMODE_TO_MAGIC_VALUE_MAPPER + +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 if SOC_NRF52840 + +endchoice + +config ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE + default 0xf01669ef if ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2 || ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA || BOOTLOADER_BOSSA_ADAFRUIT_UF2 + default 0x57 if ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 + +endif diff --git a/app/src/boot/bootmode_to_magic_mapper.c b/app/src/boot/bootmode_to_magic_mapper.c new file mode 100644 index 000000000..f2b672bfa --- /dev/null +++ b/app/src/boot/bootmode_to_magic_mapper.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_bootmode_to_magic_mapper + +#include +#include +#include +#include + +static const struct device *magic_dev = DEVICE_DT_GET(DT_CHOSEN(zmk_magic_boot_mode)); +#define MAGIC_DEST_ONE_BYTE (DT_REG_SIZE(DT_CHOSEN(zmk_magic_boot_mode)) == 1) + +#if MAGIC_DEST_ONE_BYTE +typedef uint8_t magic_val_t; +#else +typedef uint32_t magic_val_t; +#endif + +static const magic_val_t bootloader_magic_value = CONFIG_ZMK_BOOTMODE_BOOTLOADER_MAGIC_VALUE; + +static ssize_t btmm_ram_size(const struct device *dev) { return (ssize_t)1; } + +static int btmm_ram_read(const struct device *dev, off_t offset, uint8_t *buffer, size_t size) { + if (size != 1) { + return -ENOTSUP; + } + + magic_val_t val; + int ret = retention_read(magic_dev, 0, (uint8_t *)&val, sizeof(val)); + if (ret < 0) { + return ret; + } + + *buffer = (val == bootloader_magic_value) ? BOOT_MODE_TYPE_BOOTLOADER : BOOT_MODE_TYPE_NORMAL; + + return 0; +} + +static int btmm_ram_write(const struct device *dev, off_t offset, const uint8_t *buffer, + size_t size) { + if (size != 1) { + return -ENOTSUP; + } + + magic_val_t val = (*buffer == BOOT_MODE_TYPE_BOOTLOADER) ? bootloader_magic_value : 0; + + return retention_write(magic_dev, 0, (uint8_t *)&val, sizeof(val)); +} + +static int btmm_ram_clear(const struct device *dev) { return retention_clear(magic_dev); } + +static const struct retained_mem_driver_api btmm_api = { + .size = btmm_ram_size, + .read = btmm_ram_read, + .write = btmm_ram_write, + .clear = btmm_ram_clear, +}; + +DEVICE_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, 0, &btmm_api); diff --git a/app/src/boot/dbl_tap_bootloader.c b/app/src/boot/dbl_tap_bootloader.c new file mode 100644 index 000000000..254dc69dc --- /dev/null +++ b/app/src/boot/dbl_tap_bootloader.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +static int dbl_tap_boot_mode_init(void) { + bootmode_set(BOOT_MODE_TYPE_BOOTLOADER); + + k_busy_wait(CONFIG_ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS * 1000); + + bootmode_clear(); + + return 0; +} + +SYS_INIT(dbl_tap_boot_mode_init, POST_KERNEL, CONFIG_ZMK_DBL_TAP_BOOTLOADER_INIT_PRIORITY); diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index 5d5c81f47..a6d1f5939 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -29,11 +29,8 @@ choice LV_TXT_ENC endchoice -config LV_MEM_CUSTOM - default y - - config LV_Z_MEM_POOL_SIZE - default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN +config LV_Z_MEM_POOL_SIZE + default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN choice ZMK_DISPLAY_STATUS_SCREEN prompt "Default status screen for displays" @@ -67,7 +64,7 @@ if ZMK_DISPLAY_WORK_QUEUE_DEDICATED config ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE int "Stack size for dedicated UI thread/queue" - default 2048 + default 3072 config ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY int "Thread priority for dedicated UI thread/queue" diff --git a/app/src/display/main.c b/app/src/display/main.c index da6686cac..a86bfad51 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -110,10 +110,10 @@ static void initialize_theme() { #if IS_ENABLED(CONFIG_LV_USE_THEME_MONO) lv_disp_t *disp = lv_disp_get_default(); lv_theme_t *theme = - lv_theme_mono_init(disp, IS_ENABLED(CONFIG_ZMK_DISPLAY_INVERT), CONFIG_LV_FONT_DEFAULT); - theme->font_small = CONFIG_ZMK_LV_FONT_DEFAULT_SMALL; + lv_theme_mono_init(disp, IS_ENABLED(CONFIG_ZMK_DISPLAY_INVERT), CONFIG_LV_FONT_DEFAULT, + CONFIG_ZMK_LV_FONT_DEFAULT_SMALL, CONFIG_LV_FONT_DEFAULT); - disp->theme = theme; + lv_display_set_theme(disp, theme); #endif // CONFIG_LV_USE_THEME_MONO } @@ -145,9 +145,14 @@ K_WORK_DEFINE(init_work, initialize_display); int zmk_display_init() { #if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) + struct k_work_queue_config config = { +#if IS_ENABLED(CONFIG_THREAD_NAME) + .name = "display queue", +#endif + }; k_work_queue_start(&display_work_q, display_work_stack_area, K_THREAD_STACK_SIZEOF(display_work_stack_area), - CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY, NULL); + CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY, &config); #endif #if IS_ENABLED(CONFIG_ARCH_POSIX) diff --git a/app/src/physical_layouts.c b/app/src/physical_layouts.c index 8d3843088..15268b941 100644 --- a/app/src/physical_layouts.c +++ b/app/src/physical_layouts.c @@ -9,6 +9,7 @@ #include #include #include +#include #if IS_ENABLED(CONFIG_SETTINGS) #include @@ -27,6 +28,16 @@ ZMK_EVENT_IMPL(zmk_physical_layout_selection_changed); #define DT_DRV_COMPAT zmk_physical_layout +#define MATRIX_INPUT_SUPPORT \ + UTIL_AND(IS_ENABLED(CONFIG_INPUT), \ + UTIL_OR(DT_ANY_INST_HAS_PROP_STATUS_OKAY(input), DT_HAS_CHOSEN(zmk_matrix_input))) + +#if MATRIX_INPUT_SUPPORT + +static void zmk_physical_layout_input_event_cb(struct input_event *evt, void *user_data); + +#endif + #define USE_PHY_LAYOUTS \ (DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) && !DT_HAS_CHOSEN(zmk_matrix_transform)) @@ -53,6 +64,10 @@ BUILD_ASSERT( ()) \ } +#define INPUT_FOR_INST(n) \ + DEVICE_DT_GET(COND_CODE_1(DT_INST_PROP_LEN(n, input), (DT_INST_PHANDLE(n, input)), \ + (DT_CHOSEN(zmk_matrix_input)))) + #define ZMK_LAYOUT_INST(n) \ BUILD_ASSERT(!IS_ENABLED(CONFIG_ZMK_STUDIO) || DT_INST_NODE_HAS_PROP(n, keys), \ "ZMK Studio requires physical layouts with key positions. See " \ @@ -67,8 +82,18 @@ BUILD_ASSERT( .matrix_transform = ZMK_MATRIX_TRANSFORM_T_FOR_NODE(DT_INST_PHANDLE(n, transform)), \ .keys = _CONCAT(_zmk_physical_layout_keys_, n), \ .keys_len = DT_INST_PROP_LEN_OR(n, keys, 0), \ - .kscan = DEVICE_DT_GET(COND_CODE_1(DT_INST_PROP_LEN(n, kscan), \ - (DT_INST_PHANDLE(n, kscan)), (DT_CHOSEN(zmk_kscan))))}; + COND_CODE_1(UTIL_AND(MATRIX_INPUT_SUPPORT, DT_INST_PROP_LEN(n, input)), \ + (.input = INPUT_FOR_INST(n)), ()) \ + COND_CODE_1(UTIL_OR(DT_HAS_CHOSEN(zmk_kscan), DT_INST_PROP_LEN(n, kscan)), \ + (.kscan = DEVICE_DT_GET(COND_CODE_1(DT_INST_PROP_LEN(n, kscan), \ + (DT_INST_PHANDLE(n, kscan)), \ + (DT_CHOSEN(zmk_kscan))))), \ + ())}; \ + COND_CODE_1( \ + UTIL_AND(MATRIX_INPUT_SUPPORT, DT_INST_PROP_LEN(n, input)), \ + (INPUT_CALLBACK_DEFINE(INPUT_FOR_INST(n), zmk_physical_layout_input_event_cb, \ + (void *)&(_CONCAT(_zmk_physical_layout_, DT_DRV_INST(n))));), \ + ()) DT_INST_FOREACH_STATUS_OKAY(ZMK_LAYOUT_INST) @@ -135,12 +160,12 @@ static const struct zmk_physical_layout _CONCAT(_zmk_physical_layout_, chosen) = static const struct zmk_physical_layout *const layouts[] = { &_CONCAT(_zmk_physical_layout_, chosen)}; -#elif DT_HAS_CHOSEN(zmk_kscan) +#elif UTIL_OR(DT_HAS_CHOSEN(zmk_kscan), DT_HAS_CHOSEN(zmk_matrix_input)) #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) #warning \ - "Ignoring the physical layouts and using the chosen kscan with a synthetic transform. Consider setting a chosen physical layout instead." + "Ignoring the physical layouts and using the chosen kscan/matrix-input with a synthetic transform. Consider setting a chosen physical layout instead." #endif @@ -148,9 +173,19 @@ ZMK_MATRIX_TRANSFORM_DEFAULT_EXTERN(); static const struct zmk_physical_layout _CONCAT(_zmk_physical_layout_, chosen) = { .display_name = "Default", .matrix_transform = &zmk_matrix_transform_default, +#if DT_HAS_CHOSEN(zmk_matrix_input) + .input = DEVICE_DT_GET(DT_CHOSEN(zmk_matrix_input)), +#elif DT_HAS_CHOSEN(zmk_kscan) .kscan = DEVICE_DT_GET(DT_CHOSEN(zmk_kscan)), +#endif }; +#if DT_HAS_CHOSEN(zmk_matrix_input) +INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_CHOSEN(zmk_matrix_input)), + zmk_physical_layout_input_event_cb, + (void *)&(_CONCAT(_zmk_physical_layout_, chosen))); +#endif + static const struct zmk_physical_layout *const layouts[] = { &_CONCAT(_zmk_physical_layout_, chosen)}; @@ -180,6 +215,55 @@ static struct zmk_kscan_msg_processor { K_MSGQ_DEFINE(physical_layouts_kscan_msgq, sizeof(struct zmk_kscan_event), CONFIG_ZMK_KSCAN_EVENT_QUEUE_SIZE, 4); +#if MATRIX_INPUT_SUPPORT + +static struct zmk_kscan_event pending_input_event; + +static void zmk_physical_layout_input_event_cb(struct input_event *evt, void *user_data) { + const struct zmk_physical_layout *layout = (const struct zmk_physical_layout *)user_data; + if (layout != active) { + LOG_WRN("Ignoring input event from non-active layout"); + return; + } + + switch (evt->type) { + case INPUT_EV_ABS: + switch (evt->code) { + case INPUT_ABS_X: + pending_input_event.column = evt->value; + break; + case INPUT_ABS_Y: + pending_input_event.row = evt->value; + break; + default: + LOG_WRN("Unknown abs code"); + return; + } + break; + case INPUT_EV_KEY: + switch (evt->code) { + case INPUT_BTN_TOUCH: + pending_input_event.state = + (evt->value ? ZMK_KSCAN_EVENT_STATE_PRESSED : ZMK_KSCAN_EVENT_STATE_RELEASED); + break; + default: + LOG_WRN("Unknown key code"); + return; + } + break; + default: + LOG_WRN("Unknown type"); + return; + } + + if (evt->sync) { + k_msgq_put(&physical_layouts_kscan_msgq, &pending_input_event, K_NO_WAIT); + k_work_submit(&msg_processor.work); + } +} + +#endif + static void zmk_physical_layout_kscan_callback(const struct device *dev, uint32_t row, uint32_t column, bool pressed) { if (dev != active->kscan) { diff --git a/app/src/pm.c b/app/src/pm.c index 447eb351c..f4389e7ee 100644 --- a/app/src/pm.c +++ b/app/src/pm.c @@ -23,7 +23,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #ifdef CONFIG_ZMK_PM_DEVICE_SUSPEND_RESUME TYPE_SECTION_START_EXTERN(const struct device *, pm_device_slots); -#if !defined(CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE) +#if defined(CONFIG_PM_DEVICE_SYSTEM_MANAGED) /* Number of devices successfully suspended. */ static size_t zmk_num_susp; @@ -42,8 +42,8 @@ int zmk_pm_suspend_devices(void) { * Ignore uninitialized devices, busy devices, wake up sources, and * devices with runtime PM enabled. */ - if (!device_is_ready(dev) || pm_device_is_busy(dev) || pm_device_state_is_locked(dev) || - pm_device_wakeup_is_enabled(dev) || pm_device_runtime_is_enabled(dev)) { + if (!device_is_ready(dev) || pm_device_is_busy(dev) || pm_device_wakeup_is_enabled(dev) || + pm_device_runtime_is_enabled(dev)) { continue; } diff --git a/app/src/pointing/input_listener.c b/app/src/pointing/input_listener.c index 28f253000..431d9a746 100644 --- a/app/src/pointing/input_listener.c +++ b/app/src/pointing/input_listener.c @@ -128,6 +128,14 @@ static void handle_key_code(const struct input_listener_config *config, int8_t btn; switch (evt->code) { + case INPUT_BTN_TOUCH: + btn = 0; + if (evt->value > 0) { + WRITE_BIT(data->mouse.button_set, btn, 1); + } else { + WRITE_BIT(data->mouse.button_clear, btn, 1); + } + break; case INPUT_BTN_0: case INPUT_BTN_1: case INPUT_BTN_2: @@ -391,9 +399,10 @@ static void input_handler(const struct input_listener_config *config, .layer_override_data = {DT_INST_FOREACH_CHILD_SEP_VARGS(n, IL_OVERRIDE_DATA, \ (, ), n)}, \ }; \ - void input_handler_##n(struct input_event *evt) { \ + void input_handler_##n(struct input_event *evt, void *user_data) { \ input_handler(&config_##n, &data_##n, evt); \ - } INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), input_handler_##n);), \ + } INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), input_handler_##n, \ + NULL);), \ ()) DT_INST_FOREACH_STATUS_OKAY(IL_INST) diff --git a/app/src/pointing/input_processor_temp_layer.c b/app/src/pointing/input_processor_temp_layer.c index 4d18f33d7..455623123 100644 --- a/app/src/pointing/input_processor_temp_layer.c +++ b/app/src/pointing/input_processor_temp_layer.c @@ -187,7 +187,7 @@ static int handle_keycode_state_changed(const struct device *dev, const zmk_even return ret; } - LOG_DBG("Setting last_tapped_timestamp to: %d", ev->timestamp); + LOG_DBG("Setting last_tapped_timestamp to: %lld", ev->timestamp); data->state.last_tapped_timestamp = ev->timestamp; ret = k_mutex_unlock(&data->lock); @@ -252,7 +252,11 @@ static int temp_layer_handle_event(const struct device *dev, struct input_event struct layer_state_action action = {.layer = param1, .activate = true}; int ret = k_msgq_put(&temp_layer_action_msgq, &action, K_MSEC(10)); - k_work_submit(&layer_action_work); + if (ret < 0) { + LOG_ERR("Failed to enqueue action to enable layer %d (%d)", param1, ret); + } else { + k_work_submit(&layer_action_work); + } } if (param2 > 0) { diff --git a/app/src/pointing/input_split.c b/app/src/pointing/input_split.c index 615790a09..c3bcd4cc2 100644 --- a/app/src/pointing/input_split.c +++ b/app/src/pointing/input_split.c @@ -54,7 +54,7 @@ int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t ({})); \ BUILD_ASSERT(DT_INST_NODE_HAS_PROP(n, device), \ "Peripheral input splits need an `input` property set"); \ - void split_input_handler_##n(struct input_event *evt) { \ + void split_input_handler_##n(struct input_event *evt, void *user_data) { \ for (size_t i = 0; i < ARRAY_SIZE(processors_##n); i++) { \ int ret = zmk_input_processor_handle_event(processors_##n[i].dev, evt, \ processors_##n[i].param1, \ @@ -74,7 +74,7 @@ int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t }}}; \ zmk_split_peripheral_report_event(&ev); \ } \ - INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), split_input_handler_##n); + INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), split_input_handler_##n, NULL); #endif diff --git a/app/src/sensors.c b/app/src/sensors.c index 90ea19039..e1295de85 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -73,7 +73,7 @@ static void trigger_sensor_data_for_position(uint32_t sensor_index) { return; } - struct sensor_value value; + struct sensor_value value = {0}; err = sensor_channel_get(item->dev, item->trigger.chan, &value); if (err) { diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 685deb51c..1a9fb0e8a 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -966,10 +966,6 @@ static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { k_msgq_put(&peripheral_event_msgq, &ev, K_NO_WAIT); k_work_submit(&peripheral_event_work); - // struct zmk_peripheral_battery_state_changed ev = { - // .source = peripheral_slot_index_for_conn(conn), .state_of_charge = 0}; - // k_msgq_put(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT); - // k_work_submit(&peripheral_batt_lvl_work); #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) #if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT) @@ -1288,8 +1284,7 @@ static int finish_init() { void peripheral_event_work_callback(struct k_work *work) { struct peripheral_event_wrapper ev; while (k_msgq_get(&peripheral_event_msgq, &ev, K_NO_WAIT) == 0) { - LOG_DBG("Trigger key position state change for %d", - ev.event.data.key_position_event.position); + LOG_DBG("Trigger key position state change of type %d", ev.event.type); zmk_split_transport_central_peripheral_event_handler(&bt_central, ev.source, ev.event); } } diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index e4e7ba3a3..0d3ad2de6 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -68,7 +68,7 @@ static int start_advertising(bool low_duty) { return bt_le_adv_start(&adv_param, NULL, 0, NULL, 0); } else { is_bonded = false; - return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); + return bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); } }; @@ -96,6 +96,13 @@ static void connected(struct bt_conn *conn, uint8_t err) { } } +static void recycled(void) { + if (enabled) { + low_duty_advertising = false; + k_work_submit(&advertising_work); + } +} + static void disconnected(struct bt_conn *conn, uint8_t reason) { char addr[BT_ADDR_LE_STR_LEN]; @@ -107,11 +114,6 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) { raise_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected}); - - if (enabled) { - low_duty_advertising = false; - k_work_submit(&advertising_work); - } } static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_security_err err) { @@ -138,6 +140,7 @@ static void le_param_updated(struct bt_conn *conn, uint16_t interval, uint16_t l static struct bt_conn_cb conn_callbacks = { .connected = connected, .disconnected = disconnected, + .recycled = recycled, .security_changed = security_changed, .le_param_updated = le_param_updated, }; diff --git a/app/src/studio/gatt_rpc_transport.c b/app/src/studio/gatt_rpc_transport.c index f0ab3152a..dff182590 100644 --- a/app/src/studio/gatt_rpc_transport.c +++ b/app/src/studio/gatt_rpc_transport.c @@ -25,6 +25,7 @@ LOG_MODULE_DECLARE(zmk_studio, CONFIG_ZMK_STUDIO_LOG_LEVEL); static bool handling_rx = false; +static K_SEM_DEFINE(indicate_sem, 1, 1); static atomic_t notify_size; static void rpc_ccc_cfg_changed(const struct bt_gatt_attr *attr, uint16_t value) { @@ -125,8 +126,14 @@ static int gatt_stop_rx(void) { return 0; } +static uint8_t indicate_buffer[27]; + +static void indicate_cb(struct bt_conn *conn, struct bt_gatt_indicate_params *params, uint8_t err); + static struct bt_gatt_indicate_params rpc_indicate_params = { .attr = &rpc_interface.attrs[1], + .data = indicate_buffer, + .func = indicate_cb, }; static void notif_rpc_tx_cb(struct k_work *work) { @@ -139,34 +146,32 @@ static void notif_rpc_tx_cb(struct k_work *work) { return; } - uint16_t notify_size = get_notify_size_for_conn(conn); - uint8_t notify_bytes[notify_size]; + uint16_t notify_size = MIN(get_notify_size_for_conn(conn), sizeof(indicate_buffer)); + + if (ring_buf_size_get(tx_buf) > 0) { + int ret = k_sem_take(&indicate_sem, K_NO_WAIT); + if (ret < 0) { + return; + } - while (ring_buf_size_get(tx_buf) > 0) { uint16_t added = 0; while (added < notify_size && ring_buf_size_get(tx_buf) > 0) { uint8_t *buf; int len = ring_buf_get_claim(tx_buf, &buf, notify_size - added); - memcpy(notify_bytes + added, buf, len); + memcpy(indicate_buffer + added, buf, len); added += len; ring_buf_get_finish(tx_buf, len); } - rpc_indicate_params.data = notify_bytes; rpc_indicate_params.len = added; - int notify_attempts = 5; - do { - int err = bt_gatt_indicate(conn, &rpc_indicate_params); - if (err >= 0) { - break; - } - + int err = bt_gatt_indicate(conn, &rpc_indicate_params); + if (err < 0) { LOG_WRN("Failed to notify the response %d", err); - k_sleep(K_MSEC(200)); - } while (notify_attempts-- > 0); + k_sem_give(&indicate_sem); + } } bt_conn_unref(conn); @@ -178,6 +183,11 @@ struct gatt_write_state { size_t pending_notify; }; +static void indicate_cb(struct bt_conn *conn, struct bt_gatt_indicate_params *params, uint8_t err) { + k_sem_give(&indicate_sem); + k_work_submit(¬ify_tx_work); +} + static void gatt_tx_notify(struct ring_buf *tx_buf, size_t added, bool msg_done, void *user_data) { struct gatt_write_state *state = (struct gatt_write_state *)user_data; @@ -194,7 +204,7 @@ static void gatt_tx_notify(struct ring_buf *tx_buf, size_t added, bool msg_done, static struct gatt_write_state tx_state = {}; static void *gatt_tx_user_data(void) { - memset(&tx_state, sizeof(tx_state), 0); + memset(&tx_state, 0, sizeof(tx_state)); return &tx_state; } diff --git a/app/src/studio/rpc.c b/app/src/studio/rpc.c index 7b8dd605d..af5614825 100644 --- a/app/src/studio/rpc.c +++ b/app/src/studio/rpc.c @@ -217,7 +217,7 @@ static void rpc_main(void) { pb_istream_t stream = pb_istream_for_rx_ring_buf(); zmk_studio_Request req = zmk_studio_Request_init_zero; #if IS_ENABLED(CONFIG_THREAD_ANALYZER) - thread_analyzer_print(); + thread_analyzer_print(0); #endif // IS_ENABLED(CONFIG_THREAD_ANALYZER) bool status = pb_decode(&stream, &zmk_studio_Request_msg, &req); @@ -228,7 +228,7 @@ static void rpc_main(void) { int err = send_response(&resp); #if IS_ENABLED(CONFIG_THREAD_ANALYZER) - thread_analyzer_print(); + thread_analyzer_print(0); #endif // IS_ENABLED(CONFIG_THREAD_ANALYZER) if (err < 0) { LOG_ERR("Failed to send the RPC response %d", err); diff --git a/app/tests/backlight/basic/native_posix_64.conf b/app/tests/backlight/basic/native_sim.conf similarity index 100% rename from app/tests/backlight/basic/native_posix_64.conf rename to app/tests/backlight/basic/native_sim.conf diff --git a/app/tests/backlight/basic/native_posix_64.keymap b/app/tests/backlight/basic/native_sim.keymap similarity index 100% rename from app/tests/backlight/basic/native_posix_64.keymap rename to app/tests/backlight/basic/native_sim.keymap diff --git a/app/tests/backlight/config-brt/native_posix_64.conf b/app/tests/backlight/config-brt/native_sim.conf similarity index 100% rename from app/tests/backlight/config-brt/native_posix_64.conf rename to app/tests/backlight/config-brt/native_sim.conf diff --git a/app/tests/backlight/config-brt/native_posix_64.keymap b/app/tests/backlight/config-brt/native_sim.keymap similarity index 100% rename from app/tests/backlight/config-brt/native_posix_64.keymap rename to app/tests/backlight/config-brt/native_sim.keymap diff --git a/app/tests/backlight/config-on/native_posix_64.conf b/app/tests/backlight/config-on/native_sim.conf similarity index 100% rename from app/tests/backlight/config-on/native_posix_64.conf rename to app/tests/backlight/config-on/native_sim.conf diff --git a/app/tests/backlight/config-on/native_posix_64.keymap b/app/tests/backlight/config-on/native_sim.keymap similarity index 100% rename from app/tests/backlight/config-on/native_posix_64.keymap rename to app/tests/backlight/config-on/native_sim.keymap diff --git a/app/tests/backlight/config-step/native_posix_64.conf b/app/tests/backlight/config-step/native_sim.conf similarity index 100% rename from app/tests/backlight/config-step/native_posix_64.conf rename to app/tests/backlight/config-step/native_sim.conf diff --git a/app/tests/backlight/config-step/native_posix_64.keymap b/app/tests/backlight/config-step/native_sim.keymap similarity index 100% rename from app/tests/backlight/config-step/native_posix_64.keymap rename to app/tests/backlight/config-step/native_sim.keymap diff --git a/app/tests/backlight/cycle/native_posix_64.conf b/app/tests/backlight/cycle/native_sim.conf similarity index 100% rename from app/tests/backlight/cycle/native_posix_64.conf rename to app/tests/backlight/cycle/native_sim.conf diff --git a/app/tests/backlight/cycle/native_posix_64.keymap b/app/tests/backlight/cycle/native_sim.keymap similarity index 100% rename from app/tests/backlight/cycle/native_posix_64.keymap rename to app/tests/backlight/cycle/native_sim.keymap diff --git a/app/tests/backlight/low-brightness/native_posix_64.conf b/app/tests/backlight/low-brightness/native_sim.conf similarity index 100% rename from app/tests/backlight/low-brightness/native_posix_64.conf rename to app/tests/backlight/low-brightness/native_sim.conf diff --git a/app/tests/backlight/low-brightness/native_posix_64.keymap b/app/tests/backlight/low-brightness/native_sim.keymap similarity index 100% rename from app/tests/backlight/low-brightness/native_posix_64.keymap rename to app/tests/backlight/low-brightness/native_sim.keymap diff --git a/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log b/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log index fa40c20a6..4c8f2c27f 100644 --- a/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log +++ b/app/tests/ble/security/read-hid-after-connect-with-auto-sec/snapshot.log @@ -9,3 +9,4 @@ ble_central: pairing_complete: Pairing complete ble_central: read_cb: Read err: 0, length 8 ble_central: read_cb: Read err: 0, length 12 + ble_central: read_cb: Read err: 10, length 0 diff --git a/app/tests/ble/split/peripheral-input/snapshot.log b/app/tests/ble/split/peripheral-input/snapshot.log index eaf0675de..cf63c996e 100644 --- a/app/tests/ble/split/peripheral-input/snapshot.log +++ b/app/tests/ble/split/peripheral-input/snapshot.log @@ -19,6 +19,7 @@ profile 0 ble_central: discover_func: [CONSUMER SUBSCRIBED] profile 0 ble_central: discover_func: [ATTRIBUTE] handle 36 profile 0 ble_central: discover_func: [ATTRIBUTE] handle 38 profile 0 ble_central: discover_func: [MOUSE SUBSCRIBED] +profile 0 ble_central: discover_func: [Discover complete] profile 0 ble_central: notify_func: payload profile 0 00 64 00 64 00 00 00 00 00 |.d.d.... . profile 0 ble_central: notify_func: payload diff --git a/app/tests/ble/split/run-peripheral-behavior/snapshot.log b/app/tests/ble/split/run-peripheral-behavior/snapshot.log index ae93d4d80..2289d9c1f 100644 --- a/app/tests/ble/split/run-peripheral-behavior/snapshot.log +++ b/app/tests/ble/split/run-peripheral-behavior/snapshot.log @@ -1,6 +1,6 @@ peripheral 0 bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) peripheral 0 bt_hci_core: HW Variant: nRF52x (0x0002) -peripheral 0 bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.5 Build 0 +peripheral 0 bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 4.1 Build 0 peripheral 0 bt_id: No static addresses stored in controller peripheral 0 bt_hci_core: Identity: D1:0B:03:A3:ED:6F (random) peripheral 0 bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1 diff --git a/app/tests/ble/split/set-hid-indicators/snapshot.log b/app/tests/ble/split/set-hid-indicators/snapshot.log index 3e35cb2b7..abec1666d 100644 --- a/app/tests/ble/split/set-hid-indicators/snapshot.log +++ b/app/tests/ble/split/set-hid-indicators/snapshot.log @@ -1,6 +1,6 @@ peripheral 0 bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) peripheral 0 bt_hci_core: HW Variant: nRF52x (0x0002) -peripheral 0 bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.5 Build 0 +peripheral 0 bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 4.1 Build 0 peripheral 0 bt_id: No static addresses stored in controller peripheral 0 bt_hci_core: Identity: D1:0B:03:A3:ED:6F (random) peripheral 0 bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1 diff --git a/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap b/app/tests/caps-word/continue-with-modifiers/native_sim.keymap similarity index 100% rename from app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap rename to app/tests/caps-word/continue-with-modifiers/native_sim.keymap diff --git a/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap b/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_sim.keymap similarity index 100% rename from app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap rename to app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_sim.keymap diff --git a/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap b/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_sim.keymap similarity index 100% rename from app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap rename to app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_sim.keymap diff --git a/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap b/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_sim.keymap similarity index 100% rename from app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap rename to app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_sim.keymap diff --git a/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap b/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap deleted file mode 100644 index 121a827cc..000000000 --- a/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; -}; \ No newline at end of file diff --git a/app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap b/app/tests/caps-word/deactivate-by-second-press/native_sim.keymap similarity index 100% rename from app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap rename to app/tests/caps-word/deactivate-by-second-press/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-0/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-0/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-1/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-1/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-2/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-2/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-3/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-3/native_sim.keymap diff --git a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-4/native_sim.keymap similarity index 100% rename from app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap rename to app/tests/combo/combos-and-holdtaps-4/native_sim.keymap diff --git a/app/tests/combo/layer-filter-0/native_posix_64.keymap b/app/tests/combo/layer-filter-0/native_sim.keymap similarity index 100% rename from app/tests/combo/layer-filter-0/native_posix_64.keymap rename to app/tests/combo/layer-filter-0/native_sim.keymap diff --git a/app/tests/combo/layer-filter-1/native_posix_64.keymap b/app/tests/combo/layer-filter-1/native_sim.keymap similarity index 100% rename from app/tests/combo/layer-filter-1/native_posix_64.keymap rename to app/tests/combo/layer-filter-1/native_sim.keymap diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_sim.keymap similarity index 100% rename from app/tests/combo/multiple-timeouts/native_posix_64.keymap rename to app/tests/combo/multiple-timeouts/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap b/app/tests/combo/overlapping-combos-0/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-0/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-0/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap b/app/tests/combo/overlapping-combos-1/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-1/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-1/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap b/app/tests/combo/overlapping-combos-2/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-2/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-2/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap b/app/tests/combo/overlapping-combos-3/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-3/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-3/native_sim.keymap diff --git a/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap b/app/tests/combo/overlapping-combos-4-different-timeouts/native_sim.keymap similarity index 100% rename from app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap rename to app/tests/combo/overlapping-combos-4-different-timeouts/native_sim.keymap diff --git a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap b/app/tests/combo/partially-overlapping-combos/native_sim.keymap similarity index 100% rename from app/tests/combo/partially-overlapping-combos/native_posix_64.keymap rename to app/tests/combo/partially-overlapping-combos/native_sim.keymap diff --git a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-complete/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap rename to app/tests/combo/press-release-long-combo-complete/native_sim.keymap diff --git a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-incomplete/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap rename to app/tests/combo/press-release-long-combo-incomplete/native_sim.keymap diff --git a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-wrong-last-key/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap rename to app/tests/combo/press-release-long-combo-wrong-last-key/native_sim.keymap diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_sim.keymap similarity index 100% rename from app/tests/combo/press-release/native_posix_64.keymap rename to app/tests/combo/press-release/native_sim.keymap diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_sim.keymap similarity index 100% rename from app/tests/combo/press-timeout/native_posix_64.keymap rename to app/tests/combo/press-timeout/native_sim.keymap diff --git a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap b/app/tests/combo/press1-press2-release1-release2/native_sim.keymap similarity index 100% rename from app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap rename to app/tests/combo/press1-press2-release1-release2/native_sim.keymap diff --git a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap b/app/tests/combo/press1-press2-release2-release1/native_sim.keymap similarity index 100% rename from app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap rename to app/tests/combo/press1-press2-release2-release1/native_sim.keymap diff --git a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap b/app/tests/combo/press1-release1-press2-release2/native_sim.keymap similarity index 100% rename from app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap rename to app/tests/combo/press1-release1-press2-release2/native_sim.keymap diff --git a/app/tests/combo/require-prior-idle/native_posix_64.keymap b/app/tests/combo/require-prior-idle/native_sim.keymap similarity index 100% rename from app/tests/combo/require-prior-idle/native_posix_64.keymap rename to app/tests/combo/require-prior-idle/native_sim.keymap diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_sim.keymap similarity index 100% rename from app/tests/combo/slowrelease-disabled/native_posix_64.keymap rename to app/tests/combo/slowrelease-disabled/native_sim.keymap diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_sim.keymap similarity index 100% rename from app/tests/combo/slowrelease-enabled/native_posix_64.keymap rename to app/tests/combo/slowrelease-enabled/native_sim.keymap diff --git a/app/tests/conditional-layer/chained-activation/native_posix_64.keymap b/app/tests/conditional-layer/chained-activation/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/chained-activation/native_posix_64.keymap rename to app/tests/conditional-layer/chained-activation/native_sim.keymap diff --git a/app/tests/conditional-layer/mo-overlap/native_posix_64.keymap b/app/tests/conditional-layer/mo-overlap/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/mo-overlap/native_posix_64.keymap rename to app/tests/conditional-layer/mo-overlap/native_sim.keymap diff --git a/app/tests/conditional-layer/multiple-configs/native_posix_64.keymap b/app/tests/conditional-layer/multiple-configs/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/multiple-configs/native_posix_64.keymap rename to app/tests/conditional-layer/multiple-configs/native_sim.keymap diff --git a/app/tests/conditional-layer/quad-layer/native_posix_64.keymap b/app/tests/conditional-layer/quad-layer/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/quad-layer/native_posix_64.keymap rename to app/tests/conditional-layer/quad-layer/native_sim.keymap diff --git a/app/tests/conditional-layer/same-layer-reached-both-ways/native_posix_64.keymap b/app/tests/conditional-layer/same-layer-reached-both-ways/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/same-layer-reached-both-ways/native_posix_64.keymap rename to app/tests/conditional-layer/same-layer-reached-both-ways/native_sim.keymap diff --git a/app/tests/conditional-layer/same-layer-reached-differently/native_posix_64.keymap b/app/tests/conditional-layer/same-layer-reached-differently/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/same-layer-reached-differently/native_posix_64.keymap rename to app/tests/conditional-layer/same-layer-reached-differently/native_sim.keymap diff --git a/app/tests/conditional-layer/tri-layer-alt-order/native_posix_64.keymap b/app/tests/conditional-layer/tri-layer-alt-order/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/tri-layer-alt-order/native_posix_64.keymap rename to app/tests/conditional-layer/tri-layer-alt-order/native_sim.keymap diff --git a/app/tests/conditional-layer/tri-layer-lt/native_posix_64.keymap b/app/tests/conditional-layer/tri-layer-lt/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/tri-layer-lt/native_posix_64.keymap rename to app/tests/conditional-layer/tri-layer-lt/native_sim.keymap diff --git a/app/tests/conditional-layer/tri-layer/native_posix_64.keymap b/app/tests/conditional-layer/tri-layer/native_sim.keymap similarity index 100% rename from app/tests/conditional-layer/tri-layer/native_posix_64.keymap rename to app/tests/conditional-layer/tri-layer/native_sim.keymap diff --git a/app/tests/encoders/layers-1/native_posix_64.keymap b/app/tests/encoders/layers-1/native_sim.keymap similarity index 100% rename from app/tests/encoders/layers-1/native_posix_64.keymap rename to app/tests/encoders/layers-1/native_sim.keymap diff --git a/app/tests/encoders/layers-2/native_posix_64.keymap b/app/tests/encoders/layers-2/native_sim.keymap similarity index 100% rename from app/tests/encoders/layers-2/native_posix_64.keymap rename to app/tests/encoders/layers-2/native_sim.keymap diff --git a/app/tests/encoders/rotate/native_posix_64.keymap b/app/tests/encoders/rotate/native_sim.keymap similarity index 100% rename from app/tests/encoders/rotate/native_posix_64.keymap rename to app/tests/encoders/rotate/native_sim.keymap diff --git a/app/tests/gresc/gresc-press-release/native_posix_64.keymap b/app/tests/gresc/gresc-press-release/native_sim.keymap similarity index 100% rename from app/tests/gresc/gresc-press-release/native_posix_64.keymap rename to app/tests/gresc/gresc-press-release/native_sim.keymap diff --git a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap b/app/tests/gresc/gresc-two-instances/native_sim.keymap similarity index 100% rename from app/tests/gresc/gresc-two-instances/native_posix_64.keymap rename to app/tests/gresc/gresc-two-instances/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/balanced/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/6-retro-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap rename to app/tests/hold-tap/balanced/6-retro-tap/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap b/app/tests/hold-tap/balanced/many-nested/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap rename to app/tests/hold-tap/balanced/many-nested/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/6-retro-tap/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/1-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/1-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/1-tap/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/1-tap/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/2-hold/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/2-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/2-hold/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/2-hold/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/3-linger/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/3-linger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/3-linger/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/3-linger/native_sim.keymap diff --git a/app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_posix_64.keymap b/app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_posix_64.keymap rename to app/tests/hold-tap/hold-while-undecided/4-linger-sk/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_sim.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_sim.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_sim.keymap diff --git a/app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap b/app/tests/key-repeat/ignore-other-usage-page-events/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap rename to app/tests/key-repeat/ignore-other-usage-page-events/native_sim.keymap diff --git a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap b/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap deleted file mode 100644 index 9078f304d..000000000 --- a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; -}; \ No newline at end of file diff --git a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap b/app/tests/key-repeat/press-and-release-after-key-usage/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap rename to app/tests/key-repeat/press-and-release-after-key-usage/native_sim.keymap diff --git a/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap b/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap rename to app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_sim.keymap diff --git a/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap b/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap rename to app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_sim.keymap diff --git a/app/tests/key-repeat/tap-when-rolling/native_posix.keymap b/app/tests/key-repeat/tap-when-rolling/native_posix.keymap deleted file mode 100644 index bb129d14c..000000000 --- a/app/tests/key-repeat/tap-when-rolling/native_posix.keymap +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; -}; diff --git a/app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap b/app/tests/key-repeat/tap-when-rolling/native_sim.keymap similarity index 100% rename from app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap rename to app/tests/key-repeat/tap-when-rolling/native_sim.keymap diff --git a/app/tests/keypress/kp-press-release/native_posix_64.keymap b/app/tests/keypress/kp-press-release/native_sim.keymap similarity index 100% rename from app/tests/keypress/kp-press-release/native_posix_64.keymap rename to app/tests/keypress/kp-press-release/native_sim.keymap diff --git a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap b/app/tests/keytoggle/kt-alt-tab/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap rename to app/tests/keytoggle/kt-alt-tab/native_sim.keymap diff --git a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap b/app/tests/keytoggle/kt-modded-alpha/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap rename to app/tests/keytoggle/kt-modded-alpha/native_sim.keymap diff --git a/app/tests/keytoggle/kt-off/native_posix_64.keymap b/app/tests/keytoggle/kt-off/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-off/native_posix_64.keymap rename to app/tests/keytoggle/kt-off/native_sim.keymap diff --git a/app/tests/keytoggle/kt-on/native_posix_64.keymap b/app/tests/keytoggle/kt-on/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-on/native_posix_64.keymap rename to app/tests/keytoggle/kt-on/native_sim.keymap diff --git a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.conf b/app/tests/keytoggle/kt-press-release-nkro/native_sim.conf similarity index 100% rename from app/tests/keytoggle/kt-press-release-nkro/native_posix_64.conf rename to app/tests/keytoggle/kt-press-release-nkro/native_sim.conf diff --git a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release-nkro/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap rename to app/tests/keytoggle/kt-press-release-nkro/native_sim.keymap diff --git a/app/tests/keytoggle/kt-press-release/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release/native_sim.keymap similarity index 100% rename from app/tests/keytoggle/kt-press-release/native_posix_64.keymap rename to app/tests/keytoggle/kt-press-release/native_sim.keymap diff --git a/app/tests/macros/basic/native_posix_64.keymap b/app/tests/macros/basic/native_sim.keymap similarity index 100% rename from app/tests/macros/basic/native_posix_64.keymap rename to app/tests/macros/basic/native_sim.keymap diff --git a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_sim.keymap similarity index 100% rename from app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap rename to app/tests/macros/mo-plus-modifier-from-hold-tap/native_sim.keymap diff --git a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-macro/native_sim.keymap similarity index 100% rename from app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap rename to app/tests/macros/mo-plus-modifier-macro/native_sim.keymap diff --git a/app/tests/macros/place-holder-parameters/native_posix_64.keymap b/app/tests/macros/place-holder-parameters/native_sim.keymap similarity index 100% rename from app/tests/macros/place-holder-parameters/native_posix_64.keymap rename to app/tests/macros/place-holder-parameters/native_sim.keymap diff --git a/app/tests/macros/press-mid-macro/native_posix_64.keymap b/app/tests/macros/press-mid-macro/native_sim.keymap similarity index 100% rename from app/tests/macros/press-mid-macro/native_posix_64.keymap rename to app/tests/macros/press-mid-macro/native_sim.keymap diff --git a/app/tests/macros/press-release/native_posix_64.keymap b/app/tests/macros/press-release/native_sim.keymap similarity index 100% rename from app/tests/macros/press-release/native_posix_64.keymap rename to app/tests/macros/press-release/native_sim.keymap diff --git a/app/tests/macros/timing-override/native_posix_64.keymap b/app/tests/macros/timing-override/native_sim.keymap similarity index 100% rename from app/tests/macros/timing-override/native_posix_64.keymap rename to app/tests/macros/timing-override/native_sim.keymap diff --git a/app/tests/macros/wait-macro-release/native_posix_64.keymap b/app/tests/macros/wait-macro-release/native_sim.keymap similarity index 100% rename from app/tests/macros/wait-macro-release/native_posix_64.keymap rename to app/tests/macros/wait-macro-release/native_sim.keymap diff --git a/app/tests/matrix-input/kp-press-release/events.patterns b/app/tests/matrix-input/kp-press-release/events.patterns new file mode 100644 index 000000000..833100f6a --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/matrix-input/kp-press-release/keycode_events.snapshot b/app/tests/matrix-input/kp-press-release/keycode_events.snapshot new file mode 100644 index 000000000..259501ba3 --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/keycode_events.snapshot @@ -0,0 +1,2 @@ +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/matrix-input/kp-press-release/native_sim.conf b/app/tests/matrix-input/kp-press-release/native_sim.conf new file mode 100644 index 000000000..9ce5b96b3 --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/native_sim.conf @@ -0,0 +1 @@ +CONFIG_INPUT=y \ No newline at end of file diff --git a/app/tests/matrix-input/kp-press-release/native_sim.keymap b/app/tests/matrix-input/kp-press-release/native_sim.keymap new file mode 100644 index 000000000..14e82d13f --- /dev/null +++ b/app/tests/matrix-input/kp-press-release/native_sim.keymap @@ -0,0 +1,60 @@ +#include +#include +#include +#include + +/delete-node/ &kscan; + +/ { + physical_layout: physical_layout { + display-name = "Layout"; + compatible = "zmk,physical-layout"; + input = <&mock_matrix_input>; + transform = <&matrix_transform0>; + }; + + chosen { + /delete-property/ zmk,kscan; + + // zmk,matrix-input = &mock_matrix_input; + }; + + matrix_transform0: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <20>; + rows = <5>; + + + map = < + RC(0,0) RC(0,1) + RC(1,0) RC(1,1) + >; + }; + + mock_matrix_input: mock_matrix_input { + compatible = "zmk,input-mock"; + + event-startup-delay = <100>; + event-period = <2000>; + events + = + , + , + , + , + , + ; + exit-after; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp B &kp C + &kp D &kp E + >; + }; + }; +}; diff --git a/app/tests/mod-morph/1-no-morph/native_posix_64.keymap b/app/tests/mod-morph/1-no-morph/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/1-no-morph/native_posix_64.keymap rename to app/tests/mod-morph/1-no-morph/native_sim.keymap diff --git a/app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap b/app/tests/mod-morph/2a-masked-morph/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap rename to app/tests/mod-morph/2a-masked-morph/native_sim.keymap diff --git a/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap b/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap rename to app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_sim.keymap diff --git a/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap b/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap rename to app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_sim.keymap diff --git a/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap b/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap rename to app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_sim.keymap diff --git a/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap b/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap rename to app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_sim.keymap diff --git a/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap b/app/tests/mod-morph/3-unmasked-morph/native_sim.keymap similarity index 100% rename from app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap rename to app/tests/mod-morph/3-unmasked-morph/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_sim.keymap diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_sim.keymap diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap rename to app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_sim.keymap diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap rename to app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_sim.keymap diff --git a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_sim.keymap similarity index 100% rename from app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap rename to app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_sim.keymap diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap rename to app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_sim.keymap diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_sim.keymap similarity index 100% rename from app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap rename to app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_sim.keymap diff --git a/app/tests/momentary-layer/1-normal/native_posix_64.keymap b/app/tests/momentary-layer/1-normal/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/1-normal/native_posix_64.keymap rename to app/tests/momentary-layer/1-normal/native_sim.keymap diff --git a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/2-early-key-release/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap rename to app/tests/momentary-layer/2-early-key-release/native_sim.keymap diff --git a/app/tests/momentary-layer/3-covered/native_posix_64.keymap b/app/tests/momentary-layer/3-covered/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/3-covered/native_posix_64.keymap rename to app/tests/momentary-layer/3-covered/native_sim.keymap diff --git a/app/tests/momentary-layer/4-nested/native_posix_64.keymap b/app/tests/momentary-layer/4-nested/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/4-nested/native_posix_64.keymap rename to app/tests/momentary-layer/4-nested/native_sim.keymap diff --git a/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/5-nested-early-key-release/native_sim.keymap similarity index 100% rename from app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap rename to app/tests/momentary-layer/5-nested-early-key-release/native_sim.keymap diff --git a/app/tests/none/layered/native_posix_64.keymap b/app/tests/none/layered/native_sim.keymap similarity index 100% rename from app/tests/none/layered/native_posix_64.keymap rename to app/tests/none/layered/native_sim.keymap diff --git a/app/tests/none/normal/native_posix.keymap b/app/tests/none/normal/native_sim.keymap similarity index 100% rename from app/tests/none/normal/native_posix.keymap rename to app/tests/none/normal/native_sim.keymap diff --git a/app/tests/pointing/mkp/native_posix_64.keymap b/app/tests/pointing/mkp/native_posix_64.keymap deleted file mode 100644 index cec0b6e1b..000000000 --- a/app/tests/pointing/mkp/native_posix_64.keymap +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { - bindings = < - &mkp LCLK &none - &none &mkp RCLK - >; - }; - }; -}; - - -&kscan { - events = < - ZMK_MOCK_PRESS (0,0,100) - ZMK_MOCK_PRESS (1,1,100) - ZMK_MOCK_RELEASE(1,1, 10) - ZMK_MOCK_RELEASE(0,0, 10) - >; -}; diff --git a/app/tests/pointing/mkp/native_posix_64.conf b/app/tests/pointing/mkp/native_sim.conf similarity index 100% rename from app/tests/pointing/mkp/native_posix_64.conf rename to app/tests/pointing/mkp/native_sim.conf diff --git a/app/tests/pointing/mkp/native_posix.keymap b/app/tests/pointing/mkp/native_sim.keymap similarity index 100% rename from app/tests/pointing/mkp/native_posix.keymap rename to app/tests/pointing/mkp/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/move_diagonal/native_posix_64.conf b/app/tests/pointing/mouse-move/move_diagonal/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/move_diagonal/native_posix_64.conf rename to app/tests/pointing/mouse-move/move_diagonal/native_sim.conf diff --git a/app/tests/pointing/mouse-move/move_diagonal/native_posix_64.keymap b/app/tests/pointing/mouse-move/move_diagonal/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/move_diagonal/native_posix_64.keymap rename to app/tests/pointing/mouse-move/move_diagonal/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/move_x/native_posix_64.conf b/app/tests/pointing/mouse-move/move_x/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/move_x/native_posix_64.conf rename to app/tests/pointing/mouse-move/move_x/native_sim.conf diff --git a/app/tests/pointing/mouse-move/move_x/native_posix_64.keymap b/app/tests/pointing/mouse-move/move_x/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/move_x/native_posix_64.keymap rename to app/tests/pointing/mouse-move/move_x/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/move_y/native_posix_64.conf b/app/tests/pointing/mouse-move/move_y/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/move_y/native_posix_64.conf rename to app/tests/pointing/mouse-move/move_y/native_sim.conf diff --git a/app/tests/pointing/mouse-move/move_y/native_posix_64.keymap b/app/tests/pointing/mouse-move/move_y/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/move_y/native_posix_64.keymap rename to app/tests/pointing/mouse-move/move_y/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/behaviors_basic/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/behaviors_basic/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/behaviors_basic/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/behaviors_basic/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/behaviors_basic/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/behaviors_hold_tap/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/move_diagonal_scaling/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/move_diagonal_xy_invert/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/move_diagonal_xy_swap/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/temp_layer/3-require-prior-idle-ms/native_sim.keymap diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_posix_64.conf b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_posix_64.conf rename to app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.conf diff --git a/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_posix_64.keymap b/app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_posix_64.keymap rename to app/tests/pointing/mouse-move/processors/temp_layer/4-deactivated-layer-externally/native_sim.keymap diff --git a/app/tests/pointing/mouse-scroll/move_diagonal/native_posix_64.conf b/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-scroll/move_diagonal/native_posix_64.conf rename to app/tests/pointing/mouse-scroll/move_diagonal/native_sim.conf diff --git a/app/tests/pointing/mouse-scroll/move_diagonal/native_posix_64.keymap b/app/tests/pointing/mouse-scroll/move_diagonal/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-scroll/move_diagonal/native_posix_64.keymap rename to app/tests/pointing/mouse-scroll/move_diagonal/native_sim.keymap diff --git a/app/tests/pointing/mouse-scroll/move_hwheel/native_posix_64.conf b/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-scroll/move_hwheel/native_posix_64.conf rename to app/tests/pointing/mouse-scroll/move_hwheel/native_sim.conf diff --git a/app/tests/pointing/mouse-scroll/move_hwheel/native_posix_64.keymap b/app/tests/pointing/mouse-scroll/move_hwheel/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-scroll/move_hwheel/native_posix_64.keymap rename to app/tests/pointing/mouse-scroll/move_hwheel/native_sim.keymap diff --git a/app/tests/pointing/mouse-scroll/move_wheel/native_posix_64.conf b/app/tests/pointing/mouse-scroll/move_wheel/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-scroll/move_wheel/native_posix_64.conf rename to app/tests/pointing/mouse-scroll/move_wheel/native_sim.conf diff --git a/app/tests/pointing/mouse-scroll/move_wheel/native_posix_64.keymap b/app/tests/pointing/mouse-scroll/move_wheel/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-scroll/move_wheel/native_posix_64.keymap rename to app/tests/pointing/mouse-scroll/move_wheel/native_sim.keymap diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_posix_64.conf b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_posix_64.conf rename to app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.conf diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_posix_64.keymap b/app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_posix_64.keymap rename to app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_sim.keymap diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_posix_64.conf b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.conf similarity index 100% rename from app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_posix_64.conf rename to app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.conf diff --git a/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_posix_64.keymap b/app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.keymap similarity index 100% rename from app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_posix_64.keymap rename to app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_sim.keymap diff --git a/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/1-os-dn-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap rename to app/tests/sticky-keys/1-os-dn-up/native_sim.keymap diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods-quick-release/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap rename to app/tests/sticky-keys/10-callum-mods-quick-release/native_sim.keymap diff --git a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap rename to app/tests/sticky-keys/10-callum-mods/native_sim.keymap diff --git a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap b/app/tests/sticky-keys/10-sl-sl-kp/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap rename to app/tests/sticky-keys/10-sl-sl-kp/native_sim.keymap diff --git a/app/tests/sticky-keys/11-lazy-timeout-during/native_posix_64.keymap b/app/tests/sticky-keys/11-lazy-timeout-during/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/11-lazy-timeout-during/native_posix_64.keymap rename to app/tests/sticky-keys/11-lazy-timeout-during/native_sim.keymap diff --git a/app/tests/sticky-keys/11-lazy-timeout/native_posix_64.keymap b/app/tests/sticky-keys/11-lazy-timeout/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/11-lazy-timeout/native_posix_64.keymap rename to app/tests/sticky-keys/11-lazy-timeout/native_sim.keymap diff --git a/app/tests/sticky-keys/11-lazy/native_posix_64.keymap b/app/tests/sticky-keys/11-lazy/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/11-lazy/native_posix_64.keymap rename to app/tests/sticky-keys/11-lazy/native_sim.keymap diff --git a/app/tests/sticky-keys/12-macro/native_posix_64.keymap b/app/tests/sticky-keys/12-macro/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/12-macro/native_posix_64.keymap rename to app/tests/sticky-keys/12-macro/native_sim.keymap diff --git a/app/tests/sticky-keys/12-same-position-mods/native_posix_64.keymap b/app/tests/sticky-keys/12-same-position-mods/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/12-same-position-mods/native_posix_64.keymap rename to app/tests/sticky-keys/12-same-position-mods/native_sim.keymap diff --git a/app/tests/sticky-keys/12-same-position-sk-sl/native_posix_64.keymap b/app/tests/sticky-keys/12-same-position-sk-sl/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/12-same-position-sk-sl/native_posix_64.keymap rename to app/tests/sticky-keys/12-same-position-sk-sl/native_sim.keymap diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap rename to app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_sim.keymap diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap rename to app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_sim.keymap diff --git a/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap b/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap b/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap rename to app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_sim.keymap diff --git a/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap rename to app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_sim.keymap diff --git a/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap b/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap rename to app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_sim.keymap diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap rename to app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_sim.keymap diff --git a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap rename to app/tests/sticky-keys/8-lsk-osk-combination/native_sim.keymap diff --git a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_sim.keymap similarity index 100% rename from app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap rename to app/tests/sticky-keys/9-sk-dn-up-dn-up/native_sim.keymap diff --git a/app/tests/tap-dance/1a-tap1/native_posix_64.keymap b/app/tests/tap-dance/1a-tap1/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/1a-tap1/native_posix_64.keymap rename to app/tests/tap-dance/1a-tap1/native_sim.keymap diff --git a/app/tests/tap-dance/1b-tap2/native_posix_64.keymap b/app/tests/tap-dance/1b-tap2/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/1b-tap2/native_posix_64.keymap rename to app/tests/tap-dance/1b-tap2/native_sim.keymap diff --git a/app/tests/tap-dance/1c-tap3/native_posix_64.keymap b/app/tests/tap-dance/1c-tap3/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/1c-tap3/native_posix_64.keymap rename to app/tests/tap-dance/1c-tap3/native_sim.keymap diff --git a/app/tests/tap-dance/2a-hold1/native_posix_64.keymap b/app/tests/tap-dance/2a-hold1/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/2a-hold1/native_posix_64.keymap rename to app/tests/tap-dance/2a-hold1/native_sim.keymap diff --git a/app/tests/tap-dance/2b-hold2/native_posix_64.keymap b/app/tests/tap-dance/2b-hold2/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/2b-hold2/native_posix_64.keymap rename to app/tests/tap-dance/2b-hold2/native_sim.keymap diff --git a/app/tests/tap-dance/2c-hold3/native_posix_64.keymap b/app/tests/tap-dance/2c-hold3/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/2c-hold3/native_posix_64.keymap rename to app/tests/tap-dance/2c-hold3/native_sim.keymap diff --git a/app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap b/app/tests/tap-dance/3a-tap-int-mid/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap rename to app/tests/tap-dance/3a-tap-int-mid/native_sim.keymap diff --git a/app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap b/app/tests/tap-dance/3b-tap-int-seq/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap rename to app/tests/tap-dance/3b-tap-int-seq/native_sim.keymap diff --git a/app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap b/app/tests/tap-dance/3c-tap-int-after/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap rename to app/tests/tap-dance/3c-tap-int-after/native_sim.keymap diff --git a/app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap b/app/tests/tap-dance/3d-hold-int-mid/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap rename to app/tests/tap-dance/3d-hold-int-mid/native_sim.keymap diff --git a/app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap b/app/tests/tap-dance/3e-hold-int-seq/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap rename to app/tests/tap-dance/3e-hold-int-seq/native_sim.keymap diff --git a/app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap b/app/tests/tap-dance/3f-hold-int-after/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap rename to app/tests/tap-dance/3f-hold-int-after/native_sim.keymap diff --git a/app/tests/tap-dance/4a-single/native_posix_64.keymap b/app/tests/tap-dance/4a-single/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/4a-single/native_posix_64.keymap rename to app/tests/tap-dance/4a-single/native_sim.keymap diff --git a/app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap b/app/tests/tap-dance/5a-tdint-mid/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap rename to app/tests/tap-dance/5a-tdint-mid/native_sim.keymap diff --git a/app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap b/app/tests/tap-dance/5b-tdint-seq/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap rename to app/tests/tap-dance/5b-tdint-seq/native_sim.keymap diff --git a/app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap b/app/tests/tap-dance/5c-tdint-after/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap rename to app/tests/tap-dance/5c-tdint-after/native_sim.keymap diff --git a/app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap b/app/tests/tap-dance/5d-tdint-multiple/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap rename to app/tests/tap-dance/5d-tdint-multiple/native_sim.keymap diff --git a/app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap b/app/tests/tap-dance/6-combo-tap2/native_sim.keymap similarity index 100% rename from app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap rename to app/tests/tap-dance/6-combo-tap2/native_sim.keymap diff --git a/app/tests/to-layer/normal/native_posix_64.keymap b/app/tests/to-layer/normal/native_sim.keymap similarity index 100% rename from app/tests/to-layer/normal/native_posix_64.keymap rename to app/tests/to-layer/normal/native_sim.keymap diff --git a/app/tests/toggle-layer/early-key-release/native_posix_64.keymap b/app/tests/toggle-layer/early-key-release/native_sim.keymap similarity index 100% rename from app/tests/toggle-layer/early-key-release/native_posix_64.keymap rename to app/tests/toggle-layer/early-key-release/native_sim.keymap diff --git a/app/tests/toggle-layer/normal/native_posix_64.keymap b/app/tests/toggle-layer/normal/native_sim.keymap similarity index 100% rename from app/tests/toggle-layer/normal/native_posix_64.keymap rename to app/tests/toggle-layer/normal/native_sim.keymap diff --git a/app/tests/toggle-layer/toggle-mode-off/native_posix_64.keymap b/app/tests/toggle-layer/toggle-mode-off/native_sim.keymap similarity index 100% rename from app/tests/toggle-layer/toggle-mode-off/native_posix_64.keymap rename to app/tests/toggle-layer/toggle-mode-off/native_sim.keymap diff --git a/app/tests/toggle-layer/toggle-mode-on/native_posix_64.keymap b/app/tests/toggle-layer/toggle-mode-on/native_sim.keymap similarity index 100% rename from app/tests/toggle-layer/toggle-mode-on/native_posix_64.keymap rename to app/tests/toggle-layer/toggle-mode-on/native_sim.keymap diff --git a/app/tests/transparent/layered/native_posix_64.keymap b/app/tests/transparent/layered/native_sim.keymap similarity index 100% rename from app/tests/transparent/layered/native_posix_64.keymap rename to app/tests/transparent/layered/native_sim.keymap diff --git a/app/tests/transparent/normal/native_posix_64.keymap b/app/tests/transparent/normal/native_posix_64.keymap deleted file mode 100644 index 502f7ccc4..000000000 --- a/app/tests/transparent/normal/native_posix_64.keymap +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include -#include -#include "../behavior_keymap.dtsi" - -&kscan { - events = ; -}; \ No newline at end of file diff --git a/app/tests/none/normal/native_posix_64.keymap b/app/tests/transparent/normal/native_sim.keymap similarity index 100% rename from app/tests/none/normal/native_posix_64.keymap rename to app/tests/transparent/normal/native_sim.keymap diff --git a/app/tests/wpm/1-single_keypress/native_posix_64.conf b/app/tests/wpm/1-single_keypress/native_sim.conf similarity index 100% rename from app/tests/wpm/1-single_keypress/native_posix_64.conf rename to app/tests/wpm/1-single_keypress/native_sim.conf diff --git a/app/tests/wpm/1-single_keypress/native_posix_64.keymap b/app/tests/wpm/1-single_keypress/native_sim.keymap similarity index 100% rename from app/tests/wpm/1-single_keypress/native_posix_64.keymap rename to app/tests/wpm/1-single_keypress/native_sim.keymap diff --git a/app/tests/wpm/2-multiple_keypress/native_posix_64.conf b/app/tests/wpm/2-multiple_keypress/native_sim.conf similarity index 100% rename from app/tests/wpm/2-multiple_keypress/native_posix_64.conf rename to app/tests/wpm/2-multiple_keypress/native_sim.conf diff --git a/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap b/app/tests/wpm/2-multiple_keypress/native_sim.keymap similarity index 100% rename from app/tests/wpm/2-multiple_keypress/native_posix_64.keymap rename to app/tests/wpm/2-multiple_keypress/native_sim.keymap diff --git a/app/west.yml b/app/west.yml index ce0785e33..d177f2bd1 100644 --- a/app/west.yml +++ b/app/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zephyr remote: zmkfirmware - revision: v3.5.0+zmk-fixes + revision: v4.1.0+zmk-fixes clone-depth: 1 import: name-blocklist: @@ -18,7 +18,6 @@ manifest: - hal_microchip - hal_nxp - hal_openisa - - hal_silabs - hal_xtensa - hal_st - hal_ti @@ -29,13 +28,14 @@ manifest: - openthread - edtt - trusted-firmware-m - - name: nanopb - revision: 8c60555d6277a0360c876bd85d491fc4fb0cd74a - path: modules/lib/nanopb + - name: lvgl + revision: f1db87ee98f1810328a8419572fa42a3b5f352ae + path: modules/lib/gui/lvgl remote: zmkfirmware - name: zmk-studio-messages revision: 6cb4c283e76209d59c45fbcb218800cd19e9339d path: modules/msgs/zmk-studio-messages remote: zmkfirmware + group-filter: [+optional] self: west-commands: scripts/west-commands.yml diff --git a/docs/blog/2025-xx-xx-zephyr-4-1.md b/docs/blog/2025-xx-xx-zephyr-4-1.md new file mode 100644 index 000000000..9d57f35b1 --- /dev/null +++ b/docs/blog/2025-xx-xx-zephyr-4-1.md @@ -0,0 +1,455 @@ +--- +title: "Zephyr 4.1 Update" +authors: nmunnich +tags: [firmware, zephyr, core] +--- + +We're happy to announce that after a long wait, ZMK's `main` branch is now running [Zephyr 4.1](https://docs.zephyrproject.org/latest/releases/release-notes-4.1.html)! + + + +Zephyr 4.1 is a large leap forward from our previous version of 3.5, featuring: + +- Support for lots of new SoCs, boards, and shields, such as the WCH CH32V003, the Raspberry Pi Pico 2, and [many many more](https://docs.zephyrproject.org/4.1.0/boards/index.html#boards). +- Hardware Model V2 (HWMv2), providing better support for SoCs which have multiple cores on the same chip, such as the nRF5340. +- Lots of new drivers for chips such as the nPM1300. + +This was a very large undertaking, and a big congratulations and thanks to [petejohanson] is due for all of his hard work in making this possible. + +After we have verified functionality, ironed out any major bugs, and given any third party module maintainers time to update their code, we will be releasing ZMK `v0.4` as the first version to include this Zephyr version update. + +**All** out-of-tree keyboards will need to be updated to use HWMv2. If you maintain such a keyboard, you can find instructions on doing so [below](#moving-to-hwmv2). + +## Switching To the Previous Release + +Some readers may be coming here because the above changes have _broken_ their builds. ZMK uses a formal release process that allows users to build against a specific release, instead of following the unstable/development version found in the `main` branch. However, since this is a relatively new process, many users may still be tracking `main`. + +For all users, except those willing to accept periodic breaks they need to track down, we highly recommend [pinning your ZMK version](./2025-06-20-pinned-zmk.md). Doing so will allow you to avoid any issues related to the Zephyr upgrade, and allow you to choose when to upgrade to a future ZMK release when you are ready. + +## Getting The Changes + +Since the changes are merged to ZMK `main`, you'll need to be using that version of ZMK to use/tests these changes. + +### Local Development + +To get the update, first pull the latest ZMK `main`: + +``` +git checkout main && git pull main +``` + +Once you have the updated ZMK code, update the referenced modules: + +``` +west update +``` + +To be sure you've got all the updated Python packages needed to build ZMK, use west again: + +``` +west packages pip --install +``` + +### GitHub Actions Builds + +To test these changes, you need to verify that the `west.yml` for your build is using a `revision: main` property. Once this is verified, simply run a new build and the updated Zephyr version will be used. + +## Board Revisions + +As part of this change, ZMK is now using board/shield revisions, rather than duplicate board/shield definitions. This means that instead of having e.g. `nice_nano`, and `nice_nano_v2`, we only have `nice_nano`, which by default points to the `2.0.0` revision. To point to the original Nice!Nano V1, you would need to use `nice_nano@1.0.0` where you would have previously used `nice_nano`. Of course, you could also put `nice_nano@2.0.0` if you wished to make that explicit, instead of merely replacing `nice_nano_v2` with `nice_nano`. Some boards, such as the `nrfmicro`, also have additional _board qualifiers_ such as the choice between multiple SoCs. Board qualifiers must always be specified, and do not have defaults. See [Zephyr's overview](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#board-terminology) for more information on board qualifiers. The below table provides an overview of some of the differences in in-tree boards we have in ZMK, and how they are selected in the new build system. The shorthand shows the minimum needed to build with a specific board, taking into account defaults. + +- nice!nano (`nice_nano`) + - `nice_nano` -> `nice_nano@1.0.0` (short: `nice_nano@1`) + - `nice_nano_v2` -> `nice_nano@2.0.0` (short: `nice_nano`) +- nRFMicro (`nrfmicro/nrf52840`) + - `nrfmicro_11` -> `nrfmicro@1.1.0/nrf52840` (short: `nrfmicro@1.1/nrf52840`) + - `nrfmicro_11_flipped` -> `nrfmicro@1.1.0/nrf52840/flipped` (short: `nrfmicro@1.1/nrf52840/flipped`) + - `nrfmicro_13` -> `nrfmicro@1.3.0/nrf52840` (short: `nrfmicro/nrf52840`) + - `nrfmicro_13_52833` -> `nrfmicro@1.3.0/nrf52833` (short: `nrfmicro/nrf52833`) +- Mikoto (`mikoto`) + - `mikoto` -> `mikoto@5.20.0` (short: `mikoto`) + - `mikoto@6.1` -> `mikoto@6.1.0` (short: `mikoto@6`) + - `mikoto@7.2` -> `mikoto@7.2.0` (short: `mikoto@7`) +- XIAO RP2040 (`xiao_rp2040`) + - `seeeduino_xiao_rp2040` -> `xiao_rp2040` +- XIAO nRF52840/BLE (`xiao_ble`) + - `seeeduino_xiao_ble` -> `xiao_ble` +- BT60 (`bt60`) + - `bt60_v1` -> `bt60@1.0.0` + - `bt60_v2` -> `bt60@2.0.0` + - `bt60_hs` -> `bt60_hs` +- Planck (`planck`) + - `planck_rev6` -> `planck` +- BDN9 (`bdn9`) + - `bdn9_rev2` -> `bdn9` +- Ferris Rev2 (`ferris`) + - `ferris_rev02` -> `ferris@2.0.0` (short: `ferris`) + +The boards above are those which have changed in ZMK's tree, with the addition of the very popular XIAO series. For other boards in Zephyr's tree, please refer to the Zephyr documentation or source files directly. + +## Getting The Changes + +### User Config Repositories Using GitHub Actions + +Existing user repositories which are currently running ZMK's `main` branch will receive the changes automatically when rebuilding. + +Any user repositories created on or after `2025-07-03` are currently pinned to the most recent ZMK release. You will need to change over to `main` to get these changes immediately, or wait for `v0.4` and upgrade your version then. +See the recent [blog post on pinning ZMK versions](./2025-06-20-pinned-zmk.md) for more information. + +Likewise, if you are currently on `main` but do not wish to upgrade yet, please pin your ZMK version to `v0.3` by following the instructions in said blog post. + +### VS Code & Docker (Dev Container) + +If you build locally using VS Code & Docker then: + +- Pull the latest ZMK `main` with `git pull` for your ZMK checkout +- Reload the project +- If you are prompted to rebuild the remote container, click `Rebuild` +- Otherwise, press `F1` and run `Remote Containers: Rebuild Container` +- Once the container has rebuilt and reloaded, run `west update` to pull the updated Zephyr version and its dependencies. + +Once the container has rebuilt, VS Code will be running the 4.1 Docker image. + +### Local Host Development + +The following steps will get you building ZMK locally against Zephyr 4.1: + +- Run the updated [toolchain installation](/docs/development/local-toolchain/setup) steps, and once completed, remove the previously installed SDK version (optional, existing SDK should still work) +- Install the latest version of `west` by running `pip3 install --user --update west`. +- Pull the latest ZMK `main` with `git pull` for your ZMK checkout +- Run `west update` to pull the updated Zephyr version and its dependencies + +From there, you should be ready to build as normal! + +## Moving To HWMv2 + +The move to HWMv2 has already been completed for all boards in ZMK's `main` branch. For out-of-tree boards, those need to be converted using either an automated script provided by the Zephyr project, or manually. + +:::note + +This _only_ applies to boards. Shields do not need any changes to account for the move to HWMv2. + +::: + +### Board Upgrade Script + +The Zephyr project provides a script to automate updating a board to HWMv2. To run the script, you'll need to have a local [development setup](/docs/development/local-toolchain/setup/) ready to use. You'll need to ensure you've updated to the new ZMK version and run `west update` to ensure you've got the new Zephyr version with the script available. + +:::note + +The board upgrade script does _not_ work well with split designs. If upgrading a split keyboard board definition, you'll need to update it by hand. + +::: + +The following parameters are relevant for out-of-tree boards: + +- `--board-root ` -- The board ID to update, e.g. `tenbit`. +- `-v ` -- The vendor for the board, this should be a vendor ID, or designer nickname. +- `-g ` -- The name of the group directory under which to place the new board files. Typically this will match the vendor ID. +- `-s ` -- The SoC identifier, e.g. `nrf52840`, `rp2040`, `stm32f411xe`. + +For example: + +```sh +$ python3 zmk/zephyr/scripts/utils/board_v1_to_v2.py \ + --board-root my-zmk-module -b my_board \ + -v my_company -g my_group -s nrf52840 +``` + +### Migrating an Out-Of-Tree Board Manually + +The following steps can be completed manually if you encounter issues with the upgrade script, or don't have a local development setup available. + +#### Vendor Directory + +Boards no longer need to live in a parent directory named after the architecture of the board (.e.g `boards/arm`), and should instead be placed in a vendor/designer named directory (e.g. `boards/my_company`). + +#### Write a `board.yml` + +In your board's folder, next to other files such as `.dts`, add a file called `board.yml`. This file should have the following structure: + +```yml title="board.yml" +board: + name: + vendor: + revision: + format: + default: + exact: + revisions: + - name: + - name: + ... + socs: + - name: + variants: + - name: + - name: + variants: + - name: + ... + - name: + ... +``` + +In the above: + +- `` is the name of the board as specified when selecting a build target, such as `nice_nano`. +- `` is the name of the board's vendor, such as `nicekeyboards`. If you are an individual, rather than acting as an organization, please use your name/online id/similar (e.g. `zhiayang` in the case of the `mikoto`). This value should match the vendor directory name that the board definition folder is placed in the previous section. +- `revision` defines any board revisions. See [Zephyr's overview](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#multiple-board-revisions) for more information on board revisions. If your board does not have any revisions, you can omit this section. +- `socs` lists all SoCs that your board could have, e.g. `nrf52840` or `stm32f072xb`. If your board only has one SoC available and no variants, then the SoC can be omitted when selecting a build target, but must still be specified in this file. For an understanding of SoC variants, refer to the Zephyr documentation. + +If you need to define multiple boards in the same `board.yml`, such as for a split keyboard, you can do so like this: + +```yml +boards: + - name: + ... + - name: + ... +``` + +#### Revision adjustments + +If, as a side effect of adding revisions, you renamed the board (e.g. `ferris_rev02` -> `ferris`), you should adjust the other places where the board name was previously -- `.zmk.yml` and `.yaml`. You may also need to rearrange/consolidate other Kconfig flags and devicetree nodes. See [the Zephyr documentation](https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#multiple-board-revisions) for more details. + +#### Adjust Kconfig files + +##### `Kconfig.` + +Previously, your board folder will have had a file named `Kconfig.board`. This should be renamed to `Kconfig.`, where `` is the board name given in `board.yml`. The contents of this file will previously look something like this: + +```title="Kconfig.board" +config BOARD_FERRIS + bool "Ferris rev 0.2" + depends on SOC_STM32F072XB +``` + +Remove the `bool` and change the `depends on` to a `select`: + +```title="Kconfig.ferris" +config BOARD_FERRIS + select SOC_STM32F072XB +``` + +If you had multiple boards specified for different SoCs, you should consolidate them to one: + +```title="Kconfig.nrfmicro" +config BOARD_NRFMICRO + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840 + select SOC_NRF52840_QIAA if BOARD_NRFMICRO_NRF52840_FLIPPED + select SOC_NRF52833_QIAA if BOARD_NRFMICRO_NRF52833 +``` + +##### `_defconfig` + +Previously, this file was used to select the board and SOC with Kconfig flags. All such selections should be removed from this file. For example, all of the below flags should be removed: + +``` +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52833_QIAA=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_=y +CONFIG_SOC_SERIES_STM32F0X=y +CONFIG_SOC_STM32F072XB=y +``` + +#### DeviceTree changes + +For most boards, aside from rearranging due to moving to revisions, there should be no changes necessary to the devicetree nodes. However, if your board makes use of upstream Zephyr drivers, these may have been renamed (e.g. Ferris' `microchip,mcp230xx` has been changed to `microchip,mcp23017`). + +## General Board/Shield Changes + +A few other changes, unrelated to the HWMv2 move, may impact out-of-tree boards/shields: + +### Bootloader Setup + +With the version bump, the previous method to enable `&bootloader` has been disabled. Instead, ZMK is introducing _boot retention_, which as a side effect also enables `&bootloader` for SoCs which previously didn't work with said behavior, such as the STM32F072. To set up boot retention for your board, please read through [the dedicated page](/docs/development/hardware-integration/bootloader). + +### nRF52840 NFC Pins as GPIO + +If your board or shield is using either of the nRF52840 NFC pins, as is often done with the XIAO nRF52840, you'll need to perform an additional update. + +#### Remove deprecated Kconfig symbol + +Previously, using those pins required enabling `CONFIG_NFCT_PINS_AS_GPIOS=y` in some Kconfig file. That Kconfig symbol has been removed, so remove any use of that Kconfig symbol from your board/shield. + +#### Set up NFC GPIO devicetree + +The following should be added to the board or shield's devicetree, e.g. in `.dtsi` or in a board specific shield overlay file like `/boards/xiao_ble.overlay`: + +```dts +&uicr { + nfct-pins-as-gpios; +}; +``` + +### nRF52840 DC/DC Modes + +For boards with the necessary additional hardware to enable DC/DC modes for the reg0 and/or reg1 power stages, the configuration to enable DC/DC has also moved out of Kconfig and into devicetree. + +#### Remove Kconfig Settings + +Usually, the DC/DC modes were enabled in the board's `Kconfig.defconfig` file, looking like: + +```Kconfig +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_MY_BOARD) + +config BOARD_ENABLE_DCDC_HV + bool "High voltage DCDC converter" + select SOC_DCDC_NRF52X_HV + default n + depends on (BOARD_MY_BOARD) +``` + +Remove the lines from the file that look like above, or remove the `Kconfig.defconfig` file entirely if that is the only content contained therein. + +#### Add DC/DC setup to devicetree + +The DC/DC mode is now enabled for the `®0` and `®1` devicetree nodes, depending on which stage you want to use in that mode. + +For a high voltage board, where the necessary inductor is connected to the `DCCH` pin, enable the following in the board's `.dts` file: + +```dts +®0 { + status = "okay"; +}; +``` + +For both high voltage and non-HV boards, where the necessary inductor is connected to the `DCC` pin, enable the following in the board's `.dts` file: + +```dts +®1 { + regulator-initial-mode = ; +}; +``` + +### RP2040 Board Adjustments + +A few small tweaks are required for custom/out-of-tree RP2040 based boards: + +#### Clock control + +RP2040 boards now require clock control enabled to use several peripherals, including USB. + +The following should be added to the board's `_defconfig` file: + +```dts +CONFIG_CLOCK_CONTROL=y +``` + +#### Base devicetree changes + +The location for the base set of devicetree these boards need to include has changed. In the board's `.dts` file, replace: + +```dts +#include +``` + +with + +```dts +#include +``` + +Next, any fixed clock node needs to be removed: + +```dts + xtal_clk: xtal-clk { + compatible = "fixed-clock"; + clock-frequency = <12000000>; + #clock-cells = <0>; + }; +``` + +And the following added, to set up the core device hardware properly: + +```dts +&timer { + status = "okay"; +}; + +&rtc { + clocks = <&clocks RPI_PICO_CLKID_CLK_RTC>; + status = "okay"; +}; + +&vreg { + regulator-always-on; + regulator-allowed-modes = ; +}; +``` + +Lastly, an additional property must be added to the `chosen` node to supplement the existing properties there: + +```dts +/ { + chosen { + ... + zephyr,flash-controller = &ssi; + ... + }; +}; +``` + +### LED Strip Kconfig Changes + +If your board or shield uses RGB underglow, the following Kconfig flag which was previously enabled should now be removed: + +``` +CONFIG_WS2812_STRIP=y +``` + +If this is the only SPI device your shield uses, also remove the Kconfig flag enabling SPI (assuming it is present). It will be automatically enabled. + +### Cirque Pinnacle Input Driver + +Upstream Zephyr now contains a driver for the popular small Cirque Pinnacle trackpads. To transition to the new upstream driver, instead of the [out-of-tree module](https://github.com/petejohanson/cirque-input-module), some small adjustments are needed. + +#### Remove module references + +Often, the out-of-tree module is referenced from the `west.yml` in user's repos. The entry pointing to the module should be removed from your `projects` list there. If building locally, be sure you are not adding the module directory to the `ZMK_EXTRA_MODULES` CMake parameter. + +#### Devicetree changes + +The properties for the upstream driver can be found [here](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/input/cirque%2Cpinnacle-i2c.html#dtbinding-cirque-pinnacle-i2c). The following changes are required when migrating: + +- The `dr-gpios` property in out-of-tree module is named `data-ready-gpios`, so renaming the property is required. +- Instead of an opt-out `no-taps` property to disable taps, you can enable primary taps with `primary-tap-enable`. +- The `sleep` property is now named `sleep-mode-enable`. +- Use `invert-x`/`invert-y` instead of `x-invert`/`y-invert`. +- Use `swap-xy` instead of `rotate-90`. + +## Other Changes + +LVGL was updated to 9.3.0, which comes with breaking API changes. If you are using custom widgets or displays from a module, these will likely need fixing. See the [LVGL changelog](https://docs.lvgl.io/master/CHANGELOG.html#v9-3-0-3-june-2025) for details. + +## Board Extensions + +Zephyr has formalized the concept of "board extensions", allowing modules/applications to extend boards that are defined elsewhere. If using a board from the upstream Zephyr project that ZMK hasn't yet extended with default settings, e.g. enabling the `CONFIG_ZMK_USB` symbol, users can add their own extensions to their modules under the `/boards/extensions//` directory. See https://github.com/zmkfirmware/zmk/tree/main/app/boards/extensions for the extensions that ZMK has added. + +## Zephyr Upgrade Instructions + +Should you encounter any other issues with custom or out-of-tree Zephyr code, consider consulting the following Zephyr upgrade guides: + +- [3.7 Upgrade](https://docs.zephyrproject.org/4.1.0/releases/migration-guide-3.7.html) +- [4.1 Upgrade](https://docs.zephyrproject.org/4.1.0/releases/migration-guide-4.1.html) + +## Thanks! + +Thanks to all the testers who have helped verify ZMK functionality on the newer Zephyr version. + +## Future + +Once a ZMK version based on Zephyr 4.1 is released, we'll be working towards updating Zephyr even further, to try to catch up with the latest actual Zephyr release. This will likely mean a jump to the upcoming Zephyr 4.3. As part of that work, some other semi-disruptive changes will be required, including: + +- Removing ZMK's use of the deprecated, and now removed, `kscan` APIs in favor of the newer matrix input API. ZMK already supports the matrix input API, but has not yet converted our existing drivers to that API. Advanced users looking to test can try leveraging the upstream Zephyr drivers today to test that functionality, but that is _not_ officially supported and is likely to have bugs or untested side effects. +- Move the new USB stack, that includes better High-Speed USB support. + +[nmunnich]: https://github.com/nmunnich +[petejohanson]: https://github.com/petejohanson diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index 728cb8b29..0c3ba752c 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -41,7 +41,7 @@ Host support for multiple battery levels is undefined. It appears that in most o ### Devicetree -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) | Property | Type | Description | | ------------- | ---- | --------------------------------------------- | @@ -55,7 +55,7 @@ Driver for reading the voltage of a battery using an ADC connected to a voltage Applies to: `compatible = "zmk,battery-voltage-divider"` -See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/iio/afe/voltage-divider.html). +See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/iio/afe/voltage-divider.html). ## nRF VDDH Battery Sensor diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index e7a7c04c4..ce53ee992 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -403,8 +403,8 @@ Applies to: `compatible = "zmk,behavior-input-two-axis"` | Property | Type | Description | Default | | ----------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | `#binding-cells` | int | Must be `<1>` | | -| `x-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) for generated input events for the X-axis. | | -| `y-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) for generated input events for the Y-axis. | | +| `x-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) for generated input events for the X-axis. | | +| `y-input-code` | int | The [relative event code](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) for generated input events for the Y-axis. | | | `trigger-period-ms` | int | How many milliseconds between generated input events based on the current speed/direction. | 16 | | `delay-ms` | int | How many milliseconds to delay any processing or event generation when first pressed. | 0 | | `time-to-max-speed-ms` | int | How many milliseconds it takes to accelerate to the curren max speed. | 0 | diff --git a/docs/docs/config/displays.md b/docs/docs/config/displays.md index 7f7189535..2896b4182 100644 --- a/docs/docs/config/displays.md +++ b/docs/docs/config/displays.md @@ -53,21 +53,21 @@ You must also configure the driver for your display. ZMK provides the following - [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/display/Kconfig.il0323) -Zephyr provides several display drivers as well. Search for the name of your display in [Zephyr's Kconfig options](https://docs.zephyrproject.org/3.5.0/kconfig.html) documentation. +Zephyr provides several display drivers as well. Search for the name of your display in [Zephyr's Kconfig options](https://docs.zephyrproject.org/4.1.0/kconfig.html) documentation. ## Devicetree See the Devicetree bindings for your display. Here are the bindings for common displays: - [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/display/gooddisplay%2Cil0323.yaml) -- [SSD1306 (i2c)](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/display/solomon,ssd1306fb-i2c.html) -- [SSD1306 (spi)](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/display/solomon,ssd1306fb-spi.html) +- [SSD1306 (i2c)](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/display/solomon,ssd1306fb-i2c.html) +- [SSD1306 (spi)](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/display/solomon,ssd1306fb-spi.html) -A full list of drivers provided by Zephyr can be found in [Zephyr's Devicetree bindings index](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings.html). +A full list of drivers provided by Zephyr can be found in [Zephyr's Devicetree bindings index](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings.html). ### Chosen nodes -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) | Property | Type | Description | | ----------------- | ---- | -------------------------------------------------------------------------------------------------------- | diff --git a/docs/docs/config/index.md b/docs/docs/config/index.md index dd0e7ad73..bd7463acc 100644 --- a/docs/docs/config/index.md +++ b/docs/docs/config/index.md @@ -37,14 +37,14 @@ ZMK will search for config files in: ...where `` is the name of the board and `` is the root directory of any [included module](../features/modules.mdx). These files describe the hardware of the board. -ZMK will search the board folder for the following config files _in addition_ to [Zephyr board-defining files](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#create-your-board-directory): +ZMK will search the board folder for the following config files _in addition_ to [Zephyr board-defining files](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#create-your-board-directory): - `.conf` (Kconfig) - `.keymap` (Devicetree, keyboards with onboard controllers only) Shared config files (excluding any `_left` or `_right` suffix) are not currently supported in board folders. -For more documentation on creating and configuring a new board, see [Zephyr's board porting guide](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html#write-kconfig-files). +For more documentation on creating and configuring a new board, see [Zephyr's board porting guide](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html#write-kconfig-files). ### Shield Folder @@ -57,14 +57,14 @@ When building with a shield, ZMK will search for config files in: ...where `` is the name of the shield and `` is the root directory of any [included module](../features/modules.mdx). These files describe the hardware of the shield that the board is plugged into. -ZMK will search the shield folder for the following config files _in addition_ to [Zephyr shield-defining files](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#shield-porting-and-configuration): +ZMK will search the shield folder for the following config files _in addition_ to [Zephyr shield-defining files](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html#shield-porting-and-configuration): - `.conf` (Kconfig) - `.keymap` (Devicetree) Shared config files (excluding any `_left` or `_right` suffix) are not currently supported in shield folders. -For more documentation on creating and configuring a new shield, see [Zephyr's shield documentation](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html) and [ZMK's new keyboard shield](../development/hardware-integration/new-shield.mdx) guide. +For more documentation on creating and configuring a new shield, see [Zephyr's shield documentation](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html) and [ZMK's new keyboard shield](../development/hardware-integration/new-shield.mdx) guide. ## Kconfig Files @@ -82,7 +82,7 @@ Files ending with `_defconfig` use the same syntax as `.conf` files. They set th The list of available settings is determined by various files in ZMK whose names start with `Kconfig`. Note that options are _not_ prefixed with `CONFIG_` in these files. -See [Zephyr's Kconfig documentation](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html) for more details on Kconfig files. +See [Zephyr's Kconfig documentation](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html) for more details on Kconfig files. :::tip @@ -139,7 +139,7 @@ Devicetree files look like this: Devicetree properties apply to specific nodes in the tree instead of globally. The properties that can be set for each node are determined by `.yaml` files in ZMK in the various `dts/bindings` folders. -See [Zephyr's Devicetree guide](https://docs.zephyrproject.org/3.5.0/build/dts/index.html) for more details on Devicetree files. +See [Zephyr's Devicetree guide](https://docs.zephyrproject.org/4.1.0/build/dts/index.html) for more details on Devicetree files. :::tip @@ -166,7 +166,7 @@ The part before the colon, `kscan0`, is a label. This is optional, and it provid The `compatible` property indicates what type of node it is. Search this documentation for the text inside the quotes to see which properties the node supports. You can also search ZMK for a file whose name is the value of the `compatible` property with a `.yaml` file extension. -To set a property, see below for examples for common property types, or see [Zephyr's Devicetree documentation](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#writing-property-values) for more details on the syntax for properties. +To set a property, see below for examples for common property types, or see [Zephyr's Devicetree documentation](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#writing-property-values) for more details on the syntax for properties. To change a property for an existing node, first find the node you want to change and find its label. Next, outside of any other node, write an ampersand (`&`) followed by the node's label, an opening curly brace (`{`), one or more new property values, a closing curly brace (`}`), and a semicolon (`;`). diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 416175fa6..395342a2a 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -25,7 +25,7 @@ If the debounce press/release values are set to any value other than `-1`, they ### Devicetree -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) | Property | Type | Description | | ---------------------- | ---- | ---------------------------------------------------------------------- | @@ -81,7 +81,7 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml]( | `toggle-mode` | bool | Use toggle switch mode | n | | `wakeup-source` | bool | Mark this kscan instance as able to wake the keyboard | n | -Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: +Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: ```dts kscan0: kscan { @@ -151,7 +151,7 @@ The `diode-direction` property must be one of: | `"row2col"` | Diodes point from rows to columns (cathodes are connected to columns) | | `"col2row"` | Diodes point from columns to rows (cathodes are connected to rows) | -Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. +Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. The output pins (e.g. columns for `col2row`) should have the flag `GPIO_ACTIVE_HIGH`, and input pins (e.g. rows for `col2row`) should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`: ```dts @@ -204,7 +204,7 @@ Define the transform with a [matrix transform](layout.md#matrix-transform). The For example, in `RC(5,0)` power flows from the 6th pin in `gpios` to the 1st pin in `gpios`. Exclude all positions where the row and column are the same as these pairs will never be triggered, since no pin can be both input and output at the same time. -The [GPIO flags](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html#api-reference) for the elements in `gpios` should be `GPIO_ACTIVE_HIGH`, and interrupt pins set in `interrupt-gpios` should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`. +The [GPIO flags](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html#api-reference) for the elements in `gpios` should be `GPIO_ACTIVE_HIGH`, and interrupt pins set in `interrupt-gpios` should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`. ## Composite Driver diff --git a/docs/docs/config/lighting.md b/docs/docs/config/lighting.md index 8734c70d6..ceb49db89 100644 --- a/docs/docs/config/lighting.md +++ b/docs/docs/config/lighting.md @@ -79,7 +79,7 @@ The `*_START` settings only determine the initial backlight state. Any changes y ### Devicetree -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) +Applies to: [`/chosen` node](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) | Property | Type | Description | | --------------- | ---- | -------------------------------------------- | @@ -87,7 +87,7 @@ Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intr See the Zephyr devicetree bindings for LED drivers: -- [gpio-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/gpio-leds.html) -- [pwm-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/pwm-leds.html) +- [gpio-leds](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/led/gpio-leds.html) +- [pwm-leds](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/led/pwm-leds.html) See the [backlight hardware integration page](../development/hardware-integration/lighting/backlight.mdx) for examples of the properties that must be set to enable backlighting. diff --git a/docs/docs/config/settings.md b/docs/docs/config/settings.md index da162c752..b6245475a 100644 --- a/docs/docs/config/settings.md +++ b/docs/docs/config/settings.md @@ -3,7 +3,7 @@ title: Persistent Settings sidebar_label: Settings --- -ZMK uses [Zephyr's settings subsystem](https://docs.zephyrproject.org/3.5.0/services/settings/index.html) to store certain runtime settings in the "storage" partition of the controller's flash memory. +ZMK uses [Zephyr's settings subsystem](https://docs.zephyrproject.org/4.1.0/services/settings/index.html) to store certain runtime settings in the "storage" partition of the controller's flash memory. These settings will be saved after certain events and loaded on boot. For instance, bond information for [paired Bluetooth hosts](../features/bluetooth.md) are stored in this partition so that users do not need to pair to each device again after the controller loses power. diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index 4575a50d1..fbbbaaa8d 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -21,7 +21,7 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/ :::info -Because ZMK enables [the Zephyr setting](https://docs.zephyrproject.org/3.5.0/kconfig.html#CONFIG_BT_DEVICE_NAME_DYNAMIC) that allows for runtime modification of the device BT name, +Because ZMK enables [the Zephyr setting](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_BT_DEVICE_NAME_DYNAMIC) that allows for runtime modification of the device BT name, changing `CONFIG_ZMK_KEYBOARD_NAME` requires [clearing the stored settings](./settings.md#clearing-persisted-settings) on the controller in order to take effect. ::: @@ -93,7 +93,7 @@ By default USB Boot protocol support is disabled, however certain situations suc ### Bluetooth -See [Zephyr's Bluetooth stack architecture documentation](https://docs.zephyrproject.org/3.5.0/connectivity/bluetooth/bluetooth-arch.html) +See [Zephyr's Bluetooth stack architecture documentation](https://docs.zephyrproject.org/4.1.0/connectivity/bluetooth/bluetooth-arch.html) for more information on configuring Bluetooth. | Config | Type | Description | Default | @@ -120,6 +120,13 @@ Note that `CONFIG_BT_MAX_CONN` and `CONFIG_BT_MAX_PAIRED` should be set to the s | `CONFIG_ZMK_USB_LOGGING` | bool | Enable USB CDC ACM logging for debugging | n | | `CONFIG_ZMK_LOG_LEVEL` | int | Log level for ZMK debug messages | 4 | +### Double Tap To Bootloader + +| Config | Type | Description | Default | +| ------------------------------------------ | ---- | ------------------------------------------------------------------- | --------------------------- | +| `CONFIG_ZMK_DBL_TAP_BOOTLOADER` | bool | Enable the double-tap to enter bootloader functionality | y if STM32 or RP2040/RP2350 | +| `CONFIG_ZMK_DBL_TAP_BOOTLOADER_TIMEOUT_MS` | int | Duration (in ms) to wait for a second reset to enter the bootloader | 500 | + ## Snippets :::danger @@ -132,7 +139,7 @@ The only way to restore functionality after that is to re-flash the bootloader. Re-flashing a bootloader built without the SoftDevice will require firmware built with these snippets. ::: -[Snippets](https://docs.zephyrproject.org/3.5.0/build/snippets/index.html) are a way to save common configuration separately when it applies to multiple different applications. +[Snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html) are a way to save common configuration separately when it applies to multiple different applications. Enable snippets by adding `snippet: ` to your `build.yaml` for the appropriate board: diff --git a/docs/docs/development/devicetree.md b/docs/docs/development/devicetree.md index 8c3401faf..f576b36e7 100644 --- a/docs/docs/development/devicetree.md +++ b/docs/docs/development/devicetree.md @@ -70,7 +70,7 @@ What properties a node may have varies drastically. Of the standard properties, #### Property types -These are some of the property types you will see most often when working with ZMK. [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/3.5.0/build/dts/bindings.html) provides more detailed information and a full list of types. +These are some of the property types you will see most often when working with ZMK. [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/4.1.0/build/dts/bindings.html) provides more detailed information and a full list of types. ##### bool @@ -124,14 +124,14 @@ Example: `property = <&none &mo 1>;` Values can also be split into multiple blocks, e.g. `property = <&none>, <&mo 1>;` -See the documentation for "phandle-array" in [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/3.5.0/build/dts/bindings.html) +See the documentation for "phandle-array" in [Zephyr's Devicetree bindings documentation](https://docs.zephyrproject.org/4.1.0/build/dts/bindings.html) for more details on how parameters are associated with nodes. ##### GPIO array This is just a phandle array. The documentation lists this as a different type to make it clear which properties expect an array of GPIOs. -Each item in the array should be a label for a GPIO node (the names of which differ between hardware platforms) followed by an index and configuration flags. See [Zephyr's GPIO documentation](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/gpio.html) for a full list of flags. Phandles and labels will be explained in more detail in a [later section](#labels-and-phandles). +Each item in the array should be a label for a GPIO node (the names of which differ between hardware platforms) followed by an index and configuration flags. See [Zephyr's GPIO documentation](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/gpio.html) for a full list of flags. Phandles and labels will be explained in more detail in a [later section](#labels-and-phandles). Example: @@ -187,7 +187,7 @@ properties: required: false ``` -The properties the node can have are listed under `properties`. Some additional properties are imported from [zero_param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zero_param.yaml). Bindings files are **the authority** on node properties, with our [documentation of said properties](https://zmk.dev/docs/config/behaviors#devicetree-7) sometimes omitting things like the `#binding-cells` property (imported from the previously mentioned file, describing the number of parameters that the behavior accepts). A full description of the bindings file syntax can be found in [Zephyr's documentation](https://docs.zephyrproject.org/3.5.0/build/dts/bindings-syntax.html). +The properties the node can have are listed under `properties`. Some additional properties are imported from [zero_param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zero_param.yaml). Bindings files are **the authority** on node properties, with our [documentation of said properties](https://zmk.dev/docs/config/behaviors#devicetree-7) sometimes omitting things like the `#binding-cells` property (imported from the previously mentioned file, describing the number of parameters that the behavior accepts). A full description of the bindings file syntax can be found in [Zephyr's documentation](https://docs.zephyrproject.org/4.1.0/build/dts/bindings-syntax.html). Note that binding files can also specify properties for children, like the [`zmk,keymap.yaml` bindings file](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Ckeymap.yaml) specifying properties for layers in the keymap. @@ -260,7 +260,7 @@ A devicetree is almost always constructed from multiple files. These files are g - `.dtsi` files, which exist exclusively to be included via the C preprocessor (their contents get "pasted" at the location of the `#include` command) and are not used by the build sytem otherwise. - A `.dts` file, which forms the "base" of the devicetree. A single one of these is always present when a devicetree is constructed. For ZMK, the `.dts` file contains the sections of the devicetree describing the [_board_](hardware-integration/index.mdx#what-is-a-board). This includes importing a number of `.dtsi` files describing the specific SoC that the board uses. -- Any number of `.overlay` files. These files can come from various sources, such as [shields](hardware-integration/index.mdx#what-is-a-shield) or [snippets](https://docs.zephyrproject.org/3.5.0/build/snippets/index.html). An overlay is applied to a `.dts` file by appending its contents to the end of the `.dts` file, i.e. it is placed at the bottom of the file. Multiple overlays are applied by doing so repeatedly in a particular order. Without going into the details of the exact order in which overlays are applied, it is enough to know that if you specify e.g. `shield: corne_left nice_view_adapter nice_view` in your `build.yaml`, then the overlays are applied left to right. +- Any number of `.overlay` files. These files can come from various sources, such as [shields](hardware-integration/index.mdx#what-is-a-shield) or [snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html). An overlay is applied to a `.dts` file by appending its contents to the end of the `.dts` file, i.e. it is placed at the bottom of the file. Multiple overlays are applied by doing so repeatedly in a particular order. Without going into the details of the exact order in which overlays are applied, it is enough to know that if you specify e.g. `shield: corne_left nice_view_adapter nice_view` in your `build.yaml`, then the overlays are applied left to right. - A single `.keymap` file. This file being included is ZMK-specific, and is treated as the "final" `.overlay` file, appended after all other overlays. #### Merging and overwriting nodes diff --git a/docs/docs/development/hardware-integration/bootloader/_base-config.md b/docs/docs/development/hardware-integration/bootloader/_base-config.md new file mode 100644 index 000000000..3172ec9f2 --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/_base-config.md @@ -0,0 +1,13 @@ +## Kconfig Symbol Enablement + +Three Kconfig symbols need to be enabled for this feature to work, namely `RETAINED_MEM`, `RETENTION`, and `RETENTION_BOOT_MODE`. Typically, this is done by `imply`ing the symbols for the board symbol in the `Kconfig.`, file, e.g.: + +```dts +config BOARD_TOFU65 + select SOC_RP2040 + imply RETAINED_MEM + imply RETENTION + imply RETENTION_BOOT_MODE +``` + +By using `imply` at the board level, users of the board can choose to override the setting and disable the feature if they so choose. diff --git a/docs/docs/development/hardware-integration/bootloader/adafruit-nrf52.mdx b/docs/docs/development/hardware-integration/bootloader/adafruit-nrf52.mdx new file mode 100644 index 000000000..0e06ea7ee --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/adafruit-nrf52.mdx @@ -0,0 +1,84 @@ +--- +title: Adafuit nRF52 Bootloader +sidebar_label: Adafuit nRF52 +--- + +import BaseConfig from "./_base-config.md"; + +The [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/) is a [magic value type bootloader](./index.mdx#magic-value-bootloaders), with some extra setup used to integrate with it. + + + +## Magic Value Type Kconfig + +In addition to the core Kconfig symbols already set up, one additional Kconfig choice needs to be set, e.g. in `Kconfig.defaults` for the board: + +``` +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_NRF52 + +endchoice +``` + +This ensures the correct magic value is stored in the retained memory. + +## Devicetree Simple Include + +A simple shared file can be included in your board's devicetree to set up the retained memory and retention nodes. Near the top of your file, add an include for `common/nordic/nrf52840_uf2_boot_mode.dtsi`, e.g.: + +```dts +/dts-v1/; + +#include +#include +``` + +## Devicetree Manual Changes + +### GPREGRET Setup + +Nordic nRF52840 has a dedicated register that can be used to store data to persist across resets. Zephyr has a retained mem driver over this register, so we'll add the boot mode retention to that existing node: + +```dts +&gpregret1 { + adafruit_boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; +}; +``` + +### Magic Value Mapper + +Next, we'll set up our mapping retained mem driver, which will map from the Zephyr boot mode values to the values the bootloader is looking for: + +```dts +/ { + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; +``` + +### Chosen Node Properties + +Finally, we'll assign two `chosen` properties for the two nodes that have been defined: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &adafruit_boot_retention; + }; +``` diff --git a/docs/docs/development/hardware-integration/bootloader/index.mdx b/docs/docs/development/hardware-integration/bootloader/index.mdx new file mode 100644 index 000000000..5190c04b0 --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/index.mdx @@ -0,0 +1,31 @@ +--- +title: Bootloader Integration +sidebar_label: Bootloader +--- + +:::info +The information on this page is only relevant for **boards**, not **shields**. +::: + +The `&bootloader` behavior requires properly set up [boot mode](https://docs.zephyrproject.org/4.1.0/services/retention/index.html#boot-mode) support to function properly. The behavior operates by setting the boot mode, resetting, and then relies on an SoC/bootloader specific early init hook to enter the bootloader when the boot mode is found to have been set. + +Most of the SoCs actively supported by ZMK rely on a generic retained memory driver to store the boot mode between restarts, and additional configuration is required when using a second stage bootloader like the [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/) or [tinyuf2](https://github.com/adafruit/tinyuf2). + +## Magic Value Bootloaders + +Most "second stage" bootloaders will enter bootloader mode on startup when a specific magic value is found in a specific reserved location in memory. For those bootloaders, an extra mapping layer is used to map the Zephyr "bootloader mode" retained value to the magic value expected by the bootloader. + +The following bootloaders of this type are supported, see those pages for details on the additional configuration needed: + +- [Adafruit nRF52](./adafruit-nrf52.mdx) +- [TinyUF2](./tinyuf2.mdx) +- [SAMD21 UF2](./samd21-uf2.mdx) + +## Jump-To Bootloaders + +Several SoCs use bootloaders that can be directly jumped to from early init code in the firmware. For these situations, the only setup required is a a [retained mem](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/retained_mem.html) instance that can retain the set boot mode after the reset, in order for the early initailization code to check the value and then jump to the bootloader. + +The following bootloaders of this type are supported, see those pages for details on the additional configuration needed: + +- [RP2040/RP2350](./rp2.mdx) +- [STM32](./stm32.mdx) diff --git a/docs/docs/development/hardware-integration/bootloader/rp2.mdx b/docs/docs/development/hardware-integration/bootloader/rp2.mdx new file mode 100644 index 000000000..fce59b032 --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/rp2.mdx @@ -0,0 +1,70 @@ +--- +title: RP2040/RP2350 Bootloader +sidebar_label: RP2040/RP2350 +--- + +import BaseConfig from "./_base-config.md"; + +The RP2040/RP2350 Bootloader is a [jump-to type bootloader](./index.mdx#jump-to-bootloaders), with some extra setup used to integrate with it. + +By default, when integrating this bootloader, a ["double tap reset to enter the bootloader"](../../../config/system.md#double-tap-to-bootloader) feature will be enabled, to help with designs that do not easily expose a BOOTSEL pin. + + + +## Simple Include + +A simple shared file can be included in your board's devicetree to set up the necessary retained memory and retention nodes. Near the top of your file, add an include for `arm/raspberrypi/rp2040-boot-mode-retention.dtsi`, e.g.: + +```dts +/dts-v1/; + +#include +#include +``` + +## Manual Changes + +The include mentioned above can be performed manually, if you so choose. + +First, we'll shrink the SRAM node, from the front, to create a 4-byte area that won't have anything placed in it by the normal Zephyr linking process: + +```dts +&sram0 { + reg = <0x20000004 ((DT_SIZE_K(264)) - 4)>; +}; +``` + +Next, we'll define a _new_ 4-byte RAM region for that reserved space, and within that region, set up a Zephyr retained RAM node. Within that node, we'll create the actual retention _value_ that is used: + +```dts +/ { + sram@20000000 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20000000 0x4>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + boot_mode: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; + }; +}; +``` + +Finally, we'll assign that new retention value node to the `zephyr,boot-mode` chosen property: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_mode; + }; +}; +``` diff --git a/docs/docs/development/hardware-integration/bootloader/samd21-uf2.mdx b/docs/docs/development/hardware-integration/bootloader/samd21-uf2.mdx new file mode 100644 index 000000000..1894246ac --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/samd21-uf2.mdx @@ -0,0 +1,102 @@ +--- +title: SAMD21 UF2 Bootloader +sidebar_label: SAMD21 +--- + +import BaseConfig from "./_base-config.md"; + +The [SAMD21 UF2 Bootloader](https://github.com/adafruit/uf2-samdx1) is a [magic value type bootloader](./index.mdx#magic-value-bootloaders), with some extra setup used to integrate with it. + + + +## Adjust The Existing RAM node + +We'll first adjust the SRAM to ensure Zephyr does not overwrite the memory location the bootloader inspect to determine if it should enter bootloader mode: + +```dts +&sram0 { + reg = <0x20000000 0x7FFC>; +}; +``` + +Note: + +- The `0x20000000` address is the address of the RAM for the target. This is nearly always `0x20000000`. +- The exact value of `0x7FFC` will depend on the total RAM on the target. The value should be the total RAM, minus 4-bytes, in hex. + +## Add a new memory region node with retainer RAM + +```dts +/ { + sram@20007FFC { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20007FFC 0x4>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + magic_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x4>; + }; + }; + }; +}; +``` + +Note: + +- The node `sram@20007FFC` and the corresponding `reg` property values are obtained by adding the base RAM address (.e.g. `0x20000000`) to the shrunk RAM size (e.g. `0x7FFC`) to get the new start address for the area of reserved RAM. +- The magic values are 32-bits (4 bytes), so the second `reg` size value is `0x4`. + +## Magic Mapper node + +Next, we'll set up our mapping retained mem driver, which will map from the Zephyr boot mode values to the values the bootloader is looking for: + +```dts +/ { + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; +``` + +## Assign Chosen Properties + +Finally, we'll assign two `chosen` properties for the two nodes that have been defined: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &magic_retention; + }; +}; +``` + +## Magic Value Type Kconfig + +Lastly, one Kconfig choice needs to be set, e.g. in `Kconfig.defaults` for the board: + +``` +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_ADAFRUIT_BOSSA + +endchoice +``` diff --git a/docs/docs/development/hardware-integration/bootloader/stm32.mdx b/docs/docs/development/hardware-integration/bootloader/stm32.mdx new file mode 100644 index 000000000..6d7a45dd9 --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/stm32.mdx @@ -0,0 +1,71 @@ +--- +title: STM32 ROM Bootloader +sidebar_label: STM32 ROM +toc_max_heading_level: 3 +--- + +import BaseConfig from "./_base-config.md"; + +The [STM32 ROM Bootloader](https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf) is a [jump-to type bootloader](./index.mdx#jump-to-bootloaders), with some extra setup used to integrate with it. + +By default, when integrating this bootloader, a ["double tap reset to enter the bootloader"](../../../config/system.md#double-tap-to-bootloader) feature will be enabled, to help with designs that do not easily expose a BOOT pin. + + + +## Adjust Existing SRAM Node + +First, we'll adjust the existing SRAM node to shrink it by one byte so Zephyr will not interfere with the retained mem: + +```dts +/* Reduce SRAM0 usage by 1 byte to account for non-init area */ +&sram0 { + reg = <0x20000000 0x3FFF>; +}; +``` + +Note: + +- The `0x20000000` address is the address of the RAM for the target. This is nearly always `0x20000000` +- The exact value of `0x3FFF` will depend on the total RAM on the target. The value should be the total RAM, minus 1-bytes, in hex + +## New Memory Region & Nested Retained Mem + +```dts +/ { + sram@20003FFF { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x20003FFF 0x1>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + retention0: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; + }; +}; +``` + +Note: + +- The node `sram@20003FFF` and the corresponding `reg` property values are obtained by adding the base RAM address (.e.g. `0x20000000`) to the shrunk RAM size (e.g. `0x3FFF`) to get the new start address for the area of reserved RAM. + +## Chosen Boot Mode Node + +Finally, we'll set a chosen property to select the created retention node: + +```dts +/ { + chosen { + zephyr,boot-mode = &retention0; + }; +}; +``` diff --git a/docs/docs/development/hardware-integration/bootloader/tinyuf2.mdx b/docs/docs/development/hardware-integration/bootloader/tinyuf2.mdx new file mode 100644 index 000000000..85386b4dc --- /dev/null +++ b/docs/docs/development/hardware-integration/bootloader/tinyuf2.mdx @@ -0,0 +1,102 @@ +--- +title: TinyUF2 Bootloader +sidebar_label: TinyUF2 +--- + +import BaseConfig from "./_base-config.md"; + +The [TinyUF2 Bootloader](https://github.com/adafruit/tinyuf2) is a [magic value type bootloader](./index.mdx#magic-value-bootloaders), with some extra setup used to integrate with it. + + + +## Adjust The Existing RAM node + +For TinyUF2, we'll first adjust the SRAM to ensure Zephyr does not overwrite the memory location the bootloader inspect to determine if it should enter bootloader mode: + +```dts +&sram0 { + reg = <0x20000000 0x1FFFC>; +}; +``` + +Note: + +- The `0x20000000` address is the address of the RAM for the target. This is nearly always `0x20000000` +- The exact value of `0x1FFFC` will depend on the total RAM on the target. The value should be the total RAM, minus 4-bytes, in hex + +## Add a New Memory Region Node with Retainer RAM + +```dts +/ { + sram@2001FFFC { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2001FFFC 0x4>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + magic_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x4>; + }; + }; + }; +}; +``` + +Note: + +- The node `sram@2001FFFC` and the corresponding `reg` property values are obtained by adding the base RAM address (.e.g. `0x20000000`) to the shrunk RAM size (e.g. `0x1FFFC`) to get the new start address for the area of reserved RAM. +- The magic values in TinyUF2 are 32-bits (4 bytes), so the second `reg` size value is `0x4`. + +## Magic Mapper node + +Next, we'll set up our mapping retained mem driver, which will map from the Zephyr boot mode values to the values the bootloader is looking for: + +```dts +/ { + magic_mapper { + compatible = "zmk,bootmode-to-magic-mapper"; + status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + boot_retention: retention@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x1>; + }; + }; +}; +``` + +## Assign Chosen Properties + +Finally, we'll assign two `chosen` properties for the two nodes that have been defined: + +```dts +/ { + chosen { + zephyr,boot-mode = &boot_retention; + zmk,magic-boot-mode = &magic_retention; + }; +}; +``` + +## Magic Value Type Kconfig + +Lastly, one Kconfig choice needs to be set, e.g. in `Kconfig.defaults` for the board: + +``` +choice ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE + default ZMK_BOOTMODE_MAGIC_VALUE_BOOTLOADER_TYPE_TINYUF2 + +endchoice +``` diff --git a/docs/docs/development/hardware-integration/index.mdx b/docs/docs/development/hardware-integration/index.mdx index 7222f5a78..4fb51beff 100644 --- a/docs/docs/development/hardware-integration/index.mdx +++ b/docs/docs/development/hardware-integration/index.mdx @@ -23,7 +23,7 @@ These core architectural elements are defined per-keyboard, and _where_ they are ## Boards & Shields ZMK uses the Zephyr concepts of "boards" and "shields" to refer to different parts of a keyboard build, that in turn get combined during a firmware build. -Also see the Zephyr documentation on [boards](https://docs.zephyrproject.org/3.5.0/glossary.html#term-board) and [shields](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html). +Also see the Zephyr documentation on [boards](https://docs.zephyrproject.org/4.1.0/glossary.html#term-board) and [shields](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html). ### What is a "board"? @@ -84,9 +84,9 @@ In that directory you'll have the following files, where there can be multiples └── .zmk.yml ``` -These files include [base Kconfig files](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html): +These files include [base Kconfig files](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html): -- A `Kconfig.board` file that defines the toplevel [Kconfig](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html) items for the board, including which SoC Kconfig setting it depends on. +- A `Kconfig.board` file that defines the toplevel [Kconfig](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html) items for the board, including which SoC Kconfig setting it depends on. - A `Kconfig.defconfig` file that sets some initial defaults when building this keyboard. This usually includes: - Setting [`ZMK_KEYBOARD_NAME`](../../config/system.md#general) to a value, for the product name to be used for USB/BLE info, - Setting [`ZMK_USB`](../../config/system.md#usb) and/or [`ZMK_BLE`](../../config/system.md#bluetooth) for the default values for which HID transport(s) to enable by default @@ -101,7 +101,7 @@ These files include [base Kconfig files](https://docs.zephyrproject.org/3.5.0/bu - `.dts` which contains all the devicetree definitions[^1], including but not limited to: - An `#include` line that pulls in the specific microprocessor that is used, e.g. `#include `, - Kscan, matrix transform and physical layout devicetree nodes as described above, - - A [chosen](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node including `zmk,physical-layout` property among others, where each property references the nodes defined in the file. + - A [chosen](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node including `zmk,physical-layout` property among others, where each property references the nodes defined in the file. - A `.keymap` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. And other miscellaneous ones: @@ -109,7 +109,7 @@ And other miscellaneous ones: - A `board.cmake` file with CMake directives for how to flash to the device. - A `.zmk.yml` file containing [metadata](hardware-metadata-files.md) for the keyboard. -See Zephyr's [board porting guide](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html) for information on creating a new board. +See Zephyr's [board porting guide](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html) for information on creating a new board. Also see the [new keyboard shield guide](new-shield.mdx#shield-overlays) for information on parts of the devicetree specifically related to ZMK. [^1]: @@ -142,8 +142,8 @@ These files include [base Kconfig files](new-shield.mdx#base-kconfig-files): [Devicetree files](../../config/index.md#devicetree-files): - A `.overlay` file which is a devicetree overlay file[^1], containing definitions including but not limited to: - - Kscan, matrix transform and physical layout devicetree nodes as described above, where the kscan node uses the interconnect [nexus node](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#gpio-nexus-nodes) aliases such as `&pro_micro` for GPIO pins. - - A [chosen](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node including at least the `zmk,physical-layout` property, referring to the defined node. + - Kscan, matrix transform and physical layout devicetree nodes as described above, where the kscan node uses the interconnect [nexus node](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html#gpio-nexus-nodes) aliases such as `&pro_micro` for GPIO pins. + - A [chosen](https://docs.zephyrproject.org/4.1.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) node including at least the `zmk,physical-layout` property, referring to the defined node. - A `.keymap` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. And other miscellaneous ones: diff --git a/docs/docs/development/hardware-integration/new-shield.mdx b/docs/docs/development/hardware-integration/new-shield.mdx index 1cbc079d9..6aa8c9cda 100644 --- a/docs/docs/development/hardware-integration/new-shield.mdx +++ b/docs/docs/development/hardware-integration/new-shield.mdx @@ -61,7 +61,7 @@ The high level steps are: Many of the above files will differ depending on whether your keyboard is a unibody or is [split into multiple parts](../../features/split-keyboards.md). After adding ZMK support for a basic shield using this guide, check the sidebar for guides on adding any additional features (such as encoders) that your keyboard has. -It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. +It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. ## New ZMK Module Repository @@ -106,7 +106,7 @@ mkdir boards/shields/ You can check out the [`shields` folder](https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields) in the ZMK repo that houses [the in-tree supported shields](../../hardware.mdx) in order to copy and modify as a starting point. ::: -There are two required [Kconfig](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html) files that need to be created for your new keyboard shield to get it picked up for ZMK, `Kconfig.shield` and `Kconfig.defconfig`. +There are two required [Kconfig](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html) files that need to be created for your new keyboard shield to get it picked up for ZMK, `Kconfig.shield` and `Kconfig.defconfig`. diff --git a/docs/docs/development/hardware-integration/pinctrl.mdx b/docs/docs/development/hardware-integration/pinctrl.mdx index 7c61f50dc..7722dbd0c 100644 --- a/docs/docs/development/hardware-integration/pinctrl.mdx +++ b/docs/docs/development/hardware-integration/pinctrl.mdx @@ -9,13 +9,13 @@ import InterconnectTabs from "@site/src/components/interconnect-tabs"; import Metadata from "@site/src/data/hardware-metadata.json"; :::info -This page exists to provide a guide to [Pin Control](https://docs.zephyrproject.org/3.5.0/hardware/pinctrl/index.html#pin-control) for ZMK users and designers. Refer to [Zephyr's page on Pin Control](https://docs.zephyrproject.org/3.5.0/hardware/pinctrl/index.html#pin-control) for elaboration and more details on any of the points raised here. +This page exists to provide a guide to [Pin Control](https://docs.zephyrproject.org/4.1.0/hardware/pinctrl/index.html#pin-control) for ZMK users and designers. Refer to [Zephyr's page on Pin Control](https://docs.zephyrproject.org/4.1.0/hardware/pinctrl/index.html#pin-control) for elaboration and more details on any of the points raised here. ::: A basic keyboard design as introduced in the [new shield guide](./new-shield.mdx) only uses its pins for the keyboard matrix. Many keyboard designs make use of advanced components or functionality, such as displays or shift registers. This results in the keyboard making use of communication protocols such as (but not limited to) SPI, I2C, or UART. Configuring pins for the usage of advanced functionality such as drivers for the previously named protocols is referred to as "Pin Control". :::warning -The details of pin control can vary from vendor to vendor. An attempt was made to be as general as possible, but it isn't possible to cover all possible cases. The approaches for the nRF52840 and RP2040 MCUs/SoCs are documented in their entirety below. For other MCUs/SoCs, please refer to the [Zephyr documentation](https://docs.zephyrproject.org/3.5.0/index.html) and the examples and other files found in-tree of [ZMK](https://github.com/zmkfirmware/zmk/tree/main/app/boards) and [ZMK's fork of Zephyr](https://github.com/zmkfirmware/zephyr). +The details of pin control can vary from vendor to vendor. An attempt was made to be as general as possible, but it isn't possible to cover all possible cases. The approaches for the nRF52840 and RP2040 MCUs/SoCs are documented in their entirety below. For other MCUs/SoCs, please refer to the [Zephyr documentation](https://docs.zephyrproject.org/4.1.0/index.html) and the examples and other files found in-tree of [ZMK](https://github.com/zmkfirmware/zmk/tree/main/app/boards) and [ZMK's fork of Zephyr](https://github.com/zmkfirmware/zephyr). ::: ## Boards, Shields, and Modules @@ -110,7 +110,7 @@ All of your configuration will happen by adjusting the `pinctrl` node. Changes a Within said node, you will configure one or more child nodes for the buses. You will want to define the child nodes according to the instructions in the `pinctrl.yaml` file. The child nodes that you define should be named appropriately. The common naming schema is `usageNumber_state`. For example, `uart0_default`. -Child nodes are (generally, there are [exceptions](https://docs.zephyrproject.org/3.5.0/hardware/pinctrl/index.html#pin-configuration)) expected to contain one or more subnodes typically named "groupX". These are for grouping together pins that should be assigned the same state, such as enabling an internal pull-up. +Child nodes are (generally, there are [exceptions](https://docs.zephyrproject.org/4.1.0/hardware/pinctrl/index.html#pin-configuration)) expected to contain one or more subnodes typically named "groupX". These are for grouping together pins that should be assigned the same state, such as enabling an internal pull-up. Below are some examples of SPI child nodes for the nRF52840 and the RP2040. Further examples are contained within the comments of the respecting `pinctrl.yaml` files. -For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml), a node like following would be added to the `.overlay`/`.dts` file for the keyboard, like `.overlay`: +For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml), a node like following would be added to the `.overlay`/`.dts` file for the keyboard, like `.overlay`: -For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml) on a central part, a node like following would be added to the `.overlay`/`.dts` file for the central part of the keyboard, like `.overlay`: +For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml) on a central part, a node like following would be added to the `.overlay`/`.dts` file for the central part of the keyboard, like `.overlay`: -For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml) on one of the peripheral parts, a node like following would be added to the `.overlay`/`.dts` file for that peripheral part, like `.overlay`: +For example, if setting up an [SPI device](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/dts/bindings/spi/spi-device.yaml) on one of the peripheral parts, a node like following would be added to the `.overlay`/`.dts` file for that peripheral part, like `.overlay`: @@ -264,7 +264,7 @@ As an example, you could enhance the listener defined in the previous section wi ## Configuration Setting If your keyboard hardware includes a pointing device by default, you can enable the [`ZMK_POINTING` config](../../config/pointing.md#general) in your keyboard definition. -You can do that in your [`Kconfig.defconfig` file](new-shield.mdx#kconfigdefconfig), where you can also enable the config for the communication protocol (e.g. [SPI](https://docs.zephyrproject.org/3.5.0/kconfig.html#CONFIG_SPI), [I2C](https://docs.zephyrproject.org/3.5.0/hardware/peripherals/i2c.html#configuration-options)) used by the pointing device: +You can do that in your [`Kconfig.defconfig` file](new-shield.mdx#kconfigdefconfig), where you can also enable the config for the communication protocol (e.g. [SPI](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_SPI), [I2C](https://docs.zephyrproject.org/4.1.0/hardware/peripherals/i2c.html#configuration-options)) used by the pointing device: diff --git a/docs/docs/development/hardware-integration/soft-off-setup.mdx b/docs/docs/development/hardware-integration/soft-off-setup.mdx index 690ca1720..0f326b567 100644 --- a/docs/docs/development/hardware-integration/soft-off-setup.mdx +++ b/docs/docs/development/hardware-integration/soft-off-setup.mdx @@ -75,7 +75,7 @@ For this approach, you will need to make sure that the [soft off behavior](../.. ### GPIO key -Zephyr's basic [GPIO Key](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/input/gpio-keys.html) concept is used to configure the soft off GPIO pin. +Zephyr's basic [GPIO Key](https://docs.zephyrproject.org/4.1.0/build/dts/api/bindings/input/gpio-keys.html) concept is used to configure the soft off GPIO pin. {/* secrettabs hides this tab selector. GPIO key changes its "orientation" between simple pin and matrix integrated. */} Keyboards with onboard MCU chips are simply treated as the - [board](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html) + [board](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html) as far as Zephyr™ is concerned. Given the following: @@ -49,9 +49,9 @@ with an onboard MCU or one that uses an MCU board add-on. ZMK treats keyboards that take an MCU addon board as - [shields](https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html), + [shields](https://docs.zephyrproject.org/4.1.0/hardware/porting/shields.html), and treats the smaller MCU board as the true - [board](https://docs.zephyrproject.org/3.5.0/hardware/porting/board_porting.html). + [board](https://docs.zephyrproject.org/4.1.0/hardware/porting/board_porting.html). Given the following: @@ -94,7 +94,7 @@ west build -d ::: You can also add permanent CMake arguments to `west build` by using the -[`west config`](https://docs.zephyrproject.org/3.5.0/develop/west/config.html#west-config-cmd) +[`west config`](https://docs.zephyrproject.org/4.1.0/develop/west/config.html#west-config-cmd) command. These are invoked whenever a new build system is generated. To add permanent arguments, set the `build.cmake-args` configuration option. @@ -198,7 +198,7 @@ west flash ## Multi-CPU and Dual-Chip Bluetooth Boards -Zephyr supports running the Bluetooth host and controller on separate processors. In such a configuration, ZMK always runs on the host processor, but you may need to build and flash separate firmware for the controller. Zephyr provides sample code which can be used as the controller firmware for Bluetooth HCI over [RPMsg](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_rpmsg/README.html), [SPI](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_spi/README.html), [UART](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_uart/README.html), and [USB](https://docs.zephyrproject.org/3.5.0/samples/bluetooth/hci_usb/README.html). See [Zephyr's Bluetooth Stack Architecture documentation](https://docs.zephyrproject.org/3.5.0/connectivity/bluetooth/bluetooth-arch.html) for more details. +Zephyr supports running the Bluetooth host and controller on separate processors. In such a configuration, ZMK always runs on the host processor, but you may need to build and flash separate firmware for the controller. Zephyr provides sample code which can be used as the controller firmware for Bluetooth HCI over [RPMsg](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_rpmsg/README.html), [SPI](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_spi/README.html), [UART](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_uart/README.html), and [USB](https://docs.zephyrproject.org/4.1.0/samples/bluetooth/hci_usb/README.html). See [Zephyr's Bluetooth Stack Architecture documentation](https://docs.zephyrproject.org/4.1.0/connectivity/bluetooth/bluetooth-arch.html) for more details. The following documentation shows how to build and flash ZMK for boards that use a dual-chip configuration. diff --git a/docs/docs/development/local-toolchain/setup/native.mdx b/docs/docs/development/local-toolchain/setup/native.mdx index 467d13ca7..3c82a60e9 100644 --- a/docs/docs/development/local-toolchain/setup/native.mdx +++ b/docs/docs/development/local-toolchain/setup/native.mdx @@ -73,13 +73,17 @@ export const WinTermTabs = (props) => ( ## 1. Install Zephyr Dependencies -Open Zephyr's [Getting Started Guide](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html) and follow the instructions under these sections: +Open Zephyr's [Getting Started Guide](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html) and follow the instructions under these sections: -- [Select and Update OS](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#select-and-update-os) -- [Install Dependencies](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#install-dependencies) +- [Select and Update OS](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#select-and-update-os) +- [Install Dependencies](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#install-dependencies) :::info -Zephyr's [Install Linux Host Dependencies](https://docs.zephyrproject.org/3.5.0/develop/getting_started/installation_linux.html) page may be of use for users of Linux distributions which are not based on Ubuntu. +Zephyr's [Install Linux Host Dependencies](https://docs.zephyrproject.org/4.1.0/develop/getting_started/installation_linux.html) page may be of use for users of Linux distributions which are not based on Ubuntu. +::: + +:::warning +Some optional Zephyr modules, like `libmetal`, are not compatible with CMake v4, so we recommend installing the latest CMake v3 release when installing the Zephyr dependencies. ::: ## 2. Source Code @@ -99,7 +103,7 @@ cd zmk ## 3. Get Zephyr and install Python dependencies :::note -These steps are very similar to Zephyr's [Get Zephyr and install Python dependencies](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies) instructions, but specialized for ZMK. +These steps are very similar to Zephyr's [Get Zephyr and install Python dependencies](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies) instructions, but specialized for ZMK. ::: @@ -191,22 +195,16 @@ west update This step pulls down quite a bit of tooling, be patient! ::: -6. Export a [Zephyr CMake package](https://docs.zephyrproject.org/3.5.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. +6. Export a [Zephyr CMake package](https://docs.zephyrproject.org/4.1.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. ```sh west zephyr-export ``` -7. Install the additional dependencies found in Zephyr's `requirements-base.txt`: +7. Install the additional Zephyr dependencies using `west`: ```sh -pip install -r zephyr/scripts/requirements-base.txt -``` - -If you are going to build firmware with [ZMK Studio](../../../features/studio.md), also install `requirements-extras.txt` dependencies: - -```sh -pip install -r zephyr/scripts/requirements-extras.txt +west packages pip --install ``` @@ -286,7 +284,7 @@ west update This step pulls down quite a bit of tooling, be patient! ::: -3. Export a [Zephyr CMake package](https://docs.zephyrproject.org/3.5.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. +3. Export a [Zephyr CMake package](https://docs.zephyrproject.org/4.1.0/build/zephyr_cmake_package.html#cmake-pkg). This allows CMake to automatically load boilerplate code required for building Zephyr applications. ```sh west zephyr-export @@ -295,47 +293,29 @@ west zephyr-export -4. Install the additional dependencies found in Zephyr's `requirements-base.txt`: +4. Install the additional Zephyr dependencies using `west`: ```sh -pip3 install --user -r zephyr/scripts/requirements-base.txt -``` - -If you are going to build firmware with [ZMK Studio](../../../features/studio.md), also install `requirements-extras.txt` dependencies: - -```sh -pip3 install -r zephyr/scripts/requirements-extras.txt +west packages pip --install ``` -4. Install the additional dependencies found in Zephyr's `requirements-base.txt`: +4. Install the additional Zephyr dependencies using `west`: ```sh -pip install -r zephyr/scripts/requirements-base.txt -``` - -If you are going to build firmware with [ZMK Studio](../../../features/studio.md), also install `requirements-extras.txt` dependencies: - -```sh -pip install -r zephyr/scripts/requirements-extras.txt +west packages pip --install ``` -4. Install the additional dependencies found in Zephyr's `requirements-base.txt`. +4. Install the additional Zephyr dependencies using `west`: ```sh -pip3 install -r zephyr/scripts/requirements-base.txt -``` - -If you are going to build firmware with [ZMK Studio](../../../features/studio.md), also install `requirements-extras.txt` dependencies: - -```sh -pip3 install -r zephyr/scripts/requirements-extras.txt +west packages pip --install ``` @@ -345,7 +325,7 @@ pip3 install -r zephyr/scripts/requirements-extras.txt ## 4. Install Zephyr SDK -Return to Zephyr's Getting Started Guide and [Install Zephyr SDK](https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#install-zephyr-sdk). +Return to Zephyr's Getting Started Guide and [Install Zephyr SDK](https://docs.zephyrproject.org/4.1.0/develop/getting_started/index.html#install-zephyr-sdk). ### OS-Specific Notes @@ -360,7 +340,7 @@ Return to Zephyr's Getting Started Guide and [Install Zephyr SDK](https://docs.z #### Install cross-compile toolchain -Because Raspberry OS runs on the same architecture (but different ABI) as ARM keyboard MCUs, the operating system's installed [cross compilers](https://docs.zephyrproject.org/3.5.0/develop/toolchains/other_x_compilers.html) can be used to target the different ABI. Building for non-ARM MCUs has not been tested. +Because Raspberry OS runs on the same architecture (but different ABI) as ARM keyboard MCUs, the operating system's installed [cross compilers](https://docs.zephyrproject.org/4.1.0/develop/toolchains/other_x_compilers.html) can be used to target the different ABI. Building for non-ARM MCUs has not been tested. First, the cross compiler should be installed: @@ -368,7 +348,7 @@ First, the cross compiler should be installed: sudo apt install gcc-arm-none-eabi ``` -Next, we'll configure Zephyr with some [environment variables](https://docs.zephyrproject.org/3.5.0/develop/env_vars.html#env-vars) needed to find the cross compiler. Create a file named `~/.zephyrrc` if it doesn't exist, and add these lines to it: +Next, we'll configure Zephyr with some [environment variables](https://docs.zephyrproject.org/4.1.0/develop/env_vars.html#env-vars) needed to find the cross compiler. Create a file named `~/.zephyrrc` if it doesn't exist, and add these lines to it: ```sh export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile diff --git a/docs/docs/development/module-creation.md b/docs/docs/development/module-creation.md index edbd96b60..f12a1944a 100644 --- a/docs/docs/development/module-creation.md +++ b/docs/docs/development/module-creation.md @@ -10,7 +10,7 @@ sidebar_label: ZMK Module Creation - Modules containing drivers - Modules containing other features, such as visual effects -See also Zephyr's [page on modules](https://docs.zephyrproject.org/3.5.0/develop/modules.html). +See also Zephyr's [page on modules](https://docs.zephyrproject.org/4.1.0/develop/modules.html). :::tip For open source hardware designs, it can be convenient to use [Git submodules](https://github.blog/open-source/git/working-with-submodules/) to have the ZMK module also be a Git submodule of the repository hosting the hardware design. @@ -71,13 +71,13 @@ Next, you need to define the options to build your module. These also go into `z - `settings` is a child property containing additional child properties, two of which are particularly relevant: - `board_root` points to the parent directory of a `boards` directory, which contains additional board/shield definitions. - `dts_root` points to the parent directory of a `dts` directory, which contains additional devicetree bindings. - - `snippet_root` points to the parent directory of a `snippets` directory, which contains [snippets](https://docs.zephyrproject.org/3.5.0/build/snippets/index.html). + - `snippet_root` points to the parent directory of a `snippets` directory, which contains [snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html). See the `zephyr/module.yml` found in the template for a usage example. ### Dependencies -If `zephyr/module.yml` has anything listed under `depends`, then you should also define a [west manifest](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html) file. While the `zephyr/module.yml` file defines _which_ modules your module depends on, the west manifest file defines _where_ said modules are found. This then allows automatic tooling to fetch the modules when building firmware. If `depends` is not present in `zephyr/module.yml`, then this file (named `west.yml` in the template) should be removed. +If `zephyr/module.yml` has anything listed under `depends`, then you should also define a [west manifest](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html) file. While the `zephyr/module.yml` file defines _which_ modules your module depends on, the west manifest file defines _where_ said modules are found. This then allows automatic tooling to fetch the modules when building firmware. If `depends` is not present in `zephyr/module.yml`, then this file (named `west.yml` in the template) should be removed. It is recommended that you place the manifest file at the root of your module, though you can place it elsewhere. Be sure to note in your `README.md` that your module uses dependencies, so that users import these correctly. Below is an example `west.yml` file for a user that would be using your module, with the necessary `import` field if the module has dependencies: @@ -126,7 +126,7 @@ The below table reminds of the purpose of each of these files and folders, if yo | `Kconfig` | Kconfig file for the module | | `include/` | Folder for C header files | | `src/` | Folder for C source files | -| `snippets/` | Folder for [snippets](https://docs.zephyrproject.org/3.5.0/build/snippets/index.html) | +| `snippets/` | Folder for [snippets](https://docs.zephyrproject.org/4.1.0/build/snippets/index.html) | Note that the `include` and `src` folders are not mandated by the module system, and all of these can be positioned anywhere in your module's filetree if you adjust the `zephyr/module.yml` accordingly. The `west.yml` file is not commonly present in any of the types. diff --git a/docs/docs/development/new-behavior.mdx b/docs/docs/development/new-behavior.mdx index 6aed4fb83..2aca1ee90 100644 --- a/docs/docs/development/new-behavior.mdx +++ b/docs/docs/development/new-behavior.mdx @@ -39,8 +39,8 @@ Before developing new behaviors, developers should have a working knowledge of t The following resources are provided for those seeking further understanding: - [Embedded Linux Wiki - Device Tree Usage](https://elinux.org/Device_Tree_Usage) -- [Zephyr Devicetree API](https://docs.zephyrproject.org/3.5.0/build/dts/api/api.html) -- [Zephyr Device Driver Model](https://docs.zephyrproject.org/3.5.0/kernel/drivers/index.html) +- [Zephyr Devicetree API](https://docs.zephyrproject.org/4.1.0/build/dts/api/api.html) +- [Zephyr Device Driver Model](https://docs.zephyrproject.org/4.1.0/kernel/drivers/index.html) ::: @@ -174,7 +174,7 @@ See [Behavior Metadata](#behavior-metadata) for more information. #### `properties` (Optional) These are additional variables required to configure a particular instance of a behavior. -More information can be found in [ZMK's Devicetree primer](./devicetree.md) or [Zephyr's own documentation on Devicetree bindings](https://docs.zephyrproject.org/3.5.0/build/dts/bindings-syntax.html#properties). +More information can be found in [ZMK's Devicetree primer](./devicetree.md) or [Zephyr's own documentation on Devicetree bindings](https://docs.zephyrproject.org/4.1.0/build/dts/bindings-syntax.html#properties). ### Behavior Source Files (`.c`) @@ -497,8 +497,8 @@ We will review the components from the [behavior source templates](#behavior-sou Developing drivers for behaviors in ZMK makes extensive use of the Zephyr Devicetree API and Device Driver Model. Links to the Zephyr Project Documentation for both of these concepts can be found below: -- [Zephyr Devicetree API](https://docs.zephyrproject.org/3.5.0/build/dts/api/api.html) -- [Zephyr Device Driver Model](https://docs.zephyrproject.org/3.5.0/kernel/drivers/index.html) +- [Zephyr Devicetree API](https://docs.zephyrproject.org/4.1.0/build/dts/api/api.html) +- [Zephyr Device Driver Model](https://docs.zephyrproject.org/4.1.0/kernel/drivers/index.html) ::: @@ -672,7 +672,7 @@ The API struct's metadata-specific fields are shown below. `BEHAVIOR_DT_INST_DEFINE` is a special ZMK macro which uses Zephyr's `DEVICE_DT_INST_DEFINE` macro to define the driver instance, before adding it to a list of ZMK behaviors so that can be found by the function `zmk_behavior_get_binding()`. :::info -For more information on this function, refer to [Zephyr's documentation on the Device Driver Model](https://docs.zephyrproject.org/3.5.0/kernel/drivers/index.html#c.DEVICE_DT_INST_DEFINE). +For more information on this function, refer to [Zephyr's documentation on the Device Driver Model](https://docs.zephyrproject.org/4.1.0/kernel/drivers/index.html#c.DEVICE_DT_INST_DEFINE). ::: The example `BEHAVIOR_DT_INST_DEFINE` call can be left as is with the first parameter, the instance number, equal to `0` for behaviors that only require a single instance (e.g. external power, backlighting, accessing layers). @@ -730,7 +730,7 @@ The **fourth** argument of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instea #### Optional: Configuration pointers The configuration `struct` stores the properties declared from the behavior's `.yaml` for **each new instance** of the behavior. -As seen in the `#define KP_INST(n)` of the hold-tap example, the configuration `struct`, `behavior__config_##n`, for each instance number, `n`, can be initialized using the [Zephyr Devicetree Instance-based APIs](https://docs.zephyrproject.org/3.5.0/build/dts/api/api.html#instance-based-apis), +As seen in the `#define KP_INST(n)` of the hold-tap example, the configuration `struct`, `behavior__config_##n`, for each instance number, `n`, can be initialized using the [Zephyr Devicetree Instance-based APIs](https://docs.zephyrproject.org/4.1.0/build/dts/api/api.html#instance-based-apis), which extract the values from the `properties` of each instance of the [devicetree binding](#devicetree-bindings-yaml) from a user's keymap or [predefined use-case `.dtsi` files](#optional-defining-common-use-cases-for-the-behavior-dtsi) stored in `app/dts/behaviors/`. We illustrate this further by comparing the [`#define KP_INST(n)` from the hold-tap driver](#invoking-behavior_dt_inst_define) and the [`properties` of the hold-tap devicetree binding](#devicetree-bindings-yaml). The config structure instances should always be declared `const` diff --git a/docs/docs/development/usb-logging.mdx b/docs/docs/development/usb-logging.mdx index ad4bb2e47..ace7aee84 100644 --- a/docs/docs/development/usb-logging.mdx +++ b/docs/docs/development/usb-logging.mdx @@ -41,7 +41,7 @@ west build -b nice_nano_v2 -S zmk-usb-logging -- -DSHIELD="corne_left" ### Additional Config -Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/3.5.0/services/logging/index.html). +Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/4.1.0/services/logging/index.html). For instance, setting `CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS` to a large value such as `8000` might help catch issues that happen near keyboard boot, before you can connect to view the logs. @@ -103,7 +103,7 @@ From there, you should see the various log messages from ZMK and Zephyr, dependi Standard boards such as the nice!nano and Seeed Studio XIAO family have the necessary configuration for logging already added, however if you are developing your own standalone board you may wish to add the ability to use USB logging in the future. -To do so, you need to follow the upstream Zephyr [`cdc-acm-console` snippet requirements](https://docs.zephyrproject.org/3.5.0/snippets/cdc-acm-console/README.html#requirements) steps. +To do so, you need to follow the upstream Zephyr [`cdc-acm-console` snippet requirements](https://docs.zephyrproject.org/4.1.0/snippets/cdc-acm-console/README.html#requirements) steps. Usually, this just requires ensuring that the USB node has been tagged with the `zephyr_udc0` label, e.g. diff --git a/docs/docs/faq.md b/docs/docs/faq.md index da34f58b3..5abcc30f9 100644 --- a/docs/docs/faq.md +++ b/docs/docs/faq.md @@ -7,10 +7,10 @@ sidebar_label: FAQs As a best-in-class RTOS, Zephyr™ brings many [benefits](https://www.zephyrproject.org/benefits) to ZMK, such as: -- A _single_ platform [supporting](https://docs.zephyrproject.org/3.5.0/boards/index.html) many architectures, processors and boards. +- A _single_ platform [supporting](https://docs.zephyrproject.org/4.1.0/boards/index.html) many architectures, processors and boards. - Optimization for low-powered, small memory footprint devices. -- Powerful hardware abstraction and configuration using [DeviceTree](https://docs.zephyrproject.org/3.5.0/build/dts/index.html) and [Kconfig](https://docs.zephyrproject.org/3.5.0/build/kconfig/index.html). -- A BLE stack that periodically obtains [qualification](https://docs.zephyrproject.org/3.5.0/connectivity/bluetooth/bluetooth-qual.html) listings, making it easier for final products to obtain qualification from the Bluetooth® SIG. +- Powerful hardware abstraction and configuration using [DeviceTree](https://docs.zephyrproject.org/4.1.0/build/dts/index.html) and [Kconfig](https://docs.zephyrproject.org/4.1.0/build/kconfig/index.html). +- A BLE stack that periodically obtains [qualification](https://docs.zephyrproject.org/4.1.0/connectivity/bluetooth/bluetooth-qual.html) listings, making it easier for final products to obtain qualification from the Bluetooth® SIG. - Multi-processor support, which is critical for power efficiency in upcoming MCUs. - Permissive licensing with its Apache 2.0 open source [license](https://www.apache.org/licenses/LICENSE-2.0). - A buzzing developer [community](https://github.com/zephyrproject-rtos/zephyr) including many leading [embedded technology](https://www.zephyrproject.org/project-members) companies. @@ -37,7 +37,7 @@ ZMK uses the MIT [license](https://github.com/zmkfirmware/zmk/blob/main/LICENSE) ZMK has the potential to run on any platform supported by Zephyr™. However, it’s impractical for the ZMK contributors to test all possible hardware. -The Zephyr™ [documentation](https://docs.zephyrproject.org/3.5.0/boards/index.html) describes which hardware is currently natively supported by the Zephyr™ platform. _Similar documentation covering which keyboards have been integrated into ZMK is currently being planned._ +The Zephyr™ [documentation](https://docs.zephyrproject.org/4.1.0/boards/index.html) describes which hardware is currently natively supported by the Zephyr™ platform. _Similar documentation covering which keyboards have been integrated into ZMK is currently being planned._ ### Does ZMK compile for AVR? diff --git a/docs/docs/features/modules.mdx b/docs/docs/features/modules.mdx index 83fbd9bfe..898c294b2 100644 --- a/docs/docs/features/modules.mdx +++ b/docs/docs/features/modules.mdx @@ -6,7 +6,7 @@ sidebar_label: Modules import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -ZMK makes use of [Zephyr modules](https://docs.zephyrproject.org/3.5.0/develop/modules.html) to include additional source code or configuration files into its build. You can think of them as similar to plugins or themes. The most common uses of this feature are: +ZMK makes use of [Zephyr modules](https://docs.zephyrproject.org/4.1.0/develop/modules.html) to include additional source code or configuration files into its build. You can think of them as similar to plugins or themes. The most common uses of this feature are: - Building firmware for a keyboard external to ZMK's tree - Adding functionality to ZMK, such as a driver or a behavior @@ -27,11 +27,11 @@ The shift to using modules for keyboards is a relatively recent one, and not all When [using GitHub Actions to build ZMK](../user-setup.mdx), adding modules is as simple as modifying the `west.yml` found in your `zmk-config`'s `config` directory. The recommended way of doing so is: -1. Find the URL base (the parent URL) for the module and add it as an entry to the [remotes](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#remotes). -2. Add the module as an entry to the [projects](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#projects). +1. Find the URL base (the parent URL) for the module and add it as an entry to the [remotes](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html#remotes). +2. Add the module as an entry to the [projects](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html#projects). Aside from the mandatory `name`, `remote`, and the commonly used `revision` properties, take note of the `import` property under `projects`. Some modules may have other modules as dependencies. This property allows the specifying of an additional west manifest file found in the tree of the module, which will automatically import all dependencies. -For more information on `west.yml`, see [West Manifests](https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html). +For more information on `west.yml`, see [West Manifests](https://docs.zephyrproject.org/4.1.0/develop/west/manifest.html). #### Examples diff --git a/docs/docs/features/studio.md b/docs/docs/features/studio.md index 8b9556449..84a729a25 100644 --- a/docs/docs/features/studio.md +++ b/docs/docs/features/studio.md @@ -176,7 +176,7 @@ To allow ZMK Studio to be used with a keyboard, the keyboard will need to have a - The [new shield guide](../development/hardware-integration/new-shield.mdx), informing you how to select a physical layout once defined - The corresponding [configuration page](../config/layout.md#physical-layout), for reference -To use the `studio-rpc-usb-uart` snippet, the keyboard also needs to be configured to allow CDC-ACM console snippets (this is also used for [USB logging](../development/usb-logging.mdx)). If your keyboard is a composite keyboard, consisting of an in-tree board and a shield, then you can skip this step as the board will already be configured properly. Relevant information on that can be found [in the Zephyr documentation](https://docs.zephyrproject.org/3.5.0/snippets/cdc-acm-console/README.html). +To use the `studio-rpc-usb-uart` snippet, the keyboard also needs to be configured to allow CDC-ACM console snippets (this is also used for [USB logging](../development/usb-logging.mdx)). If your keyboard is a composite keyboard, consisting of an in-tree board and a shield, then you can skip this step as the board will already be configured properly. Relevant information on that can be found [in the Zephyr documentation](https://docs.zephyrproject.org/4.1.0/snippets/cdc-acm-console/README.html). Firmware with ZMK Studio enabled require significantly more RAM. Some MCUs, such as the STM32F072 series, will require fine tuning of various settings in order to reduce the RAM consumption enough for a Studio enabled build to fit. diff --git a/docs/docs/intro.mdx b/docs/docs/intro.mdx index 714d2bf36..f73e5b696 100644 --- a/docs/docs/intro.mdx +++ b/docs/docs/intro.mdx @@ -40,7 +40,7 @@ Below table lists major features/capabilities currently supported in ZMK, as wel | [Low Power Mode (VCC Shutoff) for Peripherals](keymaps/behaviors/power.md) | ✅ | | Improved Power Handling for Multiple Peripherals | 🚧 | | [Battery Level Reporting](features/battery.md) | ✅ | -| [Support for a Wide Range of 32-bit Microcontrollers](https://docs.zephyrproject.org/3.5.0/boards/index.html) | ✅ | +| [Support for a Wide Range of 32-bit Microcontrollers](https://docs.zephyrproject.org/4.1.0/boards/index.html) | ✅ | | Support for AVR/8-bit Chips | ❌ | diff --git a/docs/docs/keymaps/input-processors/behaviors.md b/docs/docs/keymaps/input-processors/behaviors.md index a6244ed37..9bda1dfad 100644 --- a/docs/docs/keymaps/input-processors/behaviors.md +++ b/docs/docs/keymaps/input-processors/behaviors.md @@ -76,6 +76,6 @@ The behaviors input processor uses a `compatible` property of `"zmk,input-proces ### User Properties -- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_KEY` for key/button events. The default value if omitted is `INPUT_EV_KEY`. -- `codes` - The specific codes of the given type to capture, e.g. [button event codes](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L180). This list must be the same length as the `bindings` property. +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_KEY` for key/button events. The default value if omitted is `INPUT_EV_KEY`. +- `codes` - The specific codes of the given type to capture, e.g. [button event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L188). This list must be the same length as the `bindings` property. - `bindings` - The bindings to trigger when an event with the corresponding code is processed. diff --git a/docs/docs/keymaps/input-processors/code-mapper.md b/docs/docs/keymaps/input-processors/code-mapper.md index 62201ab40..05e0bc847 100644 --- a/docs/docs/keymaps/input-processors/code-mapper.md +++ b/docs/docs/keymaps/input-processors/code-mapper.md @@ -59,5 +59,5 @@ The code mapper input processor uses a `compatible` property of `"zmk,input-proc ### User Properties -- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_REL` for relative events and `INPUT_EV_KEY` for key/button events. -- `map` - The specific codes of the given type to map, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245). This list must be an even number of entries which is processed as a list of pairs of codes. The first code in the pair is the source code, and the second is the code to map it to. +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_REL` for relative events and `INPUT_EV_KEY` for key/button events. +- `map` - The specific codes of the given type to map, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258). This list must be an even number of entries which is processed as a list of pairs of codes. The first code in the pair is the source code, and the second is the code to map it to. diff --git a/docs/docs/keymaps/input-processors/scaler.md b/docs/docs/keymaps/input-processors/scaler.md index fe6c67142..2d0a30cfe 100644 --- a/docs/docs/keymaps/input-processors/scaler.md +++ b/docs/docs/keymaps/input-processors/scaler.md @@ -73,5 +73,5 @@ The scaler input processor uses a `compatible` property of `"zmk,input-processor ### User Properties -- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_REL` for relative events. -- `codes` - The specific codes within the given type to scale, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to scale. Usually, this is `INPUT_EV_REL` for relative events. +- `codes` - The specific codes within the given type to scale, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) diff --git a/docs/docs/keymaps/input-processors/transformer.md b/docs/docs/keymaps/input-processors/transformer.md index 1c4a531ec..65feb9202 100644 --- a/docs/docs/keymaps/input-processors/transformer.md +++ b/docs/docs/keymaps/input-processors/transformer.md @@ -70,6 +70,6 @@ The transform input processor uses a `compatible` property of `"zmk,input-proces ### User Properties -- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to transform. Usually, this is `INPUT_EV_REL` for relative events. -- `x-codes` - The specific X codes within the given type to transform, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) -- `y-codes` - The specific Y codes within the given type to transform, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v3.5.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L245) +- `type` - The [type](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L25) of events to transform. Usually, this is `INPUT_EV_REL` for relative events. +- `x-codes` - The specific X codes within the given type to transform, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) +- `y-codes` - The specific Y codes within the given type to transform, e.g. [relative event codes](https://github.com/zmkfirmware/zephyr/blob/v4.1.0%2Bzmk-fixes/include/zephyr/dt-bindings/input/input-event-codes.h#L258) diff --git a/docs/docs/troubleshooting/building-issues.md b/docs/docs/troubleshooting/building-issues.md index 13b861b10..dbff820eb 100644 --- a/docs/docs/troubleshooting/building-issues.md +++ b/docs/docs/troubleshooting/building-issues.md @@ -7,7 +7,7 @@ description: Troubleshooting issues when compiling ZMK firmware. ## CMake Error An error along the lines of `CMake Error at (zmk directory)/zephyr/cmake/generic_toolchain.cmake:64 (include): include could not find load file:` during firmware compilation indicates that the Zephyr Environment Variables are not properly defined. -For more information, see [Zephyr's CMake Package](https://docs.zephyrproject.org/3.5.0/build/zephyr_cmake_package.html). +For more information, see [Zephyr's CMake Package](https://docs.zephyrproject.org/4.1.0/build/zephyr_cmake_package.html). ## West Build Errors diff --git a/docs/docs/troubleshooting/connection-issues.mdx b/docs/docs/troubleshooting/connection-issues.mdx index 1d102d96d..b487289c5 100644 --- a/docs/docs/troubleshooting/connection-issues.mdx +++ b/docs/docs/troubleshooting/connection-issues.mdx @@ -77,7 +77,7 @@ For connectivity problems caused by hardware, please see [the appropriate sectio Some devices and operating systems may have additional restrictions that they require be met before allowing a bluetooth peripheral to pair with them. If your keyboard is visible to your host but you are having issues trouble connecting or no input is registered, this might be the cause. Some of ZMK's [experimental bluetooth settings](../config/bluetooth.md) may suffice to resolve the issue. In particular: -- Disabling PHY 2Mbps ([`CONFIG_BT_CTLR_PHY_2M=n`](https://docs.zephyrproject.org/3.5.0/kconfig.html#CONFIG_BT_CTLR_PHY_2M)) helps to pair and connect for certain wireless chipset firmware versions, particularly on Windows (Realtek and Intel chips) and older Intel Macs with Broadcom chipsets. +- Disabling PHY 2Mbps ([`CONFIG_BT_CTLR_PHY_2M=n`](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_BT_CTLR_PHY_2M)) helps to pair and connect for certain wireless chipset firmware versions, particularly on Windows (Realtek and Intel chips) and older Intel Macs with Broadcom chipsets. - Enabling passkey entry ([`CONFIG_ZMK_BLE_PASSKEY_ENTRY=y`](../config/bluetooth.md)) helps for certain Windows computers (work-managed ones in particular). This may also manifest in not sending keystrokes. ### Issues With Dual Boot Setups @@ -95,7 +95,7 @@ For the `nRF52840`, the flag to set to use the internal oscillator is: CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y ``` -Other microcontrollers may have similar configuration options [found in the Zephyr documentation](https://docs.zephyrproject.org/3.5.0/search.html?q=CONFIG_CLOCK_CONTROL&check_keywords=yes&area=default). Do note that not all microcontrollers allow for the use of an internal oscillator, though. +Other microcontrollers may have similar configuration options [found in the Zephyr documentation](https://docs.zephyrproject.org/4.1.0/search.html?q=CONFIG_CLOCK_CONTROL&check_keywords=yes&area=default). Do note that not all microcontrollers allow for the use of an internal oscillator, though. ## Issues While Connected @@ -107,7 +107,7 @@ Some users may experience a poor connection between the keyboard and the host. T CONFIG_BT_CTLR_TX_PWR_PLUS_8=y ``` -For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/3.5.0/kconfig.html#CONFIG_BT_CTLR_TX_PWR) +For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/4.1.0/kconfig.html#CONFIG_BT_CTLR_TX_PWR) :::info This setting can also improve the connection strength between the keyboard halves for split keyboards. diff --git a/docs/sidebars.js b/docs/sidebars.js index 0a20a29e8..06bf9fb12 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -157,6 +157,22 @@ module.exports = { "development/hardware-integration/soft-off-setup", "development/hardware-integration/pointing", "development/hardware-integration/battery", + { + type: "category", + label: "Bootloader", + link: { + type: "doc", + id: "development/hardware-integration/bootloader/index", + }, + collapsed: true, + items: [ + "development/hardware-integration/bootloader/adafruit-nrf52", + "development/hardware-integration/bootloader/tinyuf2", + "development/hardware-integration/bootloader/samd21-uf2", + "development/hardware-integration/bootloader/rp2", + "development/hardware-integration/bootloader/stm32", + ], + }, { type: "category", label: "Lighting", diff --git a/schema/hardware-metadata.schema.json b/schema/hardware-metadata.schema.json index e574ca8c7..85ba0c93b 100644 --- a/schema/hardware-metadata.schema.json +++ b/schema/hardware-metadata.schema.json @@ -16,7 +16,7 @@ "$defs": { "id": { "type": "string", - "pattern": "^[a-z0-9_]+(@([A-Z]|[0-9]+|([0-9]+(\\.[0-9]+){1,2})))?$" + "pattern": "^[a-z0-9_/]+(@([A-Z]|[0-9]+|([0-9]+(\\.[0-9]+){1,2})))?$" }, "revision": { "type": "string",