12bool sets_bw_bit(
BwrColor bwr,
bool red_sets_black) {
22 const uint8_t bit = 0x80 >> (
x & 0x07);
49 while (index !=
end) {
59 uint8_t bytes_to_send[MAX_TRANSFER_SIZE];
64 for (
size_t filled = 0; filled != chunk;) {
68 for (
size_t i = 0; i !=
length; i++)
69 bytes_to_send[filled + i] = data[i] ^ invert_mask;
Rect get_clipping() const
Get the current the clipping rectangle.
void draw_pixel_at(int x, int y, Color color) override
void fill(Color color) override
void fill_range_(size_t index, size_t end, uint8_t value)
bool transfer_data() override
bool send_buffer_range_(size_t end, uint8_t invert_mask, uint32_t start_time)
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_
void write_array(const uint8_t *data, size_t length)
const uint8_t * get_span(size_t index, size_t &length) const
BwrColor
Native color keys for black/white/red panels, for use with color_to_bwr.
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.
ESPHOME_ALWAYS_INLINE constexpr void assign_bits(T &value, std::type_identity_t< T > mask, bool on)
Set the bits of mask in value when on is true, clear them otherwise.
uint32_t IRAM_ATTR HOT millis()