9static constexpr const char *
const TAG =
"epaper_spi.inkplate2";
20 ESP_LOGV(TAG,
"Power on");
24 ESP_LOGV(TAG,
"Power off");
30 ESP_LOGV(TAG,
"Refresh screen");
38 ESP_LOGV(TAG,
"Deep sleep");
53 switch (to_inkplate2_color(color)) {
69 for (
size_t i = 0; i < half_buffer; i++)
88 const uint8_t mask = 0x80 >> (
x & 0x07);
90 switch (to_inkplate2_color(color)) {
93 this->
buffer_[pos + half_buffer] |= mask;
97 this->
buffer_[pos + half_buffer] &= ~mask;
102 this->
buffer_[pos + half_buffer] |= mask;
108 uint8_t bytes_to_send[MAX_TRANSFER_SIZE];
112 if (buf_idx ==
sizeof bytes_to_send) {
117 if (
millis() - start_time > MAX_TRANSFER_TIME)
Rect get_clipping() const
Get the current the clipping rectangle.
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_
void cmd_data(uint8_t command, const uint8_t *ptr, size_t length)
size_t current_data_index_
void power_off() override
void refresh_screen(bool partial) override
void draw_pixel_at(int x, int y, Color color) override
void deep_sleep() override
bool transfer_data() override
bool send_buffer_range_(size_t end, uint32_t start_time)
void fill(Color color) override
void write_array(const uint8_t *data, size_t length)
constexpr Color COLOR_ON(255, 255, 255, 255)
Turn the pixel ON.
constexpr NATIVE_COLOR color_to_bwr(Color color, NATIVE_COLOR hw_black, NATIVE_COLOR hw_white, NATIVE_COLOR hw_red)
Map RGB color to discrete BWR (black/white/red) 3 color key.
uint32_t IRAM_ATTR HOT millis()