dev: init zmk files
This commit is contained in:
parent
5c17fd0e3f
commit
f344124981
12 changed files with 214 additions and 0 deletions
16
boards/shields/phiboard/Kconfig.defconfig
Normal file
16
boards/shields/phiboard/Kconfig.defconfig
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
if SHIELD_PHIBOARD_LEFT
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "phiboard"
|
||||||
|
|
||||||
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # SHIELD_PHIBOARD_LEFT
|
||||||
|
|
||||||
|
if SHIELD_PHIBOARD_LEFT || SHIELD_PHIBOARD_RIGHT
|
||||||
|
|
||||||
|
config ZMK_SPLIT
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # SHIELD_PHIBOARD_LEFT || SHIELD_PHIBOARD_RIGHT
|
||||||
5
boards/shields/phiboard/Kconfig.shield
Normal file
5
boards/shields/phiboard/Kconfig.shield
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
config SHIELD_PHIBOARD_LEFT
|
||||||
|
def_bool $(shields_list_contains,phiboard_left)
|
||||||
|
|
||||||
|
config SHIELD_PHIBOARD_RIGHT
|
||||||
|
def_bool $(shields_list_contains,phiboard_right)
|
||||||
23
boards/shields/phiboard/phiboard-layouts.dtsi
Normal file
23
boards/shields/phiboard/phiboard-layouts.dtsi
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/physical-layouts
|
||||||
|
// for how to configure this.
|
||||||
|
|
||||||
|
#include <physical_layouts.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
default_layout: default_layout {
|
||||||
|
compatible = "zmk,physical-layout";
|
||||||
|
display-name = "Default Layout";
|
||||||
|
transform = <&default_transform>;
|
||||||
|
kscan = <&kscan>;
|
||||||
|
|
||||||
|
// Edit this to define the positions and sizes of the keys, or remove it
|
||||||
|
// if your keyboard will not support ZMK Studio.
|
||||||
|
// https://zmk.dev/docs/development/hardware-integration/physical-layouts#optional-keys-property
|
||||||
|
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 0 100 0 0 0>
|
||||||
|
, <&key_physical_attrs 100 100 100 100 0 0 0>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
13
boards/shields/phiboard/phiboard.conf
Normal file
13
boards/shields/phiboard/phiboard.conf
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
# See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||||
|
# instructions.
|
||||||
|
|
||||||
|
# This file will be copied into the user's config directory when they add this
|
||||||
|
# keyboard. Define any Kconfig options users may frequently want to set here,
|
||||||
|
# but leave them commented out, for example:
|
||||||
|
|
||||||
|
# Uncomment to enable the encoder
|
||||||
|
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
|
# Uncomment to enable the display
|
||||||
|
# CONFIG_ZMK_DISPLAY=y
|
||||||
46
boards/shields/phiboard/phiboard.dtsi
Normal file
46
boards/shields/phiboard/phiboard.dtsi
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
// This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||||
|
// instructions.
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
#include "phiboard-layouts.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,physical-layout = &default_layout;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan: kscan {
|
||||||
|
// If the hardware does not use a switch matrix, change this to the
|
||||||
|
// appropriate driver and update the properties below to match.
|
||||||
|
// See https://zmk.dev/docs/config/kscan for supported key scan drivers.
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
// Set this to "col2row" or "row2col" to match the hardware. If using
|
||||||
|
// "row2col", change the col-gpios in the _left.overlay and _right.overlay
|
||||||
|
// files to (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) and the row-gpios here to
|
||||||
|
// GPIO_ACTIVE_HIGH.
|
||||||
|
diode-direction = "col2row";
|
||||||
|
wakeup-source;
|
||||||
|
|
||||||
|
// Replace these comments with the GPIO pins in the matrix.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays
|
||||||
|
row-gpios
|
||||||
|
= <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: default_transform {
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield#matrix-transform
|
||||||
|
// for how to configure this
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <4>;
|
||||||
|
rows = <2>;
|
||||||
|
|
||||||
|
map = <
|
||||||
|
RC(0, 0) RC(0, 1) RC(0, 2) RC(0, 3)
|
||||||
|
RC(1, 0) RC(1, 1) RC(1, 2) RC(1, 3)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
20
boards/shields/phiboard/phiboard.keymap
Normal file
20
boards/shields/phiboard/phiboard.keymap
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
// This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more instructions.
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
// Define a default keymap here.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield#default-keymap.
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp N1 &kp N2 &kp N3 &kp N4
|
||||||
|
&kp A &kp B &kp C &kp D
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
19
boards/shields/phiboard/phiboard.zmk.yml
Normal file
19
boards/shields/phiboard/phiboard.zmk.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files
|
||||||
|
# for instructions.
|
||||||
|
|
||||||
|
file_format: "1"
|
||||||
|
id: phiboard
|
||||||
|
name: phiboard
|
||||||
|
type: shield
|
||||||
|
|
||||||
|
# Set this to a URL that documents the keyboard.
|
||||||
|
url: https://example.com
|
||||||
|
|
||||||
|
# Add any features your keyboard supports here.
|
||||||
|
# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files#features
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- studio # Remove this line if your keyboard will not support ZMK Studio
|
||||||
|
requires:
|
||||||
|
- seeed_xiao
|
||||||
14
boards/shields/phiboard/phiboard_left.overlay
Normal file
14
boards/shields/phiboard/phiboard_left.overlay
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
// This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||||
|
// instructions.
|
||||||
|
|
||||||
|
#include "phiboard.dtsi"
|
||||||
|
|
||||||
|
&kscan {
|
||||||
|
// Replace these comments with the GPIO pins in the matrix for the left side.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays
|
||||||
|
col-gpios
|
||||||
|
= <&xiao_d 0 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&xiao_d 0 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
};
|
||||||
19
boards/shields/phiboard/phiboard_right.overlay
Normal file
19
boards/shields/phiboard/phiboard_right.overlay
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
// This file was generated from a template. Edit it to match your keyboard.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||||
|
// instructions.
|
||||||
|
|
||||||
|
#include "phiboard.dtsi"
|
||||||
|
|
||||||
|
&default_transform {
|
||||||
|
// Set this to the number of columns on the left side.
|
||||||
|
col-offset = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&kscan {
|
||||||
|
// Replace these comments with the GPIO pins in the matrix for the right side.
|
||||||
|
// See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays
|
||||||
|
col-gpios
|
||||||
|
= <&xiao_d 0 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&xiao_d 0 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
};
|
||||||
22
build.yaml
Normal file
22
build.yaml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# This file generates the GitHub Actions matrix.
|
||||||
|
# For simple board + shield combinations, add them to the top level board and
|
||||||
|
# shield arrays, for more control, add individual board + shield combinations
|
||||||
|
# to the `include` property. You can also use the `cmake-args` property to
|
||||||
|
# pass flags to the build command, `snippet` to add a Zephyr snippet, and
|
||||||
|
# `artifact-name` to assign a name to distinguish build outputs from each other:
|
||||||
|
#
|
||||||
|
# board: [ "nice_nano_v2" ]
|
||||||
|
# shield: [ "corne_left", "corne_right" ]
|
||||||
|
# include:
|
||||||
|
# - board: bdn9_rev2
|
||||||
|
# - board: nice_nano_v2
|
||||||
|
# shield: reviung41
|
||||||
|
# - board: nice_nano_v2
|
||||||
|
# shield: corne_left
|
||||||
|
# snippet: studio-rpc-usb-uart
|
||||||
|
# cmake-args: -DCONFIG_ZMK_STUDIO=y
|
||||||
|
# artifact-name: corne_left_with_studio
|
||||||
|
#
|
||||||
|
---
|
||||||
|
null
|
||||||
|
...
|
||||||
14
config/west.yml
Normal file
14
config/west.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
manifest:
|
||||||
|
defaults:
|
||||||
|
revision: v0.2
|
||||||
|
remotes:
|
||||||
|
- name: zmkfirmware
|
||||||
|
url-base: https://github.com/zmkfirmware
|
||||||
|
# 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
|
||||||
|
import: app/west.yml
|
||||||
|
self:
|
||||||
|
path: config
|
||||||
3
zephyr/module.yml
Normal file
3
zephyr/module.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
build:
|
||||||
|
settings:
|
||||||
|
board_root: .
|
||||||
Loading…
Add table
Add a link
Reference in a new issue