Skip to content

Commit

Permalink
Merge pull request #27 from ramenguy99/Hotswap
Browse files Browse the repository at this point in the history
Fix Hotswap build
  • Loading branch information
ReFil authored Apr 18, 2024
2 parents cceac1e + 2445b3b commit e9fe34f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
name: Build
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache west modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Rename zmk.uf2
run: cp build/zephyr/zmk.uf2 bt60.uf2
- name: Archive (bt60)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: firmware
path: bt60.uf2
34 changes: 34 additions & 0 deletions config/boards/arm/bt60/bt60-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up;
};
group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>;
};
};

uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable;
};
};

i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>;
};
};

i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>;
low-power-enable;
};
};
};
14 changes: 9 additions & 5 deletions config/boards/arm/bt60/bt60.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>

#include "bt60-pinctrl.dtsi"

/ {
model = "BT60";
compatible = "bt60";
Expand Down Expand Up @@ -114,15 +116,17 @@ left_encoder: encoder_left {
};

&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};

&usbd {
Expand Down
3 changes: 3 additions & 0 deletions config/boards/arm/bt60/bt60_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_BUILD_OUTPUT_UF2=y

# ZMK
CONFIG_PINCTRL=y
2 changes: 1 addition & 1 deletion config/bt60.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
raise {
bindings = <
&kp GRAVE &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 DEL &trans
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
Expand Down

0 comments on commit e9fe34f

Please sign in to comment.