Not sure if this is a Giga display problem, or something in the underlying Adafruit GFX library...
I ran the demo in the Arduino_GigaDisplay_GFX repo and noticed that one section
(the tests for drawFastH/VLine) was not being displayed.
The sketch is a cut down version of the demo in the Arduino_GigaDisplay_GFX gitbug repo.
EDIT: References to memory corruption removed. My mistake here.
#include "Arduino_GigaDisplay_GFX.h"
GigaDisplay_GFX tft;
#define GC9A01A_CYAN (uint16_t)0x07FF
#define GC9A01A_RED (uint16_t)0xf800
#define GC9A01A_BLUE (uint16_t)0x001F
#define GC9A01A_GREEN (uint16_t)0x07E0
#define GC9A01A_MAGENTA (uint16_t)0xF81F
#define GC9A01A_WHITE (uint16_t)0xffff
#define GC9A01A_BLACK (uint16_t)0x0000
#define GC9A01A_YELLOW (uint16_t)0xFFE0
unsigned long testFillScreen() {
unsigned long start = micros();
tft.fillScreen(GC9A01A_BLACK);
yield();
return micros() - start;
}
unsigned long testFastLines(uint16_t color1, uint16_t color2) {
unsigned long start;
int16_t x, y;
int16_t w = tft.width();
int16_t h = tft.height();
Serial.println(w);
Serial.println(h);
//tft.fillScreen(GC9A01A_BLACK);
//yield();
Serial.println(w);
Serial.println(h);
start = micros();
// no need for drawfast routines as they are called automatically in adafruitGFX
// for (y = 0; y < h; y += 6) tft.drawFastHLine(0, y, w, color1);
// for (x = 0; x < w; x += 6) tft.drawFastVLine(x, 0, h, color2);
for (y = 0; y < h; y += 6) tft.drawLine(0, y, w, y, color1);
for (x = 0; x < w; x += 6) tft.drawLine(x, 0, x, h, color2);
//yield();
return micros() - start;
}
void setup() {
Serial.begin(9600);
Serial.println("GC9A01A Test!");
tft.begin();
Serial.println(tft.width());
Serial.println(tft.height()); // verify correct width/height
Serial.println(F("Benchmark Time (microseconds)"));
delay(10);
//Serial.print(F("Screen fill "));
//Serial.println(testFillScreen());
//delay(500);
Serial.print(F("Horiz/Vert Lines "));
Serial.println(testFastLines(GC9A01A_RED, GC9A01A_BLUE));
delay(500);
Serial.println(F("Done!"));
}
void loop(void) {
}