Add display SPI setup

This commit is contained in:
Marco Massarelli 2024-01-08 01:46:52 +00:00 committed by GitHub
parent 96a4517e8e
commit 6e037d55a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 7 deletions

View File

@ -1,16 +1,46 @@
if SHIELD_CORNEY_ISLAND_LEFT
config ZMK_KEYBOARD_NAME
config ZMK_KEYBOARD_NAME
default "Corney Island"
config ZMK_SPLIT_ROLE_CENTRAL
config ZMK_SPLIT_ROLE_CENTRAL
default y
endif
endif # SHIELD_CORNEY_ISLAND_LEFT
if SHIELD_CORNEY_ISLAND_LEFT || SHIELD_CORNEY_ISLAND_RIGHT
config ZMK_SPLIT
config ZMK_SPLIT
default y
if ZMK_DISPLAY
config I2C
default y
config SSD1306
default y
config SSD1306_REVERSE_MODE
default y
endif # ZMK_DISPLAY
if LVGL
config LV_Z_VDB_SIZE
default 64
config LV_Z_DPI
default 148
config LV_Z_BITS_PER_PIXEL
default 1
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice
endif # LVGL
endif

View File

@ -34,3 +34,35 @@ 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)
;
};
};
// sck= SCL
// mosi= SDA
&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
<NRF_PSEL(SPIM_MOSI, 0, 2)>,
<NRF_PSEL(SPIM_MISO, 0, 25)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
<NRF_PSEL(SPIM_MOSI, 0, 2)>,
<NRF_PSEL(SPIM_MISO, 0, 25)>;
low-power-enable;
};
};
};
nice_view_spi: &spi0 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; //HAND
};
&pro_micro_i2c {
status = "disabled";
};