Skip to content

Commit

Permalink
Merge pull request #5 from kanru/zephyr-3.2
Browse files Browse the repository at this point in the history
Update to Zephyr 3.2
  • Loading branch information
kanru authored Jun 24, 2023
2 parents 8771a1a + b225d12 commit 3151494
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 21 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions config/boards/shields/hhkb/hhkb.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,4 +40,4 @@
>;
};
};
};
};
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

#define DT_DRV_COMPAT zmk_kscan_gpio_topre

#include <device.h>
#include <drivers/kscan.h>
#include <drivers/gpio.h>
#include <logging/log.h>
#include <zephyr/device.h>
#include <zephyr/drivers/kscan.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/logging/log.h>
#include <zmk/event_manager.h>
#include <zmk/events/activity_state_changed.h>

Expand Down Expand Up @@ -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)
DT_INST_FOREACH_STATUS_OKAY(CREATE_KSCAN_GPIO_TOPRE)
Original file line number Diff line number Diff line change
@@ -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)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#define DT_DRV_COMPAT zmk_pm_wake_sensor

#include <device.h>
#include <drivers/gpio.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>

struct pm_wake_sensor_config
{
Expand Down Expand Up @@ -39,4 +39,4 @@ pm_wake_sensor_init(const struct device *dev)
APPLICATION, 99, \
NULL);

DT_INST_FOREACH_STATUS_OKAY(CREATE_PM_WAKE_SENSOR)
DT_INST_FOREACH_STATUS_OKAY(CREATE_PM_WAKE_SENSOR)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hhkb_drivers
build:
depends:
- drivers
- drivers
cmake: .
kconfig: Kconfig

0 comments on commit 3151494

Please sign in to comment.