Skip to content

Commit

Permalink
Initial studio config.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson authored and awkannan committed Aug 16, 2024
1 parent 2b6f064 commit 7360312
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 10 deletions.
5 changes: 5 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
---
include:
- board: bakeneko60_go
artifact-name: bakeneko60_go
- board: bakeneko60_go
snippet: studio-rpc-usb-uart
cmake-args: -DCONFIG_ZMK_STUDIO=y
artifact-name: bakeneko60_go_studio
148 changes: 148 additions & 0 deletions config/boards/arm/bakeneko60_go/bakeneko60_go-layouts.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
#include <physical_layouts.dtsi>

/ {
sixty_percent_ansi: sixty_percent_ansi {
compatible = "zmk,physical-layout";
display-name = "60% ANSI";

transform = <&sixty_percent_ansi_transform>;

keys // w h x y rot rx ry
= <&key_physical_attrs 100 100 0 0 0 0 0>
, <&key_physical_attrs 100 100 100 0 0 0 0>
, <&key_physical_attrs 100 100 200 0 0 0 0>
, <&key_physical_attrs 100 100 300 0 0 0 0>
, <&key_physical_attrs 100 100 400 0 0 0 0>
, <&key_physical_attrs 100 100 500 0 0 0 0>
, <&key_physical_attrs 100 100 600 0 0 0 0>
, <&key_physical_attrs 100 100 700 0 0 0 0>
, <&key_physical_attrs 100 100 800 0 0 0 0>
, <&key_physical_attrs 100 100 900 0 0 0 0>
, <&key_physical_attrs 100 100 1000 0 0 0 0>
, <&key_physical_attrs 100 100 1100 0 0 0 0>
, <&key_physical_attrs 100 100 1200 0 0 0 0>
, <&key_physical_attrs 200 100 1300 0 0 0 0>
, <&key_physical_attrs 150 100 0 100 0 0 0>
, <&key_physical_attrs 100 100 150 100 0 0 0>
, <&key_physical_attrs 100 100 250 100 0 0 0>
, <&key_physical_attrs 100 100 350 100 0 0 0>
, <&key_physical_attrs 100 100 450 100 0 0 0>
, <&key_physical_attrs 100 100 550 100 0 0 0>
, <&key_physical_attrs 100 100 650 100 0 0 0>
, <&key_physical_attrs 100 100 750 100 0 0 0>
, <&key_physical_attrs 100 100 850 100 0 0 0>
, <&key_physical_attrs 100 100 950 100 0 0 0>
, <&key_physical_attrs 100 100 1050 100 0 0 0>
, <&key_physical_attrs 100 100 1150 100 0 0 0>
, <&key_physical_attrs 100 100 1250 100 0 0 0>
, <&key_physical_attrs 150 100 1350 100 0 0 0>
, <&key_physical_attrs 175 100 0 200 0 0 0>
, <&key_physical_attrs 100 100 175 200 0 0 0>
, <&key_physical_attrs 100 100 275 200 0 0 0>
, <&key_physical_attrs 100 100 375 200 0 0 0>
, <&key_physical_attrs 100 100 475 200 0 0 0>
, <&key_physical_attrs 100 100 575 200 0 0 0>
, <&key_physical_attrs 100 100 675 200 0 0 0>
, <&key_physical_attrs 100 100 775 200 0 0 0>
, <&key_physical_attrs 100 100 875 200 0 0 0>
, <&key_physical_attrs 100 100 975 200 0 0 0>
, <&key_physical_attrs 100 100 1075 200 0 0 0>
, <&key_physical_attrs 100 100 1175 200 0 0 0>
, <&key_physical_attrs 225 100 1275 200 0 0 0>
, <&key_physical_attrs 225 100 0 300 0 0 0>
, <&key_physical_attrs 100 100 225 300 0 0 0>
, <&key_physical_attrs 100 100 325 300 0 0 0>
, <&key_physical_attrs 100 100 425 300 0 0 0>
, <&key_physical_attrs 100 100 525 300 0 0 0>
, <&key_physical_attrs 100 100 625 300 0 0 0>
, <&key_physical_attrs 100 100 725 300 0 0 0>
, <&key_physical_attrs 100 100 825 300 0 0 0>
, <&key_physical_attrs 100 100 925 300 0 0 0>
, <&key_physical_attrs 100 100 1025 300 0 0 0>
, <&key_physical_attrs 100 100 1125 300 0 0 0>
, <&key_physical_attrs 275 100 1225 300 0 0 0>
, <&key_physical_attrs 125 100 0 400 0 0 0>
, <&key_physical_attrs 125 100 125 400 0 0 0>
, <&key_physical_attrs 125 100 250 400 0 0 0>
, <&key_physical_attrs 625 100 375 400 0 0 0>
, <&key_physical_attrs 125 100 1000 400 0 0 0>
, <&key_physical_attrs 125 100 1125 400 0 0 0>
, <&key_physical_attrs 125 100 1250 400 0 0 0>
, <&key_physical_attrs 125 100 1375 400 0 0 0>
;
};

sixty_percent_ansi_split_bs_rshift: sixty_percent_ansi_split_bs_rshift {
compatible = "zmk,physical-layout";
display-name = "60% ANSI Split BS/Shift";

transform = <&sixty_percent_ansi_split_bs_rshift_transform>;

keys // w h x y rot rx ry
= <&key_physical_attrs 100 100 0 0 0 0 0>
, <&key_physical_attrs 100 100 100 0 0 0 0>
, <&key_physical_attrs 100 100 200 0 0 0 0>
, <&key_physical_attrs 100 100 300 0 0 0 0>
, <&key_physical_attrs 100 100 400 0 0 0 0>
, <&key_physical_attrs 100 100 500 0 0 0 0>
, <&key_physical_attrs 100 100 600 0 0 0 0>
, <&key_physical_attrs 100 100 700 0 0 0 0>
, <&key_physical_attrs 100 100 800 0 0 0 0>
, <&key_physical_attrs 100 100 900 0 0 0 0>
, <&key_physical_attrs 100 100 1000 0 0 0 0>
, <&key_physical_attrs 100 100 1100 0 0 0 0>
, <&key_physical_attrs 100 100 1200 0 0 0 0>
, <&key_physical_attrs 100 100 1300 0 0 0 0>
, <&key_physical_attrs 100 100 1400 0 0 0 0>
, <&key_physical_attrs 150 100 0 100 0 0 0>
, <&key_physical_attrs 100 100 150 100 0 0 0>
, <&key_physical_attrs 100 100 250 100 0 0 0>
, <&key_physical_attrs 100 100 350 100 0 0 0>
, <&key_physical_attrs 100 100 450 100 0 0 0>
, <&key_physical_attrs 100 100 550 100 0 0 0>
, <&key_physical_attrs 100 100 650 100 0 0 0>
, <&key_physical_attrs 100 100 750 100 0 0 0>
, <&key_physical_attrs 100 100 850 100 0 0 0>
, <&key_physical_attrs 100 100 950 100 0 0 0>
, <&key_physical_attrs 100 100 1050 100 0 0 0>
, <&key_physical_attrs 100 100 1150 100 0 0 0>
, <&key_physical_attrs 100 100 1250 100 0 0 0>
, <&key_physical_attrs 150 100 1350 100 0 0 0>
, <&key_physical_attrs 175 100 0 200 0 0 0>
, <&key_physical_attrs 100 100 175 200 0 0 0>
, <&key_physical_attrs 100 100 275 200 0 0 0>
, <&key_physical_attrs 100 100 375 200 0 0 0>
, <&key_physical_attrs 100 100 475 200 0 0 0>
, <&key_physical_attrs 100 100 575 200 0 0 0>
, <&key_physical_attrs 100 100 675 200 0 0 0>
, <&key_physical_attrs 100 100 775 200 0 0 0>
, <&key_physical_attrs 100 100 875 200 0 0 0>
, <&key_physical_attrs 100 100 975 200 0 0 0>
, <&key_physical_attrs 100 100 1075 200 0 0 0>
, <&key_physical_attrs 100 100 1175 200 0 0 0>
, <&key_physical_attrs 225 100 1275 200 0 0 0>
, <&key_physical_attrs 225 100 0 300 0 0 0>
, <&key_physical_attrs 100 100 225 300 0 0 0>
, <&key_physical_attrs 100 100 325 300 0 0 0>
, <&key_physical_attrs 100 100 425 300 0 0 0>
, <&key_physical_attrs 100 100 525 300 0 0 0>
, <&key_physical_attrs 100 100 625 300 0 0 0>
, <&key_physical_attrs 100 100 725 300 0 0 0>
, <&key_physical_attrs 100 100 825 300 0 0 0>
, <&key_physical_attrs 100 100 925 300 0 0 0>
, <&key_physical_attrs 100 100 1025 300 0 0 0>
, <&key_physical_attrs 100 100 1125 300 0 0 0>
, <&key_physical_attrs 175 100 1225 300 0 0 0>
, <&key_physical_attrs 100 100 1400 300 0 0 0>
, <&key_physical_attrs 125 100 0 400 0 0 0>
, <&key_physical_attrs 125 100 125 400 0 0 0>
, <&key_physical_attrs 125 100 250 400 0 0 0>
, <&key_physical_attrs 625 100 375 400 0 0 0>
, <&key_physical_attrs 125 100 1000 400 0 0 0>
, <&key_physical_attrs 125 100 1125 400 0 0 0>
, <&key_physical_attrs 125 100 1250 400 0 0 0>
, <&key_physical_attrs 125 100 1375 400 0 0 0>
;
};
};

25 changes: 17 additions & 8 deletions config/boards/arm/bakeneko60_go/bakeneko60_go.dts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <dt-bindings/zmk/matrix_transform.h>

#include "bakeneko60_go-pinctrl.dtsi"
#include "bakeneko60_go-layouts.dtsi"

/ {
model = "bakeneko60_go";
Expand All @@ -20,14 +21,13 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
zmk,underglow = &led_strip;
zmk,physical-layout = &sixty_percent_ansi_split_bs_rshift;
};

default_transform: keymap_transform_0 {
sixty_percent_ansi_split_bs_rshift_transform: sixty_percent_ansi_split_bs_rshift_transform {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
Expand All @@ -40,6 +40,19 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
>;
};

sixty_percent_ansi_transform: sixty_percent_ansi_transform {
compatible = "zmk,matrix-transform";
columns = <15>;
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,14)
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,14)
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,14)
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,14)
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,9) RC(4,10) RC(4,12) RC(4,14)
>;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
Expand Down Expand Up @@ -133,12 +146,8 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
};
};

&usbd {
zephyr_udc0: &usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};

&flash0 {
Expand Down
6 changes: 4 additions & 2 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: petejohanson
url-base: https://github.com/petejohanson
# Additional modules containing boards/shields/custom code can be listed here as well
# See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects
projects:
- name: zmk
remote: zmkfirmware
revision: main
remote: petejohanson
revision: studio/keymap-subsystem
import: app/west.yml
self:
path: config

0 comments on commit 7360312

Please sign in to comment.