Improve bounds checking update CS management
Add bounds checking to graphics functions Rationalise variable types and style used to minimse type casting needs (this change ended up being a more extensive refactoring than anticipated - but once started...) Add version reporting to diagnostic sketch Boost PDQ graphicstest performance
This commit is contained in:
1 parent
e8a0024054
commit
caef4519f3
9 files changed
+206
-237
No files matched your search
@@ -324,7 +324,7 @@ uint32_t testHaD()
|
||||
uint16_t curcolor = 0;
|
||||
|
||||
const uint8_t *cmp = &HaD_128x160[0];
|
||||
|
||||
tft.startWrite();
|
||||
while (cmp < &HaD_128x160[sizeof(HaD_128x160)])
|
||||
{
|
||||
cnt = pgm_read_byte(cmp++);
|
||||
@@ -335,6 +335,7 @@ uint32_t testHaD()
|
||||
|
||||
curcolor ^= color;
|
||||
}
|
||||
tft.endWrite();
|
||||
}
|
||||
|
||||
tft.endWrite();
|
||||
@@ -409,7 +410,7 @@ uint32_t testPixels()
|
||||
int32_t h = tft.height();
|
||||
|
||||
uint32_t start = micros_start();
|
||||
|
||||
tft.startWrite();
|
||||
for (uint16_t y = 0; y < h; y++)
|
||||
{
|
||||
for (uint16_t x = 0; x < w; x++)
|
||||
@@ -417,7 +418,7 @@ uint32_t testPixels()
|
||||
tft.drawPixel(x, y, tft.color565(x<<3, y<<3, x*y));
|
||||
}
|
||||
}
|
||||
|
||||
tft.endWrite();
|
||||
return micros() - start;
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ uint32_t testPixels()
|
||||
int32_t h = tft.height();
|
||||
|
||||
uint32_t start = micros_start();
|
||||
|
||||
tft.startWrite();
|
||||
for (uint16_t y = 0; y < h; y++)
|
||||
{
|
||||
for (uint16_t x = 0; x < w; x++)
|
||||
@@ -442,7 +442,7 @@ uint32_t testPixels()
|
||||
tft.drawPixel(x, y, tft.color565(x<<3, y<<3, x*y));
|
||||
}
|
||||
}
|
||||
|
||||
tft.endWrite();
|
||||
return micros() - start;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ void loop(void) {
|
||||
tft.getSetup(user); //
|
||||
|
||||
Serial.printf("\n[code]\n");
|
||||
|
||||
Serial.printf("TFT_eSPI ver = " + user.version) +"\n");
|
||||
Serial.printf("Processor = ESP%i\n", user.esp, HEX);
|
||||
Serial.printf("Frequency = %i MHz\n", ESP.getCpuFreqMHz());
|
||||
#ifdef ESP8266
|
||||
|
||||
Reference in new issue
Block a user