diff --git a/esphome/components/epaper_spi/epaper_spi.h b/esphome/components/epaper_spi/epaper_spi.h index 93d44d3fce7..418da680ee5 100644 --- a/esphome/components/epaper_spi/epaper_spi.h +++ b/esphome/components/epaper_spi/epaper_spi.h @@ -113,12 +113,12 @@ class EPaperBase : public Display, int get_height_internal() override { return this->height_; }; int get_width_internal() override { return this->width_; }; bool is_using_partial_update_() const { return this->full_update_every_ > 1; } - /// Fill the whole frame buffer with the color; fill() marks the canvas dirty afterwards. + /// Fill the whole frame buffer with the color. virtual void fill_buffer(Color color) { // We store 8 pixels per byte this->buffer_.fill(color_to_bit(color) ? 0xFF : 0x00); } - /// Mark the whole canvas dirty so the next update is not skipped. + /// An update with no dirty area is skipped, so whole buffer writes must call this. void mark_all_dirty_() { this->x_low_ = 0; this->y_low_ = 0; diff --git a/esphome/components/epaper_spi/epaper_spi_inkplate2.cpp b/esphome/components/epaper_spi/epaper_spi_inkplate2.cpp index 9ee09168e90..7d4fd42c96e 100644 --- a/esphome/components/epaper_spi/epaper_spi_inkplate2.cpp +++ b/esphome/components/epaper_spi/epaper_spi_inkplate2.cpp @@ -73,7 +73,7 @@ void HOT EPaperInkplate2::draw_pixel_at(int x, int y, Color color) { const size_t half_buffer = this->buffer_length_ / 2; const size_t pos = y * this->row_width_ + x / 8; - const uint8_t mask = 0x80 >> (x & 0x07); // MSB first; see fill() for plane encoding + const uint8_t mask = 0x80 >> (x & 0x07); // MSB first; see fill_buffer() for plane encoding switch (to_inkplate2_color(color)) { case Inkplate2Color::BLACK: