12 #include "esp_lcd_panel_ops.h" 14 #include "esp_lcd_panel_rgb.h" 19 constexpr
static const char *
const TAG =
"display.qspi_dbi";
20 static const uint8_t SW_RESET_CMD = 0x01;
21 static const uint8_t SLEEP_OUT = 0x11;
22 static const uint8_t NORON = 0x13;
23 static const uint8_t INVERT_OFF = 0x20;
24 static const uint8_t INVERT_ON = 0x21;
25 static const uint8_t ALL_ON = 0x23;
26 static const uint8_t WRAM = 0x24;
27 static const uint8_t MIPI = 0x26;
28 static const uint8_t DISPLAY_ON = 0x29;
29 static const uint8_t RASET = 0x2B;
30 static const uint8_t CASET = 0x2A;
31 static const uint8_t WDATA = 0x2C;
32 static const uint8_t TEON = 0x35;
33 static const uint8_t MADCTL_CMD = 0x36;
34 static const uint8_t PIXFMT = 0x3A;
35 static const uint8_t BRIGHTNESS = 0x51;
36 static const uint8_t SWIRE1 = 0x5A;
37 static const uint8_t SWIRE2 = 0x5B;
38 static const uint8_t PAGESEL = 0xFE;
40 static const uint8_t MADCTL_MY = 0x80;
41 static const uint8_t MADCTL_MX = 0x40;
42 static const uint8_t MADCTL_MV = 0x20;
43 static const uint8_t MADCTL_RGB = 0x00;
44 static const uint8_t MADCTL_BGR = 0x08;
46 static const uint8_t DELAY_FLAG = 0xFF;
48 static inline void put16_be(uint8_t *buf, uint16_t value) {
60 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
61 spi::DATA_RATE_1MHZ> {
65 void setup()
override;
118 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 get_width_internal() override
void set_brightness(uint8_t brightness)
void set_dimensions(uint16_t width, uint16_t height)
void set_addr_window_(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
void set_swap_xy(bool swap_xy)
std::vector< std::vector< uint8_t > > init_sequences_
void write_init_sequence_()
void set_mirror_y(bool mirror_y)
void set_draw_from_origin(bool draw_from_origin)
display::ColorOrder color_mode_
void write_sequence_(const std::vector< uint8_t > &vec)
display::DisplayType get_display_type() override
void write_command_(uint8_t cmd, uint8_t data)
display::ColorOrder get_color_mode()
void set_mirror_x(bool mirror_x)
void write_command_(uint8_t cmd, const uint8_t *bytes, size_t len)
the RM67162 in quad SPI mode seems to work like this (not in the datasheet, this is deduced from the ...
void init_internal_(uint32_t buffer_length)
void add_init_sequence(const std::vector< uint8_t > &sequence)
The SPIDevice is what components using the SPI will create.
void dump_config() override
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_color_mode(display::ColorOrder color_mode)
int get_height_internal() override
bool can_proceed() override
esp_lcd_panel_handle_t handle_
void draw_absolute_pixel_internal(int x, int y, Color color) override
void draw_pixels_at(int x_start, int y_start, int w, int h, const uint8_t *ptr, display::ColorOrder order, display::ColorBitness bitness, bool big_endian, int x_offset, int y_offset, int x_pad) override
void reset_params_(bool ready=false)
void set_enable_pin(GPIOPin *enable_pin)
Implementation of SPI Controller mode.
std::vector< uint8_t > bytes
void set_model(const char *model)
void set_reset_pin(GPIOPin *reset_pin)
void write_command_(uint8_t cmd)
void set_offsets(int16_t offset_x, int16_t offset_y)
void set_invert_colors(bool invert_colors)