3#if defined(USE_ESP32_VARIANT_ESP32S3) || defined(USE_ESP32_VARIANT_ESP32P4) || defined(USE_ESP32_VARIANT_ESP32S31)
9#include <esp_lcd_panel_rgb.h>
26const uint8_t
CMD2_BK0[5] = {0x77, 0x01, 0x00, 0x00, 0x10};
31 void setup()
override;
32#ifdef USE_ESP32_VARIANT_ESP32S3
35 esp_lcd_rgb_panel_restart(this->
handle_);
81 const uint16_t rgb565 = display::ColorUtil::color_to_565(color);
89 void dump_pins_(uint8_t start, uint8_t
end,
const char *name, uint8_t offset);
126 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
127 spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_1MHZ> {
136 void setup()
override;
int int int const uint8_t ColorOrder ColorBitness bitness
int int int const uint8_t ColorOrder ColorBitness bool int int y_offset
int int int const uint8_t ColorOrder ColorBitness bool int int int x_pad
int int int const uint8_t * ptr
int int int const uint8_t ColorOrder ColorBitness bool big_endian
int int int const uint8_t ColorOrder ColorBitness bool int x_offset
DisplayRotation rotation_
display::ColorOrder get_color_mode()
InternalGPIOPin * de_pin_
std::vector< GPIOPin * > enable_pins_
display::DisplayType get_display_type() override
uint16_t hsync_pulse_width_
void flush_dirty_()
Send the region touched since the last flush to the panel.
void set_de_pin(InternalGPIOPin *de_pin)
uint16_t hsync_front_porch_
uint16_t vsync_back_porch_
esp_lcd_panel_handle_t handle_
void set_enable_pins(std::vector< GPIOPin * > enable_pins)
int get_height() override
InternalGPIOPin * hsync_pin_
display::ColorOrder color_mode_
void dump_config() override
void set_vsync_pin(InternalGPIOPin *vsync_pin)
void set_hsync_back_porch(uint16_t hsync_back_porch)
void set_hsync_pin(InternalGPIOPin *hsync_pin)
void set_vsync_back_porch(uint16_t vsync_back_porch)
void set_big_endian(bool big_endian)
uint16_t vsync_front_porch_
int get_height_internal() override
void add_data_pin(InternalGPIOPin *data_pin, size_t index)
void set_model(const char *model)
void set_pclk_frequency(uint32_t pclk_frequency)
void set_invert_colors(bool invert_colors)
void set_pclk_inverted(bool inverted)
uint16_t vsync_pulse_width_
InternalGPIOPin * data_pins_[16]
void draw_pixel_at(int x, int y, Color color) override
void set_vsync_front_porch(uint16_t vsync_front_porch)
void rotate_(int &x, int &y) const
MipiRgb(int width, int height)
uint16_t to_panel_565_(Color color) const
Pack a colour as the 565 value the panel's byte order expects in memory.
void set_hsync_front_porch(uint16_t hsync_front_porch)
void set_width(uint16_t width)
InternalGPIOPin * vsync_pin_
void dump_pins_(uint8_t start, uint8_t end, const char *name, uint8_t offset)
void mark_dirty_(int x_start, int y_start, int w, int h)
void set_pclk_pin(InternalGPIOPin *pclk_pin)
void draw_pixels_internal(int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override
InternalGPIOPin * pclk_pin_
uint16_t hsync_back_porch_
void fill(Color color) override
void set_hsync_pulse_width(uint16_t hsync_pulse_width)
void set_vsync_pulse_width(uint16_t vsync_pulse_width)
int get_width_internal() override
void set_color_mode(display::ColorOrder color_mode)
void write_to_display_(int x_start, int y_start, int w, int h, const uint8_t *ptr, int x_offset, int y_offset, int x_pad)
void set_reset_pin(GPIOPin *reset_pin)
void dump_config() override
void write_data_(uint8_t value)
void set_init_sequence(const uint8_t *init_sequence, size_t len)
void write_init_sequence_()
this relies upon the init sequence being well-formed, which is guaranteed by the Python init code.
MipiRgbSpi(int width, int height)
void write_command_(uint8_t value)
void set_dc_pin(GPIOPin *dc_pin)
const uint8_t * init_sequence_
size_t init_sequence_len_
The SPIDevice is what components using the SPI will create.
const uint8_t CMD2_BK0[5]
const uint8_t SW_RESET_CMD
void rotate_point(int &x, int &y, int width, int height, display::DisplayRotation rotation)
ESPHOME_LOG_TAG(TAG, "display.mipi_rgb")
constexpr T convert_big_endian(T val)
Convert a value between host byte order and big endian (most significant byte first) order.