fix(formatting): Fix pre-commit errors

This commit is contained in:
ReFil 2023-04-25 12:12:50 +01:00
parent d135e6a073
commit 8555d2635b
7 changed files with 202 additions and 202 deletions

View file

@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC config BOARD_ENABLE_DCDC
bool "Enable DCDC mode" bool "Enable DCDC mode"
select SOC_DCDC_NRF52X select SOC_DCDC_NRF52X
default y default y
depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

View file

@ -4,13 +4,13 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_BT60_V2 config BOARD_BT60_V2
bool "bt60_v2" bool "bt60_v2"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_BT65_V1 config BOARD_BT65_V1
bool "bt65_v1" bool "bt65_v1"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_BT75_V1 config BOARD_BT75_V1
bool "bt75_v1" bool "bt75_v1"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

View file

@ -2,33 +2,33 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD config BOARD
default "bt60_v2" if BOARD_BT60_V2 default "bt60_v2" if BOARD_BT60_V2
default "bt65_v1" if BOARD_BT65_V1 default "bt65_v1" if BOARD_BT65_V1
default "bt75_v1" if BOARD_BT75_V1 default "bt75_v1" if BOARD_BT75_V1
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "BT60 V2" if BOARD_BT60_V2 default "BT60 V2" if BOARD_BT60_V2
default "BT65" if BOARD_BT65_V1 default "BT65" if BOARD_BT65_V1
default "BT75" if BOARD_BT75_V1 default "BT75" if BOARD_BT75_V1
if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
if USB if USB
config USB_NRFX config USB_NRFX
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y default y
endif # USB endif # USB
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

View file

@ -61,7 +61,7 @@
columns = <15>; columns = <15>;
rows = <5>; rows = <5>;
map = < map = <
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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) 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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) 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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)

View file

@ -22,7 +22,7 @@
columns = <16>; columns = <16>;
rows = <5>; rows = <5>;
map = < map = <
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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15) 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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15) 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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15) RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
@ -35,7 +35,7 @@
columns = <16>; columns = <16>;
rows = <5>; rows = <5>;
map = < map = <
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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15) 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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15) 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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
@ -61,7 +61,7 @@
columns = <16>; columns = <16>;
rows = <5>; rows = <5>;
map = < map = <
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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15) 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(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15) 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(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,15) RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,15)

View file

@ -5,27 +5,27 @@
*/ */
&pinctrl { &pinctrl {
spi3_default: spi3_default { spi3_default: spi3_default {
group1 { group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>; psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
}; };
}; };
spi3_sleep: spi3_sleep { spi3_sleep: spi3_sleep {
group1 { group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>; psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
low-power-enable; low-power-enable;
}; };
}; };
pwm0_default: pwm0_default { pwm0_default: pwm0_default {
group1 { group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>; psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
}; };
}; };
pwm0_sleep: pwm0_sleep { pwm0_sleep: pwm0_sleep {
group1 { group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>; psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
low-power-enable; low-power-enable;
}; };
}; };
}; };

View file

@ -13,205 +13,205 @@
#include "ckp-pinctrl.dtsi" #include "ckp-pinctrl.dtsi"
/ { / {
model = "CKP"; model = "CKP";
compatible = "polarityworks,ckp"; compatible = "polarityworks,ckp";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,underglow = &led_strip; zmk,underglow = &led_strip;
zmk,backlight = &backlight; zmk,backlight = &backlight;
zmk,battery = &vbatt; zmk,battery = &vbatt;
}; };
sensors { sensors {
compatible = "zmk,keymap-sensors"; compatible = "zmk,keymap-sensors";
sensors = <&encoder_1>; sensors = <&encoder_1>;
}; };
kscan0: kscan_0 { kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN"; label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
col-gpios col-gpios
= <&gpio1 11 GPIO_ACTIVE_HIGH> = <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio1 10 GPIO_ACTIVE_HIGH> , <&gpio1 10 GPIO_ACTIVE_HIGH>
, <&gpio1 13 GPIO_ACTIVE_HIGH> , <&gpio1 13 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH> , <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH> , <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH> , <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH> , <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH> , <&gpio0 5 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH> , <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH> , <&gpio0 23 GPIO_ACTIVE_HIGH>
, <&gpio1 6 GPIO_ACTIVE_HIGH> , <&gpio1 6 GPIO_ACTIVE_HIGH>
; ;
row-gpios row-gpios
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
}; };
ext-power { ext-power {
compatible = "zmk,ext-power-generic"; compatible = "zmk,ext-power-generic";
label = "EXT_POWER"; label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
}; };
encoder_1: encoder_1 { encoder_1: encoder_1 {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "ENCODER_ONE"; label = "ENCODER_ONE";
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "okay"; status = "okay";
}; };
encoder_2: encoder_2 { encoder_2: encoder_2 {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "ENCODER_TWO"; label = "ENCODER_TWO";
a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "okay"; status = "okay";
}; };
encoder_3: encoder_3 { encoder_3: encoder_3 {
compatible = "alps,ec11"; compatible = "alps,ec11";
label = "encoder_3"; label = "encoder_3";
a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>; resolution = <4>;
status = "okay"; status = "okay";
}; };
backlight: pwmleds { backlight: pwmleds {
compatible = "pwm-leds"; compatible = "pwm-leds";
label = "Backlight LEDs"; label = "Backlight LEDs";
pwm_led_0 { pwm_led_0 {
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>; pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
}; };
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led: led_0 { blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED"; label = "Blue LED";
}; };
}; };
vbatt: vbatt { vbatt: vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "VBATT"; label = "VBATT";
io-channels = <&adc 2>; io-channels = <&adc 2>;
output-ohms = <100000>; output-ohms = <100000>;
full-ohms = <(100000 + 100000)>; full-ohms = <(100000 + 100000)>;
}; };
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&pwm0 { &pwm0 {
status = "okay"; status = "okay";
pinctrl-0 = <&pwm0_default>; pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>; pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&usbd { &usbd {
status = "okay"; status = "okay";
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };
&spi3 { &spi3 {
compatible = "nordic,nrf-spim"; compatible = "nordic,nrf-spim";
status = "okay"; status = "okay";
pinctrl-0 = <&spi3_default>; pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>; pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
led_strip: ws2812@0 { led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi"; compatible = "worldsemi,ws2812-spi";
label = "WS2812"; label = "WS2812";
/* SPI */ /* SPI */
reg = <0>; reg = <0>;
spi-max-frequency = <4000000>; spi-max-frequency = <4000000>;
/* WS2812 */ /* WS2812 */
chain-length = <12>; /* number of LEDs */ chain-length = <12>; /* number of LEDs */
spi-one-frame = <0x70>; spi-one-frame = <0x70>;
spi-zero-frame = <0x40>; spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>; LED_COLOR_ID_BLUE>;
}; };
}; };