Prepared murphpad for PR. Includes adding support for second encoder, OLED, and underglow RGB
This commit is contained in:
parent
8ed7588767
commit
9b2f6a8e80
7 changed files with 41 additions and 28 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_MURPHPAD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_MURPHPAD
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Enable underglow
|
||||
# Uncomment both to enable underglow
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# Use the STRIP config specific to the LEDs you're using
|
||||
CONFIG_WS2812_STRIP=y
|
||||
CONFIG_WS2812_STRIP=y
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Uncomment to turn on logging, and set ZMK logging to debug output
|
||||
# CONFIG_ZMK_USB_LOGGING=y
|
||||
|
||||
# Uncomment to enable encoder
|
||||
# Uncomment both to enable encoder
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
# Uncomment to enable OLED
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
# CONFIG_ZMK_DISPLAY=y
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
@ -7,7 +7,8 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/ext_power.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
|
||||
|
||||
#define TIMEOUT 300
|
||||
|
||||
|
@ -15,6 +16,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&encoder_2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/ {
|
||||
combos {
|
||||
compatible = "zmk,combos";
|
||||
|
@ -42,7 +47,7 @@
|
|||
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
sensors = <&encoder_1 &encoder_2>;
|
||||
};
|
||||
|
||||
|
||||
|
@ -52,28 +57,28 @@
|
|||
default_layer {
|
||||
label = "default layer";
|
||||
bindings = <
|
||||
&none &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D)
|
||||
&none &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
||||
&none &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS
|
||||
&kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &none
|
||||
&mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER
|
||||
&kp BSPC &kp KP_N0 &none &kp KP_DOT &none
|
||||
&bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D)
|
||||
&rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
||||
&rgb_ug RGB_EFF &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS
|
||||
&kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans
|
||||
&mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER
|
||||
&kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOLUME_DOWN C_VOLUME_UP>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
|
||||
|
||||
};
|
||||
|
||||
fn_layer {
|
||||
label = "fn layer";
|
||||
bindings = <
|
||||
&none &trans &trans &trans &trans
|
||||
&none &kp KP_NUM &trans &trans &trans
|
||||
&none &trans &trans &trans &ext_power EP_ON
|
||||
&bt BT_CLR &trans &trans &trans &none
|
||||
&trans &trans &trans &trans &ext_power EP_OFF
|
||||
&kp DEL &trans &none &trans &none
|
||||
&trans &trans &trans &trans &trans
|
||||
&trans &kp KP_NUM &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans
|
||||
&bt BT_CLR &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans
|
||||
&kp DEL &trans &trans &trans &trans
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_BRI_DN C_BRI_UP>;
|
||||
sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
@ -36,8 +36,17 @@
|
|||
encoder_1: encoder_1 {
|
||||
compatible = "alps,ec11";
|
||||
label = "Encoder 1";
|
||||
a-gpios = <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
a-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
encoder_2: encoder_2 {
|
||||
compatible = "alps,ec11";
|
||||
label = "Encoder 2";
|
||||
a-gpios = <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue