This commit is contained in:
2026-03-26 12:10:21 +01:00
parent 1f4970c17c
commit d4d76db890
877 changed files with 631941 additions and 26195 deletions

View File

@@ -0,0 +1,105 @@
spi:
- id: lcd_spi
clk_pin: GPIO48
mosi_pin: GPIO47
i2c:
- id: bus_a
sda: GPIO19
scl:
number: GPIO45
ignore_strapping_warning: true
frequency: 100kHz
output:
# Backlight LED
- platform: ledc
pin: GPIO38
id: backlight_output
frequency: 100Hz
light:
# Backlight
- platform: monochromatic
output: backlight_output
name: Backlight
id: display_backlight
restore_mode: ALWAYS_ON
on_turn_on:
- if:
condition: lvgl.is_paused
then:
- logger.log: "LVGL resuming by backlight on"
- lvgl.resume:
- lvgl.widget.redraw:
on_turn_off:
- if:
condition:
lambda: 'return id(display_timeout_number).state >= 0;'
then:
- logger.log: "Backlight off, pausing LVGL"
- lvgl.pause:
touchscreen:
- platform: gt911
id: my_touchscreen
transform:
mirror_x: false
mirror_y: false
display: my_display
on_release:
- if:
condition: lvgl.is_paused
then:
- logger.log: "LVGL resuming"
- lvgl.resume:
- lvgl.widget.redraw:
- light.turn_on: display_backlight
display:
- platform: st7701s
id: my_display
update_interval: never
auto_clear_enabled: false
data_rate: 2MHz
spi_mode: MODE3
color_order: RGB
invert_colors: false
dimensions:
width: 480
height: 480
transform:
mirror_x: false
mirror_y: false
cs_pin: 39
# reset not defined
de_pin: 18
hsync_pin: 16
vsync_pin: 17
pclk_pin: 21
init_sequence:
- 1
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10] # CMD2_BKSEL_BK0
- [0xCD, 0x00] # disable MDT flag
pclk_frequency: 12MHz
pclk_inverted: false
data_pins:
red:
- 11 # R1
- 12 # R2
- 13 # R3
- 14 # R4
- 0 # R5
green:
- 8 # G0
- 20 # G1
- 3 # G2
- 46 # G3
- 9 # G4
- 10 # G5
blue:
- 4 # B1
- 5 # B2
- 6 # B3
- 7 # B4
- 15 # B5

View File

@@ -0,0 +1,66 @@
---
light:
# Backlight
- platform: monochromatic
output: backlight_output
name: Backlight
id: display_backlight
restore_mode: ALWAYS_ON
on_turn_on:
- if:
condition: lvgl.is_paused
then:
- logger.log: "LVGL resuming by backlight on"
- lvgl.resume:
- lvgl.widget.redraw:
on_turn_off:
- if:
condition:
lambda: 'return id(display_timeout_number).state >= 0;'
then:
- logger.log: "Backlight off, pausing LVGL"
- lvgl.pause:
output:
# Backlight LED
- platform: ledc
pin: ${pin_lcd_bl}
id: backlight_output
frequency: 100Hz
esp_ldo:
- channel: 3
voltage: 2.5V
psram:
speed: 200MHz
display:
- platform: mipi_dsi
model: JC8012P4A1
id: my_display
update_interval: 1s
reset_pin: ${pin_lcd_reset}
i2c:
- id: i2c_bus
sda: ${pin_touch_sda}
scl: ${pin_touch_scl}
frequency: 400kHz
touchscreen:
- platform: gsl3680
id: touchscreen_
reset_pin: ${pin_touch_rst}
interrupt_pin: ${pin_touch_irq}
transform:
swap_xy: false
mirror_y: false
on_release:
- if:
condition: lvgl.is_paused
then:
- logger.log: "LVGL resuming"
- lvgl.resume:
- lvgl.widget.redraw:
- light.turn_on: display_backlight

View File

@@ -0,0 +1,37 @@
# Backlight
output:
- platform: ledc
pin: $pin_dis_bk
id: gpio_pin_dis_bk_backlight_pwm
light:
- platform: monochromatic
output: gpio_pin_dis_bk_backlight_pwm
name: "Display Backlight"
id: back_light
restore_mode: ALWAYS_ON
# ST7789 Display
# IPS Panel 1.3 Inch 260ppi 240x240 16-bit full color pixels
spi:
id: bus_tft
clk_pin: ${pin_spi_clk}
mosi_pin: ${pin_spi_mosi}
#miso_pin: $spi_miso
display:
- platform: ili9xxx
model: st7789v
id: my_display
dimensions:
height: 240
width: 240
offset_width: 0
offset_height: 0
invert_colors: true
cs_pin: $pin_dis_cs
dc_pin: $pin_dis_dc
# update_interval: 2s
# # Simple text test
# lambda: |-
# it.printf(0, 0, id(roboto16), "Test");