ESPHome 2026.10.0
Loading...
Searching...
No Matches
epaper_spi_ssd1677_gray4.h
Go to the documentation of this file.
1#pragma once
2
3#include "colorconv.h"
5
6namespace esphome::epaper_spi {
7
29 public:
30 EPaperSSD1677Gray4(const char *name, uint16_t width, uint16_t height, const uint8_t *init_sequence,
31 size_t init_sequence_length)
32 : EPaperSSD1677(name, width, height, init_sequence, init_sequence_length, DISPLAY_TYPE_GRAYSCALE) {
33 this->row_width_ = (width + 3) / 4; // 4 pixels per byte
34 this->buffer_length_ = (size_t) this->row_width_ * height;
35 }
36
37 void fill(Color color) override;
38 void draw_pixel_at(int x, int y, Color color) override;
39
40 protected:
41 // A partial update if partial updates are enabled and this is not a full one.
42 bool is_partial_push_() const { return this->update_count_ != 0 && this->sent_.is_valid(); }
43 bool buffer_is_plane() const override { return false; }
44 void plane_row(size_t y, uint8_t *out) override;
45 void refresh_screen(bool partial) override;
46 bool transfer_data() override;
47};
48
49} // namespace esphome::epaper_spi
Four-level grayscale for SSD1677 panels.
EPaperSSD1677Gray4(const char *name, uint16_t width, uint16_t height, const uint8_t *init_sequence, size_t init_sequence_length)
void plane_row(size_t y, uint8_t *out) override
void draw_pixel_at(int x, int y, Color color) override
Monochrome SSD1677 with partial refreshes that leave unchanged pixels alone.
std::vector< uint8_t > & out
Definition gif.cpp:49
uint16_t x
Definition tt21100.cpp:5
uint16_t y
Definition tt21100.cpp:6