14 if (color.
r > color.
g + color.
b && color.
r > 127) {
17 if (color.
r + color.
g + color.
b >= 382) {
34 const uint8_t bit = 0x80 >> (
x & 0x07);
58 for (
size_t i = 0; i < half_buffer; i++)
60 for (
size_t i = 0; i < half_buffer; i++)
61 this->
buffer_[half_buffer + i] = 0x00;
64 for (
size_t i = 0; i < half_buffer; i++)
66 for (
size_t i = 0; i < half_buffer; i++)
67 this->
buffer_[half_buffer + i] = 0xFF;
77 const size_t half_buffer = buffer_length / 2u;
79 uint8_t bytes_to_send[MAX_TRANSFER_SIZE];
89 const size_t bytes_to_copy = std::min(MAX_TRANSFER_SIZE, half_buffer - this->
current_data_index_);
90 for (
size_t i = 0; i < bytes_to_copy; i++) {
95 if (
millis() - start_time > MAX_TRANSFER_TIME) {
111 const size_t bytes_to_copy = std::min(MAX_TRANSFER_SIZE, buffer_length - this->
current_data_index_);
112 for (
size_t i = 0; i < bytes_to_copy; i++) {
117 if (
millis() - start_time > MAX_TRANSFER_TIME) {
130 this->
cmd_data(0x01, {0x07, 0x17, 0x3F, 0x3F});
void command(uint8_t value)
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 deep_sleep() override
void fill(Color color) override
void draw_pixel_at(int x, int y, Color color) override
bool transfer_data() override
void refresh_screen(bool partial) 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 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()