mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
commit
b082852196
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#define WAVEFORM EPD_BUILTIN_WAVEFORM
|
#define WAVEFORM EPD_BUILTIN_WAVEFORM
|
||||||
|
|
||||||
extern uint8_t *buffer;
|
uint8_t *epd47_buffer;
|
||||||
|
|
||||||
int temperature = 25;
|
int temperature = 25;
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ Epd47::Epd47(int16_t dwidth, int16_t dheight) : Renderer(dwidth, dheight) {
|
|||||||
int32_t Epd47::Init(void) {
|
int32_t Epd47::Init(void) {
|
||||||
epd_init(EPD_LUT_1K);
|
epd_init(EPD_LUT_1K);
|
||||||
hl = epd_hl_init(WAVEFORM);
|
hl = epd_hl_init(WAVEFORM);
|
||||||
buffer = epd_hl_get_framebuffer(&hl);
|
epd47_buffer = epd_hl_get_framebuffer(&hl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ void Epd47::Updateframe() {
|
|||||||
void Epd47::fillScreen(uint16_t color) {
|
void Epd47::fillScreen(uint16_t color) {
|
||||||
color &= 0xf;
|
color &= 0xf;
|
||||||
uint8_t icol = (color << 4) | color;
|
uint8_t icol = (color << 4) | color;
|
||||||
memset(buffer, icol, width * height / 2);
|
memset(epd47_buffer, icol, width * height / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _swap(a, b) { uint16_t t = a; a = b; b = t; }
|
#define _swap(a, b) { uint16_t t = a; a = b; b = t; }
|
||||||
@ -134,7 +134,7 @@ uint8_t *buf_ptr;
|
|||||||
|
|
||||||
if (xp >= width) return;
|
if (xp >= width) return;
|
||||||
if (yp >= height) return;
|
if (yp >= height) return;
|
||||||
buf_ptr = &buffer[yp * width / 2 + xp / 2];
|
buf_ptr = &epd47_buffer[yp * width / 2 + xp / 2];
|
||||||
|
|
||||||
if (xp % 2) {
|
if (xp % 2) {
|
||||||
*buf_ptr = (*buf_ptr & 0x0F) | (color << 4);
|
*buf_ptr = (*buf_ptr & 0x0F) | (color << 4);
|
||||||
|
@ -217,12 +217,16 @@ ili9342_ctouch_counter++;
|
|||||||
if (2 == ili9342_ctouch_counter) {
|
if (2 == ili9342_ctouch_counter) {
|
||||||
// every 100 ms should be enough
|
// every 100 ms should be enough
|
||||||
ili9342_ctouch_counter = 0;
|
ili9342_ctouch_counter = 0;
|
||||||
|
#ifdef USE_FT5206
|
||||||
if (FT5206_found) {
|
if (FT5206_found) {
|
||||||
Touch_Check(FT5206_TS_RotConvert);
|
Touch_Check(FT5206_TS_RotConvert);
|
||||||
}
|
}
|
||||||
|
#endif // USE_FT5206
|
||||||
|
#ifdef USE_XPT2046
|
||||||
if (XPT2046_found) {
|
if (XPT2046_found) {
|
||||||
Touch_Check(XPT2046_TS_RotConvert);
|
Touch_Check(XPT2046_TS_RotConvert);
|
||||||
}
|
}
|
||||||
|
#endif // USE_XPT2046
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // USE_TOUCH_BUTTONS
|
#endif // USE_TOUCH_BUTTONS
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
|
|
||||||
bool ssd1331_init_done = false;
|
bool ssd1331_init_done = false;
|
||||||
extern uint8_t *buffer;
|
|
||||||
extern uint8_t color_type;
|
extern uint8_t color_type;
|
||||||
Adafruit_SSD1331 *ssd1331;
|
Adafruit_SSD1331 *ssd1331;
|
||||||
|
|
||||||
@ -55,7 +55,6 @@ void SSD1331_InitDriver() {
|
|||||||
Settings.display_height = Adafruit_SSD1331::TFTHEIGHT;
|
Settings.display_height = Adafruit_SSD1331::TFTHEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = 0;
|
|
||||||
|
|
||||||
// default colors
|
// default colors
|
||||||
fg_color = SSD1331_WHITE;
|
fg_color = SSD1331_WHITE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user