mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 17:42:22 +01:00
[mipi_spi] Fix t-display-amoled (#10922)
This commit is contained in:
committed by
Jesse Hills
parent
127058e700
commit
345fc0b6ca
@@ -401,6 +401,12 @@ class DriverChip:
|
||||
sequence.append((MADCTL, madctl))
|
||||
return madctl
|
||||
|
||||
def skip_command(self, command: str):
|
||||
"""
|
||||
Allow suppressing a standard command in the init sequence.
|
||||
"""
|
||||
return self.get_default(f"no_{command.lower()}", False)
|
||||
|
||||
def get_sequence(self, config) -> tuple[tuple[int, ...], int]:
|
||||
"""
|
||||
Create the init sequence for the display.
|
||||
@@ -432,6 +438,8 @@ class DriverChip:
|
||||
sequence.append((INVOFF,))
|
||||
if brightness := config.get(CONF_BRIGHTNESS, self.get_default(CONF_BRIGHTNESS)):
|
||||
sequence.append((BRIGHTNESS, brightness))
|
||||
# Add a SLPOUT command if required.
|
||||
if not self.skip_command("SLPOUT"):
|
||||
sequence.append((SLPOUT,))
|
||||
sequence.append((DISPON,))
|
||||
|
||||
|
@@ -27,7 +27,8 @@ DriverChip(
|
||||
bus_mode=TYPE_QUAD,
|
||||
brightness=0xD0,
|
||||
color_order=MODE_RGB,
|
||||
initsequence=(SLPOUT,), # Requires early SLPOUT
|
||||
no_slpout=True, # SLPOUT is in the init sequence, early
|
||||
initsequence=(SLPOUT,),
|
||||
)
|
||||
|
||||
DriverChip(
|
||||
@@ -95,6 +96,7 @@ CO5300 = DriverChip(
|
||||
brightness=0xD0,
|
||||
color_order=MODE_RGB,
|
||||
bus_mode=TYPE_QUAD,
|
||||
no_slpout=True,
|
||||
initsequence=(
|
||||
(SLPOUT,), # Requires early SLPOUT
|
||||
(PAGESEL, 0x00),
|
||||
|
Reference in New Issue
Block a user