Initial implementation of REVIUNG34 shield.
This commit is contained in:
parent
c1ebadcd2a
commit
5d161d43d1
7 changed files with 185 additions and 0 deletions
6
app/boards/shields/reviung34/Kconfig.defconfig
Normal file
6
app/boards/shields/reviung34/Kconfig.defconfig
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
if SHIELD_REVIUNG34
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "REVIUNG34"
|
||||||
|
|
||||||
|
endif
|
2
app/boards/shields/reviung34/Kconfig.shield
Normal file
2
app/boards/shields/reviung34/Kconfig.shield
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
config SHIELD_REVIUNG34
|
||||||
|
def_bool $(shields_list_contains,reviung34)
|
48
app/boards/shields/reviung34/boards/nice_nano_v2.overlay
Normal file
48
app/boards/shields/reviung34/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
spi3_default: spi3_default {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
spi3_sleep: spi3_sleep {
|
||||||
|
group1 {
|
||||||
|
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||||
|
low-power-enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi3 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
pinctrl-0 = <&spi3_default>;
|
||||||
|
pinctrl-1 = <&spi3_sleep>;
|
||||||
|
pinctrl-names = "default", "sleep";
|
||||||
|
|
||||||
|
led_strip: ws2812@0 {
|
||||||
|
compatible = "worldsemi,ws2812-spi";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
|
/* WS2812 */
|
||||||
|
chain-length = <9>; /* number of LEDs */
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN
|
||||||
|
LED_COLOR_ID_RED
|
||||||
|
LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
3
app/boards/shields/reviung34/reviung34.conf
Normal file
3
app/boards/shields/reviung34/reviung34.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Uncomment the following lines to enable RGB underglow
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||||
|
# CONFIG_WS2812_STRIP=y
|
60
app/boards/shields/reviung34/reviung34.keymap
Normal file
60
app/boards/shields/reviung34/reviung34.keymap
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
Base {
|
||||||
|
label = "Base";
|
||||||
|
bindings = <
|
||||||
|
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
||||||
|
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
|
||||||
|
&mt LSHFT Z &mt LCTRL X &mt LALT C &kp V &kp B &kp N &kp M &mt RALT COMMA &mt RCTRL DOT &mt RSHFT SLASH
|
||||||
|
&kp LGUI < 1 BACKSPACE < 2 SPACE &mo 3
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Lower {
|
||||||
|
label = "Lower";
|
||||||
|
bindings = <
|
||||||
|
&kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PERCENT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR
|
||||||
|
&trans &kp TILDE &kp DOUBLE_QUOTES &kp PIPE &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &mo 4 &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Upper {
|
||||||
|
label = "Upper";
|
||||||
|
bindings = <
|
||||||
|
&kp NUMBER_1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
|
||||||
|
&trans &kp GRAVE &kp SINGLE_QUOTE &kp BSLH &trans &none &kp MINUS &kp EQUAL &kp LBKT &kp RBKT
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &mo 4 &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Function {
|
||||||
|
label = "Function";
|
||||||
|
bindings = <
|
||||||
|
&kp TAB &trans &kp C_VOL_UP &trans &trans &trans &trans &trans &trans &kp ENTER
|
||||||
|
&kp ESC &kp C_BRI_DN &kp C_VOL_DN &kp C_BRI_UP &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &kp C_PWR &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
Meta {
|
||||||
|
label = "Meta";
|
||||||
|
bindings = <
|
||||||
|
&rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &none &none &none &none &bt BT_CLR
|
||||||
|
&rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &none &bt BT_PRV &none &none &bt BT_NXT
|
||||||
|
&none &none &rgb_ug RGB_TOG &none &none &none &none &none &none &none
|
||||||
|
&none &trans &trans &none
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
57
app/boards/shields/reviung34/reviung34.overlay
Normal file
57
app/boards/shields/reviung34/reviung34.overlay
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &dual_1u_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
dual_1u_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <9>;
|
||||||
|
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(3,5)
|
||||||
|
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(3,6)
|
||||||
|
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(3,7)
|
||||||
|
RC(3,2) RC(3,3) RC(3,4) RC(3,8)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
single_2u_transform: keymap_transform_1 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <9>;
|
||||||
|
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(3,5)
|
||||||
|
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(3,6)
|
||||||
|
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(3,7)
|
||||||
|
RC(3,2) RC(3,4) RC(3,8)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan_0 {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 4 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 7 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 16 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 10 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
|
||||||
|
row-gpios
|
||||||
|
= <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
9
app/boards/shields/reviung34/reviung34.zmk.yml
Normal file
9
app/boards/shields/reviung34/reviung34.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: reviung34
|
||||||
|
name: REVIUNG34
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/gtips/reviung/tree/master/reviung34
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- underglow
|
Loading…
Add table
Reference in a new issue