diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a245022..30e216e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: zmkfirmware/zmk-build-arm:3.0 + image: zmkfirmware/zmk-build-arm:stable needs: matrix name: Build strategy: @@ -70,12 +70,7 @@ jobs: run: west zephyr-export - name: West Build (${{ steps.variables.outputs.display-name }}) run: | - west build -s zmk/app -b ${{ matrix.board }} -- -DZEPHYR_EXTRA_MODULES=${GITHUB_WORKSPACE}/config/drivers -DZMK_CONFIG=${GITHUB_WORKSPACE}/config ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} - - name: ${{ steps.variables.outputs.display-name }} DTS File - if: ${{ always() }} - run: | - if [ -f "build/zephyr/${{ matrix.board }}.dts.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp; fi - if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi + west build -s zmk/app -b ${{ matrix.board }} -- -DZEPHYR_EXTRA_MODULES="$PWD/zmk/app/drivers;${GITHUB_WORKSPACE}/config/hhkb_drivers" -DZMK_CONFIG=${GITHUB_WORKSPACE}/config ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} - name: ${{ steps.variables.outputs.display-name }} Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" - name: Rename artifacts diff --git a/README.md b/README.md index 491e1ac..7780edf 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ Add the extra kscan module: ```sh west build -b nice_nano_v2 -- \ - -DSHIELD=hhkb -DZEPHYR_EXTRA_MODULES=$WORKSPACE_PATH/config/drivers/ \ + -DSHIELD=hhkb \ + -DZEPHYR_EXTRA_MODULES=$ZMK_PATH/app/drivers/;$WORKSPACE_PATH/config/hhkb_drivers/ \ -DZMK_CONFIG=$WORKSPACE_PATH/config ``` diff --git a/config/boards/shields/hhkb/hhkb.keymap b/config/boards/shields/hhkb/hhkb.keymap index e155602..e785814 100644 --- a/config/boards/shields/hhkb/hhkb.keymap +++ b/config/boards/shields/hhkb/hhkb.keymap @@ -23,7 +23,7 @@ fn_layer { bindings = < &kp K_POWER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL -&kp CAPS &trans &trans &trans &reset &trans &trans &bootloader &kp PSCRN &kp SLCK &kp PAUSE_BREAK &kp UP &trans &kp BSPC +&kp CAPS &trans &trans &trans &sys_reset &trans &trans &bootloader &kp PSCRN &kp SLCK &kp PAUSE_BREAK &kp UP &trans &kp BSPC &trans &kp K_VOL_DN &kp K_VOL_UP &kp K_MUTE &kp K_EJECT &trans &kp KP_MULTIPLY &kp KP_DIVIDE &kp HOME &kp PG_UP &kp LEFT &kp RIGHT &trans &trans &trans &trans &trans &trans &to BT &kp KP_PLUS &kp KP_MINUS &kp END &kp PG_DN &kp DOWN &trans &trans &trans &trans &trans &trans &trans @@ -40,4 +40,4 @@ >; }; }; -}; \ No newline at end of file +}; diff --git a/config/drivers/CMakeLists.txt b/config/hhkb_drivers/CMakeLists.txt similarity index 100% rename from config/drivers/CMakeLists.txt rename to config/hhkb_drivers/CMakeLists.txt diff --git a/config/drivers/Kconfig b/config/hhkb_drivers/Kconfig similarity index 100% rename from config/drivers/Kconfig rename to config/hhkb_drivers/Kconfig diff --git a/config/drivers/kscan/CMakeLists.txt b/config/hhkb_drivers/kscan/CMakeLists.txt similarity index 76% rename from config/drivers/kscan/CMakeLists.txt rename to config/hhkb_drivers/kscan/CMakeLists.txt index 7b14685..8d7f154 100644 --- a/config/drivers/kscan/CMakeLists.txt +++ b/config/hhkb_drivers/kscan/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) 2022 Kan-Ru Chen # SPDX-License-Identifier: MIT -zephyr_library_named(zmk__drivers__kscan_topre) +zephyr_library_named(zmk__hhkb_drivers__kscan_topre) zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) zephyr_library_sources(kscan_gpio_topre.c) diff --git a/config/drivers/kscan/Kconfig b/config/hhkb_drivers/kscan/Kconfig similarity index 100% rename from config/drivers/kscan/Kconfig rename to config/hhkb_drivers/kscan/Kconfig diff --git a/config/drivers/kscan/kscan_gpio_topre.c b/config/hhkb_drivers/kscan/kscan_gpio_topre.c similarity index 98% rename from config/drivers/kscan/kscan_gpio_topre.c rename to config/hhkb_drivers/kscan/kscan_gpio_topre.c index 94308cb..876c093 100644 --- a/config/drivers/kscan/kscan_gpio_topre.c +++ b/config/hhkb_drivers/kscan/kscan_gpio_topre.c @@ -6,10 +6,10 @@ #define DT_DRV_COMPAT zmk_kscan_gpio_topre -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -249,4 +249,4 @@ static const struct kscan_driver_api kscan_gpio_topre_api = { CONFIG_APPLICATION_INIT_PRIORITY, \ &kscan_gpio_topre_api); -DT_INST_FOREACH_STATUS_OKAY(CREATE_KSCAN_GPIO_TOPRE) \ No newline at end of file +DT_INST_FOREACH_STATUS_OKAY(CREATE_KSCAN_GPIO_TOPRE) diff --git a/config/drivers/pm/CMakeLists.txt b/config/hhkb_drivers/pm/CMakeLists.txt similarity index 75% rename from config/drivers/pm/CMakeLists.txt rename to config/hhkb_drivers/pm/CMakeLists.txt index 06ab5cd..49c4847 100644 --- a/config/drivers/pm/CMakeLists.txt +++ b/config/hhkb_drivers/pm/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) 2023 Kan-Ru Chen # SPDX-License-Identifier: MIT -zephyr_library_named(zmk__drivers__pm_wake_sensor) +zephyr_library_named(zmk__hhkb_drivers__pm_wake_sensor) zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) zephyr_library_sources(pm_wake_sensor.c) diff --git a/config/drivers/pm/Kconfig b/config/hhkb_drivers/pm/Kconfig similarity index 100% rename from config/drivers/pm/Kconfig rename to config/hhkb_drivers/pm/Kconfig diff --git a/config/drivers/pm/pm_wake_sensor.c b/config/hhkb_drivers/pm/pm_wake_sensor.c similarity index 92% rename from config/drivers/pm/pm_wake_sensor.c rename to config/hhkb_drivers/pm/pm_wake_sensor.c index b553016..cbda91c 100644 --- a/config/drivers/pm/pm_wake_sensor.c +++ b/config/hhkb_drivers/pm/pm_wake_sensor.c @@ -6,8 +6,8 @@ #define DT_DRV_COMPAT zmk_pm_wake_sensor -#include -#include +#include +#include struct pm_wake_sensor_config { @@ -39,4 +39,4 @@ pm_wake_sensor_init(const struct device *dev) APPLICATION, 99, \ NULL); -DT_INST_FOREACH_STATUS_OKAY(CREATE_PM_WAKE_SENSOR) \ No newline at end of file +DT_INST_FOREACH_STATUS_OKAY(CREATE_PM_WAKE_SENSOR) diff --git a/config/drivers/zephyr/module.yml b/config/hhkb_drivers/zephyr/module.yml similarity index 82% rename from config/drivers/zephyr/module.yml rename to config/hhkb_drivers/zephyr/module.yml index 58b6e26..63729da 100644 --- a/config/drivers/zephyr/module.yml +++ b/config/hhkb_drivers/zephyr/module.yml @@ -1,6 +1,6 @@ name: hhkb_drivers build: depends: - - drivers + - drivers cmake: . kconfig: Kconfig