|
@@ -55,7 +55,7 @@ void GxEPD2_565c::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16
|
|
|
//Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
|
|
//Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
|
|
|
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
|
|
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
|
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
|
- if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
|
|
|
|
|
|
|
+ if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
|
|
|
{
|
|
{
|
|
|
//Serial.println("paged");
|
|
//Serial.println("paged");
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
@@ -86,9 +86,9 @@ void GxEPD2_565c::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16
|
|
|
_Init_Full();
|
|
_Init_Full();
|
|
|
_writeCommand(0x10);
|
|
_writeCommand(0x10);
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
|
- for (int16_t i = 0; i < HEIGHT; i++)
|
|
|
|
|
|
|
+ for (int16_t i = 0; i < int16_t(HEIGHT); i++)
|
|
|
{
|
|
{
|
|
|
- for (int16_t j = 0; j < WIDTH; j += 8)
|
|
|
|
|
|
|
+ for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
|
|
|
{
|
|
{
|
|
|
uint8_t data = 0xFF;
|
|
uint8_t data = 0xFF;
|
|
|
if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
|
|
if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
|
|
@@ -128,7 +128,7 @@ void GxEPD2_565c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
|
|
|
//Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
|
|
//Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
|
|
|
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
|
|
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
|
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
|
- if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
|
|
|
|
|
|
|
+ if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
|
|
|
{
|
|
{
|
|
|
//Serial.println("paged");
|
|
//Serial.println("paged");
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
@@ -167,9 +167,9 @@ void GxEPD2_565c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
|
|
|
_Init_Full();
|
|
_Init_Full();
|
|
|
_writeCommand(0x10);
|
|
_writeCommand(0x10);
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
|
- for (int16_t i = 0; i < HEIGHT; i++)
|
|
|
|
|
|
|
+ for (int16_t i = 0; i < int16_t(HEIGHT); i++)
|
|
|
{
|
|
{
|
|
|
- for (int16_t j = 0; j < WIDTH; j += 8)
|
|
|
|
|
|
|
+ for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
|
|
|
{
|
|
{
|
|
|
uint8_t black_data = 0xFF, color_data = 0xFF;
|
|
uint8_t black_data = 0xFF, color_data = 0xFF;
|
|
|
if ((j >= x) && (j < x + w) && (i >= y) && (i < y + h))
|
|
if ((j >= x) && (j < x + w) && (i >= y) && (i < y + h))
|
|
@@ -241,9 +241,9 @@ void GxEPD2_565c::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t
|
|
|
_Init_Full();
|
|
_Init_Full();
|
|
|
_writeCommand(0x10);
|
|
_writeCommand(0x10);
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
|
- for (int16_t i = 0; i < HEIGHT; i++)
|
|
|
|
|
|
|
+ for (int16_t i = 0; i < int16_t(HEIGHT); i++)
|
|
|
{
|
|
{
|
|
|
- for (int16_t j = 0; j < WIDTH; j += 8)
|
|
|
|
|
|
|
+ for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
|
|
|
{
|
|
{
|
|
|
uint8_t data = 0xFF;
|
|
uint8_t data = 0xFF;
|
|
|
if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
|
|
if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
|
|
@@ -307,9 +307,9 @@ void GxEPD2_565c::writeImagePart(const uint8_t* black, const uint8_t* color, int
|
|
|
_Init_Full();
|
|
_Init_Full();
|
|
|
_writeCommand(0x10);
|
|
_writeCommand(0x10);
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
|
- for (int16_t i = 0; i < HEIGHT; i++)
|
|
|
|
|
|
|
+ for (int16_t i = 0; i < int16_t(HEIGHT); i++)
|
|
|
{
|
|
{
|
|
|
- for (int16_t j = 0; j < WIDTH; j += 8)
|
|
|
|
|
|
|
+ for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
|
|
|
{
|
|
{
|
|
|
uint8_t black_data = 0xFF, color_data = 0xFF;
|
|
uint8_t black_data = 0xFF, color_data = 0xFF;
|
|
|
if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
|
|
if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
|
|
@@ -363,7 +363,7 @@ void GxEPD2_565c::writeNative(const uint8_t* data1, const uint8_t* data2, int16_
|
|
|
//Serial.print("writeNative("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
|
|
//Serial.print("writeNative("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
|
|
|
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
|
|
//Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
|
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
|
- if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
|
|
|
|
|
|
|
+ if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
|
|
|
{
|
|
{
|
|
|
//Serial.println("paged");
|
|
//Serial.println("paged");
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
@@ -389,9 +389,9 @@ void GxEPD2_565c::writeNative(const uint8_t* data1, const uint8_t* data2, int16_
|
|
|
_Init_Full();
|
|
_Init_Full();
|
|
|
_writeCommand(0x10);
|
|
_writeCommand(0x10);
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
|
- for (int16_t i = 0; i < HEIGHT; i++)
|
|
|
|
|
|
|
+ for (int16_t i = 0; i < int16_t(HEIGHT); i++)
|
|
|
{
|
|
{
|
|
|
- for (int16_t j = 0; j < WIDTH; j += 2)
|
|
|
|
|
|
|
+ for (int16_t j = 0; j < int16_t(WIDTH); j += 2)
|
|
|
{
|
|
{
|
|
|
uint8_t data = 0x11;
|
|
uint8_t data = 0x11;
|
|
|
if (data1)
|
|
if (data1)
|
|
@@ -453,9 +453,9 @@ void GxEPD2_565c::writeNativePart(const uint8_t* data1, const uint8_t* data2, in
|
|
|
_Init_Full();
|
|
_Init_Full();
|
|
|
_writeCommand(0x10);
|
|
_writeCommand(0x10);
|
|
|
_startTransfer();
|
|
_startTransfer();
|
|
|
- for (int16_t i = 0; i < HEIGHT; i++)
|
|
|
|
|
|
|
+ for (int16_t i = 0; i < int16_t(HEIGHT); i++)
|
|
|
{
|
|
{
|
|
|
- for (int16_t j = 0; j < WIDTH; j += 2)
|
|
|
|
|
|
|
+ for (int16_t j = 0; j < int16_t(WIDTH); j += 2)
|
|
|
{
|
|
{
|
|
|
uint8_t data = 0x11;
|
|
uint8_t data = 0x11;
|
|
|
if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
|
|
if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
|