mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
parent
102428f768
commit
d525200a11
@ -36,7 +36,7 @@ typedef struct LVGL_PARAMS {
|
|||||||
uint8_t swap_color : 1;
|
uint8_t swap_color : 1;
|
||||||
uint8_t async_dma : 1; // force DMA completion before returning, avoid conflict with other devices on same bus. If set you should make sure the display is the only device on the bus
|
uint8_t async_dma : 1; // force DMA completion before returning, avoid conflict with other devices on same bus. If set you should make sure the display is the only device on the bus
|
||||||
uint8_t busy_invert : 1;
|
uint8_t busy_invert : 1;
|
||||||
uint8_t resvd_2 : 1;
|
uint8_t invert_bw : 1;
|
||||||
uint8_t resvd_3 : 1;
|
uint8_t resvd_3 : 1;
|
||||||
uint8_t resvd_4 : 1;
|
uint8_t resvd_4 : 1;
|
||||||
uint8_t resvd_5 : 1;
|
uint8_t resvd_5 : 1;
|
||||||
|
@ -2197,12 +2197,22 @@ void uDisplay::pushColorsMono(uint16_t *data, uint16_t len, bool rgb16_swap) {
|
|||||||
|
|
||||||
for (uint32_t y = seta_yp1; y < seta_yp2; y++) {
|
for (uint32_t y = seta_yp1; y < seta_yp2; y++) {
|
||||||
seta_yp1++;
|
seta_yp1++;
|
||||||
for (uint32_t x = seta_xp1; x < seta_xp2; x++) {
|
if (lvgl_param.invert_bw) {
|
||||||
uint16_t color = *data++;
|
for (uint32_t x = seta_xp1; x < seta_xp2; x++) {
|
||||||
if (bpp == 1) color = (color & rgb16_to_mono_mask) ? 1 : 0;
|
uint16_t color = *data++;
|
||||||
drawPixel(x, y, color); // todo - inline the method to save speed
|
if (bpp == 1) color = (color & rgb16_to_mono_mask) ? 0 : 1;
|
||||||
len--;
|
drawPixel(x, y, color); // todo - inline the method to save speed
|
||||||
if (!len) return; // failsafe - exist if len (pixel number) is exhausted
|
len--;
|
||||||
|
if (!len) return; // failsafe - exist if len (pixel number) is exhausted
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (uint32_t x = seta_xp1; x < seta_xp2; x++) {
|
||||||
|
uint16_t color = *data++;
|
||||||
|
if (bpp == 1) color = (color & rgb16_to_mono_mask) ? 1 : 0;
|
||||||
|
drawPixel(x, y, color); // todo - inline the method to save speed
|
||||||
|
len--;
|
||||||
|
if (!len) return; // failsafe - exist if len (pixel number) is exhausted
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user