7static constexpr const char *
const TAG =
"epaper_spi.4bpp";
19 this->
buffer_.
fill(pixel_color + (pixel_color << 4));
38 uint32_t byte_position = pixel_position / 2;
39 auto original = this->
buffer_[byte_position];
40 if ((pixel_position & 1) != 0) {
41 this->
buffer_[byte_position] = (original & 0xF0) | pixel_bits;
43 this->
buffer_[byte_position] = (original & 0x0F) | (pixel_bits << 4);
55 uint8_t bytes_to_send[MAX_TRANSFER_SIZE];
59 if (buf_idx ==
sizeof bytes_to_send) {
63 ESP_LOGV(TAG,
"Wrote %d bytes at %ums", buf_idx, (
unsigned)
millis());
66 if (
millis() - start_time > MAX_TRANSFER_TIME) {
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
Rect get_clipping() const
Get the current the clipping rectangle.
void draw_pixel_at(int x, int y, Color color) override
virtual uint8_t color_to_native(Color color)=0
Map an RGB color to this panel's native 4-bit color key (low nibble).
void fill(Color color) override
static constexpr uint8_t CMD_TRANSFER_DATA
bool transfer_data() override
void command(uint8_t value)
void fill(Color color) override
bool rotate_coordinates_(int &x, int &y)
Check and rotate coordinates based on the transform flags.
split_buffer::SplitBuffer buffer_
size_t current_data_index_
int get_width_internal() override
void write_array(const uint8_t *data, size_t length)
void fill(uint8_t value) const
Fill the entire buffer with a single byte value.
constexpr Color COLOR_ON(255, 255, 255, 255)
Turn the pixel ON.
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.