12 #include "esp_lcd_panel_ops.h" 14 #include "esp_lcd_panel_rgb.h" 17 namespace qspi_amoled {
19 constexpr
static const char *
const TAG =
"display.qspi_amoled";
20 static const uint8_t SW_RESET_CMD = 0x01;
21 static const uint8_t SLEEP_OUT = 0x11;
22 static const uint8_t INVERT_OFF = 0x20;
23 static const uint8_t INVERT_ON = 0x21;
24 static const uint8_t ALL_ON = 0x23;
25 static const uint8_t WRAM = 0x24;
26 static const uint8_t MIPI = 0x26;
27 static const uint8_t DISPLAY_ON = 0x29;
28 static const uint8_t RASET = 0x2B;
29 static const uint8_t CASET = 0x2A;
30 static const uint8_t WDATA = 0x2C;
31 static const uint8_t TEON = 0x35;
32 static const uint8_t MADCTL_CMD = 0x36;
33 static const uint8_t PIXFMT = 0x3A;
34 static const uint8_t BRIGHTNESS = 0x51;
35 static const uint8_t SWIRE1 = 0x5A;
36 static const uint8_t SWIRE2 = 0x5B;
37 static const uint8_t PAGESEL = 0xFE;
39 static const uint8_t MADCTL_MY = 0x80;
40 static const uint8_t MADCTL_MX = 0x40;
41 static const uint8_t MADCTL_MV = 0x20;
42 static const uint8_t MADCTL_RGB = 0x00;
43 static const uint8_t MADCTL_BGR = 0x08;
46 static inline void put16_be(uint8_t *buf, uint16_t value) {
57 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
58 spi::DATA_RATE_1MHZ> {
62 void setup()
override;
void set_dimensions(uint16_t width, uint16_t height)
display::DisplayType get_display_type() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
void reset_params_(bool ready=false)
void dump_config() override
void set_invert_colors(bool invert_colors)
display::ColorOrder color_mode_
void set_model(Model model)
void set_addr_window_(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
void set_mirror_x(bool mirror_x)
void set_brightness(uint8_t brightness)
void set_mirror_y(bool mirror_y)
void write_init_sequence_()
void write_cmd_addr_data(size_t cmd_bits, uint32_t cmd, size_t addr_bits, uint32_t address, const uint8_t *data, size_t length, uint8_t bus_width=1)
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
The SPIDevice is what components using the SPI will create.
bool can_proceed() override
int get_width_internal() override
int get_height_internal() override
void set_offsets(int16_t offset_x, int16_t offset_y)
void set_reset_pin(GPIOPin *reset_pin)
Implementation of SPI Controller mode.
display::ColorOrder get_color_mode()
std::vector< uint8_t > bytes
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 set_enable_pin(GPIOPin *enable_pin)
void write_command_(uint8_t cmd)
esp_lcd_panel_handle_t handle_
void set_color_mode(display::ColorOrder color_mode)
void write_command_(uint8_t cmd, uint8_t data)
void set_swap_xy(bool swap_xy)