First attempt at adding reviung5
This commit is contained in:
parent
6e7c2a08a2
commit
b66a7929d3
5 changed files with 105 additions and 0 deletions
6
app/boards/shields/reviung5/Kconfig.defconfig
Normal file
6
app/boards/shields/reviung5/Kconfig.defconfig
Normal file
|
@ -0,0 +1,6 @@
|
|||
if SHIELD_REVIUNG5
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Reviung5"
|
||||
|
||||
endif
|
2
app/boards/shields/reviung5/Kconfig.shield
Normal file
2
app/boards/shields/reviung5/Kconfig.shield
Normal file
|
@ -0,0 +1,2 @@
|
|||
config SHIELD_REVIUNG5
|
||||
def_bool $(shields_list_contains,reviung5)
|
53
app/boards/shields/reviung5/boards/nice_nano.overlay
Normal file
53
app/boards/shields/reviung5/boards/nice_nano.overlay
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <5>;
|
||||
rows = <1>;
|
||||
|
||||
map = <RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4)>;
|
||||
};
|
||||
|
||||
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>
|
||||
;
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
||||
|
||||
encoder: encoder {
|
||||
compatible = "alps,ec11";
|
||||
label = "encoder";
|
||||
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder>;
|
||||
};
|
||||
};
|
4
app/boards/shields/reviung5/reviung5.conf
Normal file
4
app/boards/shields/reviung5/reviung5.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
# Encoder support. Uncomment to enable.
|
||||
# CONFIG_EC11=y
|
||||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
40
app/boards/shields/reviung5/reviung5.keymap
Normal file
40
app/boards/shields/reviung5/reviung5.keymap
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
|
||||
#define BASE 0
|
||||
#define BLE 1
|
||||
|
||||
&encoder { status = "okay"; };
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
base_layer {
|
||||
label = "BASE";
|
||||
bindings = <
|
||||
// ╭─────────────┬──────────────┬──────────────────┬─────────────┬─────────────╮
|
||||
&mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT &kp C_MUTE
|
||||
// ╰─────────────┴──────────────┴──────────────────┴─────────────┴─────────────╯
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
|
||||
ble_layer {
|
||||
label = "BLE";
|
||||
bindings = <
|
||||
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
|
||||
&to BASE &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR
|
||||
// ╰─────────────┴─────────────┴─────────────┴─────────────┴─────────────╯
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Add table
Reference in a new issue