forked from kofal.net/zmk
feat: Add shared layout .dtsi files to promote reuse.
* Add Corne and Ferris shared layouts, and update the respective shields to use them. * Add a sample Hummingbird physical layout for testing posix xiao. * Add Sofle physical layout as an additional reference.
This commit is contained in:
committed by
Pete Johanson
parent
b84436e611
commit
e0339a2a57
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#undef ZMK_BEHAVIORS_KEEP_ALL
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include <layouts/cuddlykeyboards/ferris.dtsi>
|
||||
|
||||
&cuddlykeyboards_ferris_layout {
|
||||
transform = <&transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
model = "Ferris rev0.2";
|
||||
compatible = "ferris,rev02", "st,stm32f072";
|
||||
@@ -18,7 +24,6 @@
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan;
|
||||
zmk,matrix-transform = &transform;
|
||||
/* TODO: Enable once we support the IC for underglow
|
||||
zmk,underglow = &led_strip;
|
||||
*/
|
||||
@@ -114,6 +119,9 @@ zephyr_udc0: &usb {
|
||||
|
||||
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
// Overridden to lower RAM usage.
|
||||
num-bidir-endpoints = <4>;
|
||||
};
|
||||
|
||||
&clk_hsi {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#undef ZMK_BEHAVIORS_KEEP_ALL
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
@@ -6,11 +6,21 @@
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include <layouts/foostan/corne.dtsi>
|
||||
|
||||
&foostan_corne_6col_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
&foostan_corne_5col_layout {
|
||||
transform = <&five_column_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,physical-layout = &foostan_corne_6col_layout;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
@@ -36,7 +46,7 @@ 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)
|
||||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
|
||||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
|
||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
map = <
|
||||
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(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)
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
#include <layouts/cuddlykeyboards/ferris.dtsi>
|
||||
|
||||
&cuddlykeyboards_ferris_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include <physical_layouts.dtsi>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
/delete-property/ zephyr,console;
|
||||
/delete-property/ zephyr,shell-uart;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
@@ -51,7 +50,45 @@
|
||||
;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&xiao_spi { status = "disabled"; };
|
||||
&xiao_serial { status = "disabled"; };
|
||||
layout_0: layout_0 {
|
||||
compatible = "zmk,physical-layout";
|
||||
display-name = "Default";
|
||||
|
||||
transform = <&default_transform>;
|
||||
|
||||
keys // w h x y rot rx ry
|
||||
= <&key_physical_attrs 100 100 0 75 0 0 0>
|
||||
, <&key_physical_attrs 100 100 100 25 0 0 0>
|
||||
, <&key_physical_attrs 100 100 200 0 0 0 0>
|
||||
, <&key_physical_attrs 100 100 300 25 0 0 0>
|
||||
, <&key_physical_attrs 100 100 400 75 0 0 0>
|
||||
, <&key_physical_attrs 100 100 600 75 0 0 0>
|
||||
, <&key_physical_attrs 100 100 700 25 0 0 0>
|
||||
, <&key_physical_attrs 100 100 800 0 0 0 0>
|
||||
, <&key_physical_attrs 100 100 900 25 0 0 0>
|
||||
, <&key_physical_attrs 100 100 1000 75 0 0 0>
|
||||
, <&key_physical_attrs 100 100 0 175 0 0 0>
|
||||
, <&key_physical_attrs 100 100 100 125 0 0 0>
|
||||
, <&key_physical_attrs 100 100 200 100 0 0 0>
|
||||
, <&key_physical_attrs 100 100 300 125 0 0 0>
|
||||
, <&key_physical_attrs 100 100 400 175 0 0 0>
|
||||
, <&key_physical_attrs 100 100 600 175 0 0 0>
|
||||
, <&key_physical_attrs 100 100 700 125 0 0 0>
|
||||
, <&key_physical_attrs 100 100 800 100 0 0 0>
|
||||
, <&key_physical_attrs 100 100 900 125 0 0 0>
|
||||
, <&key_physical_attrs 100 100 1000 175 0 0 0>
|
||||
, <&key_physical_attrs 100 100 100 225 0 0 0>
|
||||
, <&key_physical_attrs 100 100 200 200 0 0 0>
|
||||
, <&key_physical_attrs 100 100 300 225 0 0 0>
|
||||
, <&key_physical_attrs 100 100 700 225 0 0 0>
|
||||
, <&key_physical_attrs 100 100 800 200 0 0 0>
|
||||
, <&key_physical_attrs 100 100 900 225 0 0 0>
|
||||
, <&key_physical_attrs 100 100 325 350 0 0 0>
|
||||
, <&key_physical_attrs 100 100 425 375 0 0 0>
|
||||
, <&key_physical_attrs 100 100 575 375 0 0 0>
|
||||
, <&key_physical_attrs 100 100 675 350 0 0 0>
|
||||
;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
#include <layouts/josefadamcik/sofle.dtsi>
|
||||
|
||||
&josefadamcik_sofle_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
||||
@@ -6,11 +6,20 @@
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include <layouts/foostan/corne.dtsi>
|
||||
|
||||
&foostan_corne_6col_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
&foostan_corne_5col_layout {
|
||||
transform = <&five_column_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
||||
@@ -6,11 +6,16 @@
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include <layouts/josefadamcik/sofle.dtsi>
|
||||
|
||||
&josefadamcik_sofle_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
||||
@@ -6,11 +6,15 @@
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
#include <layouts/cuddlykeyboards/ferris.dtsi>
|
||||
|
||||
&cuddlykeyboards_ferris_layout {
|
||||
transform = <&default_transform>;
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
||||
Reference in New Issue
Block a user