7 static const char *
const TAG =
"st7789v";
10 ESP_LOGCONFIG(TAG,
"Setting up SPI ST7789V...");
119 LOG_DISPLAY(
"",
"SPI ST7789V",
this);
120 ESP_LOGCONFIG(TAG,
" Model: %s", this->
model_str_());
123 ESP_LOGCONFIG(TAG,
" Width Offset: %u", this->
offset_width_);
125 ESP_LOGCONFIG(TAG,
" 8-bit color mode: %s", YESNO(this->
eightbitcolor_));
126 LOG_PIN(
" CS Pin: ", this->
cs_);
127 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
130 LOG_UPDATE_INTERVAL(
this);
246 static uint8_t byte[4];
247 byte[0] = (addr1 >> 8) & 0xFF;
248 byte[1] = addr1 & 0xFF;
249 byte[2] = (addr2 >> 8) & 0xFF;
250 byte[3] = addr2 & 0xFF;
257 static uint8_t byte[1024];
259 for (
int i = 0; i < size; i++) {
260 byte[index++] = (color >> 8) & 0xFF;
261 byte[index++] = color & 0xFF;
295 for (
int i = x1; i <= x2; i++) {
296 uint16_t size = y2 - y1 + 1;
313 this->
buffer_[pos++] = (color565 >> 8) & 0xff;
314 this->
buffer_[pos] = color565 & 0xff;
321 return "TTGO T-Display 135x240";
323 return "Adafruit Funhouse 240x240";
325 return "Adafruit Round-Rectangular 280x240";
virtual void digital_write(bool value)=0
float get_setup_priority() const override
void dump_config() override
static uint16_t color_to_565(Color color, ColorOrder color_order=ColorOrder::COLOR_ORDER_RGB)
void write_color_(uint16_t color, uint16_t size)
void draw_absolute_pixel_internal(int x, int y, Color color) override
void write_display_data()
void write_byte(uint8_t data)
void init_internal_(uint32_t buffer_length)
int get_width_internal() override
void line(int x1, int y1, int x2, int y2, Color color=COLOR_ON)
Draw a straight line from the point [x1,y1] to [x2,y2] with the given color.
void draw_filled_rect_(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
void write_command_(uint8_t value)
void write_data_(uint8_t value)
static uint8_t color_to_332(Color color, ColorOrder color_order=ColorOrder::COLOR_ORDER_RGB)
const char * model_str_()
const float PROCESSOR
For components that use data from sensors like displays.
void write_addr_(uint16_t addr1, uint16_t addr2)
void write_array(const uint8_t *data, size_t length)
void set_model(ST7789VModel model)
static Color to_color(uint32_t colorcode, ColorOrder color_order, ColorBitness color_bitness=ColorBitness::COLOR_BITNESS_888, bool right_bit_aligned=true)
size_t get_buffer_length_()
void backlight_(bool onoff)
int get_height_internal() override
void IRAM_ATTR HOT delay(uint32_t ms)