refactor: Replace tabs with spaces

Standardized indentation to use spaces with a new pre-commit hook.
This commit is contained in:
Joel Spadin
2023-04-22 23:25:56 -05:00
committed by Pete Johanson
parent 32ae776c42
commit 94061bb916
613 changed files with 11572 additions and 11567 deletions

View File

@@ -4,44 +4,44 @@
if SHIELD_SNAP_LEFT
config ZMK_KEYBOARD_NAME
default "SNAP"
default "SNAP"
config ZMK_SPLIT_ROLE_CENTRAL
default y
default y
endif
if SHIELD_SNAP_LEFT || SHIELD_SNAP_RIGHT
config ZMK_SPLIT
default y
default y
if ZMK_DISPLAY
config I2C
default y
default y
config SSD1306
default y
default y
config SSD1306_REVERSE_MODE
default y
default y
endif # ZMK_DISPLAY
if LVGL
config LV_Z_VDB_SIZE
default 64
default 64
config LV_Z_DPI
default 148
default 148
config LV_Z_BITS_PER_PIXEL
default 1
default 1
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
default LV_COLOR_DEPTH_1
endchoice
endif # LVGL

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT
config SHIELD_SNAP_LEFT
def_bool $(shields_list_contains,snap_left)
def_bool $(shields_list_contains,snap_left)
config SHIELD_SNAP_RIGHT
def_bool $(shields_list_contains,snap_right)
def_bool $(shields_list_contains,snap_right)

View File

@@ -1,47 +1,47 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
};
};
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
low-power-enable;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
chosen {
zmk,underglow = &led_strip;
};
};

View File

@@ -1,47 +1,47 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
};
};
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
low-power-enable;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 10)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
chosen {
zmk,underglow = &led_strip;
};
};

View File

@@ -7,30 +7,30 @@
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan_composite;
zmk,matrix_transform = &default_transform;
};
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan_composite;
zmk,matrix_transform = &default_transform;
};
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
resolution = <4>;
status = "disabled";
};
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
resolution = <4>;
status = "disabled";
};
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_ENCODER";
resolution = <4>;
status = "disabled";
};
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_ENCODER";
resolution = <4>;
status = "disabled";
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <17>;
rows = <6>;
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <17>;
rows = <6>;
// | R0C06L | R0C05L | R0C04L | R0C03L | R0C02L | R0C01L | R0C00L | | R0C15R | R0C14R | R0C13R | R0C12R | R0C11R | R0C10R | R0C09R | R0C08R |
// R1C07L | R1C06L | R1C05L | R1C04L | R1C03L | R1C02L | R1C01L | R1C00L | | R1C15R | R1C14R | R1C13R | R1C12R | R1C11R | R1C10R | R1C09R | R1C08R | R2C0XR |
@@ -39,48 +39,48 @@
// R4C07L | R4C06L | R4C05L | R4C04L | R4C03L | R4C02L | R4C01L | R4C00L | | R4C15R | R4C14R | R4C13R | R4C12R | R4C11R | R4C10R | R4C09R | R5C08R |
// R5C07L | R5C06L | R5C05L | R5C04L | R5C02L | R5C00L | | R5C15R | R5C14R | R5C13R | R5C12R | R5C11R | R5C10R | R5C09R |
map = <
RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,15) RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8)
map = <
RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,15) RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8)
RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,15) RC(1,14) RC(1,13) RC(1,12) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,16)
RC(2,7) RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,0) RC(2,15) RC(2,14) RC(2,13) RC(2,12) RC(2,11) RC(2,10) RC(2,9) RC(3,8) RC(2,8)
RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,0) RC(3,15) RC(3,14) RC(3,13) RC(3,12) RC(3,11) RC(3,10) RC(3,9) RC(4,8)
RC(4,7) RC(4,6) RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,15) RC(4,14) RC(4,13) RC(4,12) RC(4,11) RC(4,10) RC(4,9) RC(5,8)
RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,2) RC(5,0) RC(5,15) RC(5,14) RC(5,13) RC(5,12) RC(5,11) RC(5,10) RC(5,9)
>;
};
>;
};
kscan_composite: kscan {
compatible = "zmk,kscan-composite";
label = "KSCAN";
rows = <6>;
columns = <17>;
kscan_composite: kscan {
compatible = "zmk,kscan-composite";
label = "KSCAN";
rows = <6>;
columns = <17>;
demux {
kscan = <&kscan_demux>;
};
};
demux {
kscan = <&kscan_demux>;
};
};
kscan_demux: kscan_demux {
compatible = "zmk,kscan-gpio-demux";
label = "DEMUX";
polling-interval-msec = <25>;
};
kscan_demux: kscan_demux {
compatible = "zmk,kscan-gpio-demux";
label = "DEMUX";
polling-interval-msec = <25>;
};
};
&pro_micro_i2c {
status = "okay";
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
com-sequential;
prechargep = <0x22>;
};
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
com-sequential;
prechargep = <0x22>;
};
};

View File

@@ -10,38 +10,38 @@
#include <dt-bindings/zmk/rgb.h>
/ {
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder &right_encoder>;
};
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder &right_encoder>;
};
keymap {
compatible = "zmk,keymap";
keymap {
compatible = "zmk,keymap";
default_layer {
label = "Default";
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>;
bindings = <
default_layer {
label = "Default";
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>;
bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp KP_NUM &kp PAUSE_BREAK
&kp C_MUTE &kp TILDE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
&kp F13 &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
&kp F14 &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
&kp F15 &kp LSHFT &kp NUHS &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
&kp F16 &kp LCTRL &kp LGUI &kp LALT &mo 1 &kp SPACE &kp BSPC &mo 1 &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
};
>;
};
function_layer {
label = "Function";
sensor-bindings = <&inc_dec_kp C_NEXT C_PREV &inc_dec_kp C_NEXT C_PREV>;
bindings = <
function_layer {
label = "Function";
sensor-bindings = <&inc_dec_kp C_NEXT C_PREV &inc_dec_kp C_NEXT C_PREV>;
bindings = <
&bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader
&kp C_PP &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PP
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_BRI &rgb_ug RGB_EFF
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_HUI
>;
};
};
>;
};
};
};

View File

@@ -7,28 +7,28 @@
#include "snap.dtsi"
&kscan_demux {
input-gpios
= <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
output-gpios
= <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
;
input-gpios
= <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
output-gpios
= <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
;
};
&left_encoder {
a-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
status = "okay";
a-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
status = "okay";
};
&oled {
segment-remap;
com-invdir;
segment-remap;
com-invdir;
};

View File

@@ -8,44 +8,44 @@
/ {
kscan_direct: kscan_direct {
compatible = "zmk,kscan-gpio-direct";
label = "DIRECT";
input-gpios
= <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
compatible = "zmk,kscan-gpio-direct";
label = "DIRECT";
input-gpios
= <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};
&default_transform {
col-offset = <8>;
col-offset = <8>;
};
&kscan_composite {
direct {
kscan = <&kscan_direct>;
row-offset = <1>;
column-offset = <8>;
};
direct {
kscan = <&kscan_direct>;
row-offset = <1>;
column-offset = <8>;
};
};
&kscan_demux {
input-gpios
= <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
output-gpios
= <&pro_micro 6 GPIO_ACTIVE_HIGH>
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
, <&pro_micro 4 GPIO_ACTIVE_HIGH>
;
input-gpios
= <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
output-gpios
= <&pro_micro 6 GPIO_ACTIVE_HIGH>
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
, <&pro_micro 4 GPIO_ACTIVE_HIGH>
;
};
&right_encoder {
a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
status = "okay";
a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
status = "okay";
};