Skip to content

Commit

Permalink
Studio support
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Nov 12, 2024
1 parent 2004a8e commit f7f1395
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: West Zephyr export
run: west zephyr-export
- name: West Build (crbnevo)
run: west build -s zmk/app -b alu40 -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
run: west build -s zmk/app -b alu40 -S studio-rpc-usb-uart -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: crbnevo Kconfig file
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
- name: Rename zmk.uf2
Expand Down
2 changes: 1 addition & 1 deletion config/alu40.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
bindings = <
&sys_reset &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &bt BT_CLR
&rgb_ug RGB_ON &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &trans &trans &trans
&rgb_ug RGB_OFF &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &trans &trans
&rgb_ug RGB_OFF &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &trans &studio_unlock
&bootloader &trans &trans &trans &trans &trans &trans &trans &bt BT_PRV &trans &trans &bt BT_NXT
>;

Expand Down
52 changes: 52 additions & 0 deletions config/boards/arm/alu40/alu40.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>
#include <layouts/common/ortho_4x12/1x2u.dtsi>
#include <layouts/common/ortho_4x12/2x2u.dtsi>
#include <layouts/common/ortho_4x12/all1u.dtsi>

#include "pinctrl.dtsi"

Expand Down Expand Up @@ -87,6 +90,43 @@
output-ohms = <100000>;
full-ohms = <(100000 + 100000)>;
};

layout_grid_transform:
keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
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(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(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(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)
>;
};
layout_mit_transform:
keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
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(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(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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
>;
};
layout_2x2u_transform:
keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
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(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(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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
>;
};
};

&adc {
Expand Down Expand Up @@ -175,3 +215,15 @@
};

};

&layout_ortho_4x12_all1u {
transform = <&layout_grid_transform>;
};

&layout_ortho_4x12_1x2u {
transform = <&layout_mit_transform>;
};

&layout_ortho_4x12_2x2u {
transform = <&layout_2x2u_transform>;
};
2 changes: 2 additions & 0 deletions config/boards/arm/alu40/alu40_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ CONFIG_BT_PERIPHERAL_PREF_LATENCY=30

CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y

CONFIG_ZMK_STUDIO=y

0 comments on commit f7f1395

Please sign in to comment.