forked from kofal.net/zmk
refactor: Replace tabs with spaces
Standardized indentation to use spaces with a new pre-commit hook.
This commit is contained in:
committed by
Pete Johanson
parent
32ae776c42
commit
94061bb916
@@ -4,9 +4,9 @@
|
||||
#
|
||||
|
||||
config BOARD_CORNEISH_ZEN_V2_LEFT
|
||||
bool "corneish zen left v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
bool "corneish zen left v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
|
||||
config BOARD_CORNEISH_ZEN_V2_RIGHT
|
||||
bool "corneish zen right v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
bool "corneish zen right v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
@@ -6,10 +6,10 @@
|
||||
if BOARD_CORNEISH_ZEN_V2_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Corne-ish Zen"
|
||||
default "Corne-ish Zen"
|
||||
|
||||
config ZMK_SPLIT_ROLE_CENTRAL
|
||||
default y
|
||||
default y
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_V2_LEFT
|
||||
|
||||
@@ -17,65 +17,65 @@ endif # BOARD_CORNEISH_ZEN_V2_LEFT
|
||||
if BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT
|
||||
|
||||
config BOARD
|
||||
default "corneish_zen"
|
||||
default "corneish_zen"
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
default y
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
default y
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
config ZMK_DISPLAY
|
||||
select LV_USE_CONT
|
||||
select LV_FONT_MONTSERRAT_26
|
||||
select LV_FONT_MONTSERRAT_20
|
||||
select LV_FONT_MONTSERRAT_16
|
||||
select LV_USE_LABEL
|
||||
select LV_USE_IMG
|
||||
select LV_USE_CONT
|
||||
select LV_FONT_MONTSERRAT_26
|
||||
select LV_FONT_MONTSERRAT_20
|
||||
select LV_FONT_MONTSERRAT_16
|
||||
select LV_USE_LABEL
|
||||
select LV_USE_IMG
|
||||
|
||||
choice ZMK_DISPLAY_STATUS_SCREEN
|
||||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||
endchoice
|
||||
|
||||
if ZMK_DISPLAY
|
||||
|
||||
config SPI
|
||||
default y
|
||||
default y
|
||||
|
||||
config IL0323
|
||||
default y
|
||||
default y
|
||||
|
||||
config ZMK_DISPLAY_BLANK_ON_IDLE
|
||||
default n
|
||||
default n
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
|
||||
bool "custom battery status widget"
|
||||
bool "custom battery status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
|
||||
bool "custom output status widget"
|
||||
bool "custom output status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_LAYER_STATUS
|
||||
bool "custom layer status widget"
|
||||
bool "custom layer status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
|
||||
bool "custom peripheral status widget"
|
||||
bool "custom peripheral status widget"
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT
|
||||
|
||||
@@ -11,116 +11,116 @@
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
model = "corneish_zen_v2";
|
||||
compatible = "corneish_zen_v2";
|
||||
model = "corneish_zen_v2";
|
||||
compatible = "corneish_zen_v2";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
};
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <12>;
|
||||
rows = <4>;
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <12>;
|
||||
rows = <4>;
|
||||
|
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
|
||||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
|
||||
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
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(0,9) RC(0,10) RC(0,11)
|
||||
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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
||||
>;
|
||||
};
|
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
|
||||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
|
||||
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
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(0,9) RC(0,10) RC(0,11)
|
||||
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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
||||
>;
|
||||
};
|
||||
|
||||
five_column_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <10>;
|
||||
rows = <4>;
|
||||
five_column_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <10>;
|
||||
rows = <4>;
|
||||
|
||||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
|
||||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
|
||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
map = <
|
||||
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(0,9) RC(0,10)
|
||||
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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
||||
>;
|
||||
};
|
||||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
|
||||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
|
||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
map = <
|
||||
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(0,9) RC(0,10)
|
||||
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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
||||
>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The flash starting at 0x000ec000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
/*
|
||||
* The flash starting at 0x000ec000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -45,7 +45,7 @@
|
||||
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
|
||||
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
|
||||
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
|
||||
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,90 +8,90 @@
|
||||
#include "corneish_zen.dtsi"
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 21 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
col-gpios
|
||||
= <&gpio0 21 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
};
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
};
|
||||
};
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0_sleep: spi0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
spi0_sleep: spi0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-1 = <&spi0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-1 = <&spi0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
pwr = [03 00 26 26];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
pwr = [03 00 26 26];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,98 +8,98 @@
|
||||
#include "corneish_zen.dtsi"
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
chosen {
|
||||
zephyr,display = &epd;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 19 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 21 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
col-gpios
|
||||
= <&gpio0 19 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 21 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
};
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
};
|
||||
};
|
||||
|
||||
&default_transform {
|
||||
col-offset = <6>;
|
||||
col-offset = <6>;
|
||||
};
|
||||
&five_column_transform {
|
||||
col-offset = <6>;
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
};
|
||||
};
|
||||
spi0_default: spi0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0_sleep: spi0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
spi0_sleep: spi0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-1 = <&spi0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi0_default>;
|
||||
pinctrl-1 = <&spi0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||
busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
pwr = [03 00 26 26];
|
||||
//softstart = [17 17 17 17];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
||||
busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
pwr = [03 00 26 26];
|
||||
//softstart = [17 17 17 17];
|
||||
cdi = <0xd2>;
|
||||
tcon = <0x22>;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user