diff --git a/Extensions/Smooth_font.cpp b/Extensions/Smooth_font.cpp index 7ec2340..ca1cb63 100644 --- a/Extensions/Smooth_font.cpp +++ b/Extensions/Smooth_font.cpp @@ -8,9 +8,18 @@ /*************************************************************************************** ** Function name: loadFont -** Description: loads parameters from a new font vlw file stored in SPIFFS +** Description: loads parameters from a new font vlw file *************************************************************************************x*/ -void TFT_eSPI::loadFont(String fontName) +void TFT_eSPI::loadFont(String fontName, fs::FS &ffs) +{ + fontFS = ffs; + loadFont(fontName, false); +} +/*************************************************************************************** +** Function name: loadFont +** Description: loads parameters from a new font vlw file +*************************************************************************************x*/ +void TFT_eSPI::loadFont(String fontName, bool flash) { /* The vlw font format does not appear to be documented anywhere, so some reverse @@ -74,11 +83,19 @@ void TFT_eSPI::loadFont(String fontName) */ - unloadFont(); - - _gFontFilename = "/" + fontName + ".vlw"; + spiffs = flash; - fontFile = SPIFFS.open( _gFontFilename, "r"); + if(spiffs) fontFS = SPIFFS; + + unloadFont(); + + // Avoid a crash on the ESP32 if the file does not exist + if (fontFS.exists("/" + fontName + ".vlw") == false) { + Serial.println("Font file " + fontName + " not found!"); + return; + } + + fontFile = fontFS.open( "/" + fontName + ".vlw", "r"); if(!fontFile) return; @@ -91,7 +108,7 @@ void TFT_eSPI::loadFont(String fontName) gFont.ascent = (uint16_t)readInt32(); // top of "d" gFont.descent = (uint16_t)readInt32(); // bottom of "p" - // These next gFont values will be updated when the Metrics are fetched + // These next gFont values might be updated when the Metrics are fetched gFont.maxAscent = gFont.ascent; // Determined from metrics gFont.maxDescent = gFont.descent; // Determined from metrics gFont.yAdvance = gFont.ascent + gFont.descent; @@ -116,13 +133,28 @@ void TFT_eSPI::loadMetrics(uint16_t gCount) uint32_t headerPtr = 24; uint32_t bitmapPtr = 24 + gCount * 28; - gUnicode = (uint16_t*)malloc( gCount * 2); // Unicode 16 bit Basic Multilingual Plane (0-FFFF) - gHeight = (uint8_t*)malloc( gCount ); // Height of glyph - gWidth = (uint8_t*)malloc( gCount ); // Width of glyph - gxAdvance = (uint8_t*)malloc( gCount ); // xAdvance - to move x cursor - gdY = (int8_t*)malloc( gCount ); // offset from bitmap top edge from lowest point in any character - gdX = (int8_t*)malloc( gCount ); // offset for bitmap left edge relative to cursor X - gBitmap = (uint32_t*)malloc( gCount * 4); // seek pointer to glyph bitmap in SPIFFS file +#if defined (ESP32) && defined (CONFIG_SPIRAM_SUPPORT) + if ( psramFound() ) + { + gUnicode = (uint16_t*)ps_malloc( gCount * 2); // Unicode 16 bit Basic Multilingual Plane (0-FFFF) + gHeight = (uint8_t*)ps_malloc( gCount ); // Height of glyph + gWidth = (uint8_t*)ps_malloc( gCount ); // Width of glyph + gxAdvance = (uint8_t*)ps_malloc( gCount ); // xAdvance - to move x cursor + gdY = (int16_t*)ps_malloc( gCount * 2); // offset from bitmap top edge from lowest point in any character + gdX = (int8_t*)ps_malloc( gCount ); // offset for bitmap left edge relative to cursor X + gBitmap = (uint32_t*)ps_malloc( gCount * 4); // seek pointer to glyph bitmap in the file + } + else +#endif + { + gUnicode = (uint16_t*)malloc( gCount * 2); // Unicode 16 bit Basic Multilingual Plane (0-FFFF) + gHeight = (uint8_t*)malloc( gCount ); // Height of glyph + gWidth = (uint8_t*)malloc( gCount ); // Width of glyph + gxAdvance = (uint8_t*)malloc( gCount ); // xAdvance - to move x cursor + gdY = (int16_t*)malloc( gCount * 2); // offset from bitmap top edge from lowest point in any character + gdX = (int8_t*)malloc( gCount ); // offset for bitmap left edge relative to cursor X + gBitmap = (uint32_t*)malloc( gCount * 4); // seek pointer to glyph bitmap in the file + } #ifdef SHOW_ASCENT_DESCENT Serial.print("ascent = "); Serial.println(gFont.ascent); @@ -137,15 +169,23 @@ void TFT_eSPI::loadMetrics(uint16_t gCount) gHeight[gNum] = (uint8_t)readInt32(); // Height of glyph gWidth[gNum] = (uint8_t)readInt32(); // Width of glyph gxAdvance[gNum] = (uint8_t)readInt32(); // xAdvance - to move x cursor - gdY[gNum] = (int8_t)readInt32(); // y delta from baseline + gdY[gNum] = (int16_t)readInt32(); // y delta from baseline gdX[gNum] = (int8_t)readInt32(); // x delta from cursor readInt32(); // ignored - // Different glyph sets have different ascent values not always based on "d", so get maximum glyph ascent + //Serial.print("Unicode = 0x"); Serial.print(gUnicode[gNum], HEX); Serial.print(", gHeight = "); Serial.println(gHeight[gNum]); + //Serial.print("Unicode = 0x"); Serial.print(gUnicode[gNum], HEX); Serial.print(", gWidth = "); Serial.println(gWidth[gNum]); + //Serial.print("Unicode = 0x"); Serial.print(gUnicode[gNum], HEX); Serial.print(", gxAdvance = "); Serial.println(gxAdvance[gNum]); + //Serial.print("Unicode = 0x"); Serial.print(gUnicode[gNum], HEX); Serial.print(", gdY = "); Serial.println(gdY[gNum]); + + // Different glyph sets have different ascent values not always based on "d", so we could get + // the maximum glyph ascent by checking all characters. BUT this method can generate bad values + // for non-existant glyphs, so we will reply on processing for the value and disable this code for now... + /* if (gdY[gNum] > gFont.maxAscent) { - // Avoid UTF coding values and characters that tend to give duff values - if (((gUnicode[gNum] > 0x20) && (gUnicode[gNum] < 0xA0) && (gUnicode[gNum] != 0x7F)) || (gUnicode[gNum] > 0xFF)) + // Try to avoid UTF coding values and characters that tend to give duff values + if (((gUnicode[gNum] > 0x20) && (gUnicode[gNum] < 0x7F)) || (gUnicode[gNum] > 0xA0)) { gFont.maxAscent = gdY[gNum]; #ifdef SHOW_ASCENT_DESCENT @@ -153,6 +193,7 @@ void TFT_eSPI::loadMetrics(uint16_t gCount) #endif } } + */ // Different glyph sets have different descent values not always based on "p", so get maximum glyph descent if (((int16_t)gHeight[gNum] - (int16_t)gdY[gNum]) > gFont.maxDescent) @@ -240,6 +281,7 @@ void TFT_eSPI::unloadFont( void ) ** Function name: decodeUTF8 ** Description: Line buffer UTF-8 decoder with fall-back to extended ASCII *************************************************************************************x*/ +/* Function moved to TFT_eSPI.cpp #define DECODE_UTF8 uint16_t TFT_eSPI::decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining) { @@ -267,20 +309,26 @@ uint16_t TFT_eSPI::decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining) return c; // fall-back to extended ASCII } +*/ /*************************************************************************************** ** Function name: decodeUTF8 ** Description: Serial UTF-8 decoder with fall-back to extended ASCII *************************************************************************************x*/ +/* Function moved to TFT_eSPI.cpp uint16_t TFT_eSPI::decodeUTF8(uint8_t c) { #ifdef DECODE_UTF8 + + // 7 bit Unicode + if ((c & 0x80) == 0x00) { + decoderState = 0; + return (uint16_t)c; + } + if (decoderState == 0) { - // 7 bit Unicode - if ((c & 0x80) == 0x00) return (uint16_t)c; - // 11 bit Unicode if ((c & 0xE0) == 0xC0) { @@ -316,8 +364,10 @@ uint16_t TFT_eSPI::decodeUTF8(uint8_t c) } #endif + decoderState = 0; return (uint16_t)c; // fall-back to extended ASCII } +*/ @@ -424,15 +474,29 @@ void TFT_eSPI::drawGlyph(uint16_t code) uint8_t pbuffer[gWidth[gNum]]; - uint16_t xs = 0; + int16_t xs = 0; uint32_t dl = 0; int16_t cy = cursor_y + gFont.maxAscent - gdY[gNum]; int16_t cx = cursor_x + gdX[gNum]; + startWrite(); // Avoid slow ESP32 transaction overhead for every pixel + for (int y = 0; y < gHeight[gNum]; y++) { - fontFile.read(pbuffer, gWidth[gNum]); //cursor_y = this->cursor_x = 0; // Text cursor position } @@ -62,33 +65,61 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames) _sh = h; _scolor = TFT_BLACK; + _xpivot = w/2; + _ypivot = h/2; + + _img8 = (uint8_t*) callocSprite(w, h, frames); + _img8_1 = _img8; + _img8_2 = _img8; + _img = (uint16_t*) _img8; + + // This is to make it clear what pointer size is expected to be used + // but casting in the user sketch is needed due to the use of void* + if (_bpp == 1) + { + w = (w+7) & 0xFFF8; + _img8_2 = _img8 + ( (w>>3) * h + 1 ); + } + + if (_img8) + { + _created = true; + return _img8; + } + + return NULL; +} + + +/*************************************************************************************** +** Function name: callocSprite +** Description: Allocate a memory area for the Sprite and return pointer +*************************************************************************************x*/ + +void* TFT_eSprite::callocSprite(int16_t w, int16_t h, uint8_t frames) +{ // Add one extra "off screen" pixel to point out-of-bounds setWindow() coordinates // this means push/writeColor functions do not need additional bounds checks and // hence will run faster in normal circumstances. + uint8_t* ptr8 = NULL; + if (_bpp == 16) { - _img8_1 = ( uint8_t*) calloc(w * h + 1, sizeof(uint16_t)); - _img8_2 = _img8_1; - _img = (uint16_t*) _img8_1; - if (_img) - { - _created = true; - return _img; - } +#if defined (ESP32) && defined (CONFIG_SPIRAM_SUPPORT) + if ( psramFound() ) ptr8 = ( uint8_t*) ps_calloc(w * h + 1, sizeof(uint16_t)); + else +#endif + ptr8 = ( uint8_t*) calloc(w * h + 1, sizeof(uint16_t)); } else if (_bpp == 8) { - _img8_1 = ( uint8_t*) calloc(w * h + 1, sizeof(uint8_t)); - - if (_img8_1) - { - _img8 = _img8_1; - _img8_2 = _img8_1; - _created = true; - return _img8; - } +#if defined (ESP32) && defined (CONFIG_SPIRAM_SUPPORT) + if ( psramFound() ) ptr8 = ( uint8_t*) ps_calloc(w * h + 1, sizeof(uint8_t)); + else +#endif + ptr8 = ( uint8_t*) calloc(w * h + 1, sizeof(uint8_t)); } else // Must be 1 bpp @@ -103,18 +134,14 @@ void* TFT_eSprite::createSprite(int16_t w, int16_t h, uint8_t frames) if (frames > 2) frames = 2; // Currently restricted to 2 frame buffers if (frames < 1) frames = 1; - _img8 = ( uint8_t*) calloc(frames * (w>>3) * h + frames, sizeof(uint8_t)); // extra pixel added - - if (_img8) - { - _created = true; - _img8_1 = _img8; - _img8_2 = _img8 + ( (w>>3) * h + 1 ); - return _img8_1; - } +#if defined (ESP32) && defined (CONFIG_SPIRAM_SUPPORT) + if ( psramFound() ) ptr8 = ( uint8_t*) ps_calloc(frames * (w>>3) * h + frames, sizeof(uint8_t)); + else +#endif + ptr8 = ( uint8_t*) calloc(frames * (w>>3) * h + frames, sizeof(uint8_t)); } - - return NULL; + + return ptr8; } /*************************************************************************************** @@ -137,8 +164,8 @@ void* TFT_eSprite::frameBuffer(int8_t f) } /*************************************************************************************** -** Function name: setDepth -** Description: Set bits per pixel for colour (8 or 16) +** Function name: setColorDepth +** Description: Set bits per pixel for colour (1, 8 or 16) *************************************************************************************x*/ void* TFT_eSprite::setColorDepth(int8_t b) @@ -161,6 +188,19 @@ void* TFT_eSprite::setColorDepth(int8_t b) return NULL; } + +/*************************************************************************************** +** Function name: getColorDepth +** Description: Get bits per pixel for colour (1, 8 or 16) +*************************************************************************************x*/ + +int8_t TFT_eSprite::getColorDepth(void) +{ + if (_created) return _bpp; + else return 0; +} + + /*************************************************************************************** ** Function name: setBitmapColor ** Description: Set the foreground foreground and background colour @@ -187,6 +227,235 @@ void TFT_eSprite::deleteSprite(void) } +/*************************************************************************************** +** Function name: setPivot +** Description: Set the pivot point in this Sprite +*************************************************************************************x*/ +void TFT_eSprite::setPivot(int16_t x, int16_t y) +{ + _xpivot = x; + _ypivot = y; +} + + +/*************************************************************************************** +** Function name: getPivotX +** Description: Get the x pivot position +***************************************************************************************/ +int16_t TFT_eSprite::getPivotX(void) +{ + return _xpivot; +} + + +/*************************************************************************************** +** Function name: getPivotY +** Description: Get the y pivot position +***************************************************************************************/ +int16_t TFT_eSprite::getPivotY(void) +{ + return _ypivot; +} + + +/*************************************************************************************** +** Function name: pushRotated +** Description: Push a rotated copy of the Sprite to TFT screen +*************************************************************************************x*/ +bool TFT_eSprite::pushRotated(int16_t angle, int32_t transp) +{ + if ( !_created ) return false; + + // Trig values for the rotation + float radAngle = -angle * 0.0174532925; // Convert degrees to radians + float sinra = sin(radAngle); + float cosra = cos(radAngle); + + // Bounding box parameters + int16_t min_x; + int16_t min_y; + int16_t max_x; + int16_t max_y; + + // Get the bounding box of this rotated source Sprite relative to Sprite pivot + getRotatedBounds(sinra, cosra, width(), height(), _xpivot, _ypivot, &min_x, &min_y, &max_x, &max_y); + + // Move bounding box so source Sprite pivot coincides with TFT pivot + min_x += _tft->_xpivot; + max_x += _tft->_xpivot; + min_y += _tft->_ypivot; + max_y += _tft->_ypivot; + + // Test only to show bounding box on TFT + // _tft->drawRect(min_x, min_y, max_x - min_x + 1, max_y - min_y + 1, TFT_GREEN); + + // Return if bounding box is outside of TFT area + if (min_x > _tft->width()) return true; + if (min_y > _tft->height()) return true; + if (max_x < 0) return true; + if (max_y < 0) return true; + + // Clip bounding box to be within TFT area + if (min_x < 0) min_x = 0; + if (min_y < 0) min_y = 0; + if (max_x > _tft->width()) max_x = _tft->width(); + if (max_y > _tft->height()) max_y = _tft->height(); + + _tft->startWrite(); // ESP32: avoid transaction overhead for every tft pixel + + // Scan destination bounding box and fetch transformed pixels from source Sprite + for (int32_t x = min_x; x <= max_x; x++) { + int32_t xt = x - _tft->_xpivot; + float cxt = cosra * xt + _xpivot; + float sxt = sinra * xt + _ypivot; + bool column_drawn = false; + for (int32_t y = min_y; y <= max_y; y++) { + int32_t yt = y - _tft->_ypivot; + int32_t xs = (int32_t)round(cxt - sinra * yt); + // Do not calculate ys unless xs is in bounds + if (xs >= 0 && xs < width()) + { + int32_t ys = (int32_t)round(sxt + cosra * yt); + // Check if ys is in bounds + if (ys >= 0 && ys < height()) { + int32_t rp = readPixel(xs, ys); + if (rp != transp) _tft->drawPixel(x, y, rp); + column_drawn = true; + } + } + else if (column_drawn) y = max_y; // Skip remaining column pixels + } + } + + _tft->endWrite(); // ESP32: end transaction + + return true; +} + + +/*************************************************************************************** +** Function name: pushRotated +** Description: Push a rotated copy of the Sprite to another Sprite +*************************************************************************************x*/ +bool TFT_eSprite::pushRotated(TFT_eSprite *spr, int16_t angle, int32_t transp) +{ + if ( !_created ) return false; // Check this Sprite is created + if ( !spr->_created ) return false; // Ckeck destination Sprite is created + + // Trig values for the rotation + float radAngle = -angle * 0.0174532925; // Convert degrees to radians + float sinra = sin(radAngle); + float cosra = cos(radAngle); + + // Bounding box parameters + int16_t min_x; + int16_t min_y; + int16_t max_x; + int16_t max_y; + + // Get the bounding box of this rotated source Sprite + getRotatedBounds(sinra, cosra, width(), height(), _xpivot, _ypivot, &min_x, &min_y, &max_x, &max_y); + + // Move bounding box so source Sprite pivot coincides with destination Sprite pivot + min_x += spr->_xpivot; + max_x += spr->_xpivot; + min_y += spr->_ypivot; + max_y += spr->_ypivot; + + // Test only to show bounding box + // spr->fillSprite(TFT_BLACK); + // spr->drawRect(min_x, min_y, max_x - min_x + 1, max_y - min_y + 1, TFT_GREEN); + + // Return if bounding box is completely outside of destination Sprite + if (min_x > spr->width()) return true; + if (min_y > spr->height()) return true; + if (max_x < 0) return true; + if (max_y < 0) return true; + + // Clip bounding box if it is partially within destination Sprite + if (min_x < 0) min_x = 0; + if (min_y < 0) min_y = 0; + if (max_x > spr->width()) max_x = spr->width(); + if (max_y > spr->height()) max_y = spr->height(); + + // Scan destination bounding box and fetch transformed pixels from source Sprite + for (int32_t x = min_x; x <= max_x; x++) + { + int32_t xt = x - spr->_xpivot; + float cxt = cosra * xt + _xpivot; + float sxt = sinra * xt + _ypivot; + bool column_drawn = false; + for (int32_t y = min_y; y <= max_y; y++) + { + int32_t yt = y - spr->_ypivot; + int32_t xs = (int32_t)round(cxt - sinra * yt); + // Do not calculate ys unless xs is in bounds + if (xs >= 0 && xs < width()) + { + int32_t ys = (int32_t)round(sxt + cosra * yt); + // Check if ys is in bounds + if (ys >= 0 && ys < height()) + { + int32_t rp = readPixel(xs, ys); + if (rp != transp) spr->drawPixel(x, y, rp); + column_drawn = true; + } + } + else if (column_drawn) y = max_y; // Skip the remaining pixels below the Sprite + } + } + + return true; +} + + +/*************************************************************************************** +** Function name: rotatedBounds +** Description: Get bounding box of a rotated Sprite wrt pivot +*************************************************************************************x*/ +void TFT_eSprite::getRotatedBounds(float sina, float cosa, int16_t w, int16_t h, int16_t xp, int16_t yp, + int16_t *min_x, int16_t *min_y, int16_t *max_x, int16_t *max_y) +{ + w -= xp; // w is now right edge coordinate relative to xp + h -= yp; // h is now bottom edge coordinate relative to yp + + // Calculate new corner coordinates + int16_t x0 = -xp * cosa - yp * sina; + int16_t y0 = xp * sina - yp * cosa; + + int16_t x1 = w * cosa - yp * sina; + int16_t y1 = -w * sina - yp * cosa; + + int16_t x2 = h * sina + w * cosa; + int16_t y2 = h * cosa - w * sina; + + int16_t x3 = h * sina - xp * cosa; + int16_t y3 = h * cosa + xp * sina; + + // Find bounding box extremes, enlarge box to accomodate rounding errors + *min_x = x0-2; + if (x1 < *min_x) *min_x = x1-2; + if (x2 < *min_x) *min_x = x2-2; + if (x3 < *min_x) *min_x = x3-2; + + *max_x = x0+2; + if (x1 > *max_x) *max_x = x1+2; + if (x2 > *max_x) *max_x = x2+2; + if (x3 > *max_x) *max_x = x3+2; + + *min_y = y0-2; + if (y1 < *min_y) *min_y = y1-2; + if (y2 < *min_y) *min_y = y2-2; + if (y3 < *min_y) *min_y = y3-2; + + *max_y = y0+2; + if (y1 > *max_y) *max_y = y1+2; + if (y2 > *max_y) *max_y = y2+2; + if (y3 > *max_y) *max_y = y3+2; + +} + + /*************************************************************************************** ** Function name: pushSprite ** Description: Push the sprite to the TFT at x, y @@ -198,7 +467,6 @@ void TFT_eSprite::pushSprite(int32_t x, int32_t y) if (_bpp == 16) _tft->pushImage(x, y, _iwidth, _iheight, _img ); else _tft->pushImage(x, y, _dwidth, _dheight, _img8, (bool)(_bpp == 8)); - } @@ -275,33 +543,54 @@ uint16_t TFT_eSprite::readPixel(int32_t x, int32_t y) ** Function name: pushImage ** Description: push 565 colour image into a defined area of a sprite *************************************************************************************x*/ -// TODO Need to add more area boundary checks -void TFT_eSprite::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t *data) +void TFT_eSprite::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data) { if ((x >= _iwidth) || (y >= _iheight) || (w == 0) || (h == 0) || !_created) return; + if ((x + w < 0) || (y + h < 0)) return; - if (_bpp == 16) + int32_t xo = 0; + int32_t yo = 0; + + int32_t xs = x; + int32_t ys = y; + + uint32_t ws = w; + uint32_t hs = h; + + if (x < 0) { xo = -x; xs = 0; } + if (y < 0) { yo = -y; ys = 0; } + + if (xs + w >= _iwidth) ws = _iwidth - xs; + if (ys + h >= _iheight) hs = _iheight - ys; + + if (_bpp == 16) // Plot a 16 bpp image into a 16 bpp Sprite { - for (uint32_t yp = y; yp < y + h; yp++) + for (uint32_t yp = yo; yp < yo + hs; yp++) { - for (uint32_t xp = x; xp < x + w; xp++) + x = xs; + for (uint32_t xp = xo; xp < xo + ws; xp++) { - uint16_t color = *data++; + uint16_t color = data[xp + yp * w]; if(!_iswapBytes) color = color<<8 | color>>8; - _img[xp + yp * _iwidth] = color; + _img[x + ys * _iwidth] = color; + x++; } + ys++; } } - else if (_bpp == 8) + else if (_bpp == 8) // Plot a 16 bpp image into a 8 bpp Sprite { - for (uint32_t yp = y; yp < y + h; yp++) + for (uint32_t yp = yo; yp < yo + hs; yp++) { - for (uint32_t xp = x; xp < x + w; xp++) + x = xs; + for (uint32_t xp = xo; xp < xo + ws; xp++) { - uint16_t color = *data++; + uint16_t color = data[xp + yp * w]; if(_iswapBytes) color = color<<8 | color>>8; - _img8[xp + yp * _iwidth] = (uint8_t)((color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3); + _img8[x + ys * _iwidth] = (uint8_t)((color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3); + x++; } + ys++; } } @@ -325,18 +614,17 @@ void TFT_eSprite::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint1 x = y; y = _dheight - tx - 1; } - - uint8_t* pdata = (uint8_t*) data; + // Plot a 1bpp image into a 1bpp Sprite + uint8_t* pdata = (uint8_t* ) data; uint32_t ww = (w+7) & 0xFFF8; for (int32_t yp = 0; yp>3; + uint32_t yyp = y + yp; + for (int32_t xp = 0; xp>3) + yw] & (0x80 >> (xp & 0x7)) ); + drawPixel(x+xp, yyp, readPixel); } } } @@ -347,34 +635,59 @@ void TFT_eSprite::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint1 ** Function name: pushImage ** Description: push 565 colour FLASH (PROGMEM) image into a defined area *************************************************************************************x*/ -// TODO Need to add more area boundary checks -void TFT_eSprite::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uint16_t *data) +void TFT_eSprite::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const uint16_t *data) { +#ifdef ESP32 + pushImage(x, y, w, h, (uint16_t*) data); +#else + // Partitioned memory FLASH processor if ((x >= _iwidth) || (y >= _iheight) || (w == 0) || (h == 0) || !_created) return; + if ((x + w < 0) || (y + h < 0)) return; - if (_bpp == 16) + int32_t xo = 0; + int32_t yo = 0; + + int32_t xs = x; + int32_t ys = y; + + uint32_t ws = w; + uint32_t hs = h; + + if (x < 0) { xo = -x; xs = 0; } + if (y < 0) { yo = -y; ys = 0; } + + if (xs + w >= _iwidth) ws = _iwidth - xs; + if (ys + h >= _iheight) hs = _iheight - ys; + + if (_bpp == 16) // Plot a 16 bpp image into a 16 bpp Sprite { - for (uint32_t yp = y; yp < y + h; yp++) + for (uint32_t yp = yo; yp < yo + hs; yp++) { - for (uint32_t xp = x; xp < x + w; xp++) + x = xs; + for (uint32_t xp = xo; xp < xo + ws; xp++) { - uint16_t color = pgm_read_word(data++); + uint16_t color = pgm_read_word(data + xp + yp * w); if(!_iswapBytes) color = color<<8 | color>>8; - _img[xp + yp * _iwidth] = color; + _img[x + ys * _iwidth] = color; + x++; } + ys++; } } - else if (_bpp == 8) + else if (_bpp == 8) // Plot a 16 bpp image into a 8 bpp Sprite { - for (uint32_t yp = y; yp < y + h; yp++) + for (uint32_t yp = yo; yp < yo + hs; yp++) { - for (uint32_t xp = x; xp < x + w; xp++) + x = xs; + for (uint32_t xp = xo; xp < xo + ws; xp++) { - uint16_t color = pgm_read_word(data++); + uint16_t color = pgm_read_word(data + xp + yp * w); if(_iswapBytes) color = color<<8 | color>>8; - _img8[xp + yp * _iwidth] = (uint8_t)((color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3); + _img8[x + ys * _iwidth] = (uint8_t)((color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3); + x++; } + ys++; } } @@ -398,7 +711,7 @@ void TFT_eSprite::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const x = y; y = _dheight - tx - 1; } - + // Plot a 1bpp image into a 1bpp Sprite const uint8_t* pdata = (const uint8_t* ) data; uint32_t ww = (w+7) & 0xFFF8; for (int32_t yp = 0; yp= _iwidth) || (y >= _iheight) || !_created ) return; @@ -643,7 +957,21 @@ void TFT_eSprite::scroll(int16_t dx, int16_t dy) fyp += iw; } } - else return; // TODO add scroll for 1 bpp + else if (_bpp == 1) + { + if (dx > 0) { tx += w; fx += w; } // Start from right edge + while (h--) + { // move pixels one by one + for (uint16_t xp = 0; xp < w; xp++) + { + if (dx <= 0) drawPixel(tx + xp, ty, readPixel(fx + xp, fy)); + if (dx > 0) drawPixel(tx - xp, ty, readPixel(fx - xp, fy)); + } + if (dy <= 0) { ty++; fy++; } + else { ty--; fy--; } + } + } + else return; // Not 1, 8 or 16 bpp // Fill the gap left by the scrolling if (dx > 0) fillRect(_sx, _sy, dx, _sh, _scolor); @@ -704,7 +1032,7 @@ int16_t TFT_eSprite::width(void) if (_rotation == 1 || _rotation == 3) return _dheight; - return _bitwidth; + return _dwidth; } @@ -731,6 +1059,8 @@ int16_t TFT_eSprite::height(void) // Does nothing for 8 and 16 bpp sprites. TODO allow rotation of these sprites void TFT_eSprite::setRotation(uint8_t rotation) { + if (_bpp != 1) return; + _rotation = rotation; if (rotation == 0 && _iwidth > _iheight) swap_coord(_iwidth, _iheight); if (rotation == 1 && _iwidth < _iheight) swap_coord(_iwidth, _iheight); @@ -754,23 +1084,25 @@ uint8_t TFT_eSprite::getRotation(void) ** Function name: drawPixel ** Description: push a single pixel at an arbitrary position *************************************************************************************x*/ -void TFT_eSprite::drawPixel(uint32_t x, uint32_t y, uint32_t color) +void TFT_eSprite::drawPixel(int32_t x, int32_t y, uint32_t color) { - // x and y are unsigned so that -ve coordinates turn into large positive ones - // this make bounds checking a bit faster - if ((x >= _iwidth) || (y >= _iheight) || !_created) return; + // Range checking + if ((x < 0) || (y < 0) || !_created) return; if (_bpp == 16) { + if ((x >= _iwidth) || (y >= _iheight)) return; color = (color >> 8) | (color << 8); _img[x+y*_iwidth] = (uint16_t) color; } else if (_bpp == 8) { + if ((x >= _iwidth) || (y >= _iheight)) return; _img8[x+y*_iwidth] = (uint8_t)((color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3); } else // 1 bpp { + if ((x >= _dwidth) || (y >= _dheight)) return; if (_rotation == 1) { uint16_t tx = x; @@ -932,11 +1264,14 @@ void TFT_eSprite::fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t { if (!_created ) return; + if ((x >= _iwidth) || (y >= _iheight)) return; + if (x < 0) { w += x; x = 0; } + if (y < 0) { h += y; y = 0; } - if ((x < 0) || (y < 0) || (x >= _iwidth) || (y >= _iheight)) return; if ((x + w) > _iwidth) w = _iwidth - x; if ((y + h) > _iheight) h = _iheight - y; + if ((w < 1) || (h < 1)) return; int32_t yp = _iwidth * y + x; @@ -982,13 +1317,16 @@ void TFT_eSprite::fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t *************************************************************************************x*/ size_t TFT_eSprite::write(uint8_t utf8) { + uint16_t uniCode = decodeUTF8(utf8); + + if (!uniCode) return 1; + if (utf8 == '\r') return 1; #ifdef SMOOTH_FONT if(this->fontLoaded) { - uint16_t unicode = decodeUTF8(utf8); - if (unicode < 32 && utf8 != '\n') return 0; + if (uniCode < 32 && utf8 != '\n') return 1; //fontFile = SPIFFS.open( _gFontFilename, "r" ); //fontFile = SPIFFS.open( this->_gFontFilename, "r" ); @@ -996,22 +1334,21 @@ size_t TFT_eSprite::write(uint8_t utf8) //if(!fontFile) //{ // fontLoaded = false; - // return 0; + // return 1; //} //Serial.print("Decoded Unicode = 0x");Serial.println(unicode,HEX); - drawGlyph(unicode); + drawGlyph(uniCode); + //fontFile.close(); - return 0; + return 1; } #endif - if (!_created ) return 0; + if (!_created ) return 1; - - uint8_t uniCode = utf8; // Work with a copy - if (utf8 == '\n') uniCode+=22; // Make it a valid space character to stop errors - else if (utf8 < 32) return 0; + if (uniCode == '\n') uniCode+=22; // Make it a valid space character to stop errors + else if (uniCode < 32) return 1; uint16_t width = 0; uint16_t height = 0; @@ -1031,8 +1368,8 @@ size_t TFT_eSprite::write(uint8_t utf8) #ifdef LOAD_FONT2 if (textfont == 2) { - if (utf8 > 127) return 0; - // This is 20us faster than using the fontdata structure (0.443ms per character instead of 0.465ms) + if (utf8 > 127) return 1; + width = pgm_read_byte(widtbl_f16 + uniCode-32); height = chr_hgt_f16; // Font 2 is rendered in whole byte widths so we must allow for this @@ -1048,9 +1385,8 @@ size_t TFT_eSprite::write(uint8_t utf8) { if ((textfont>2) && (textfont<9)) { - if (utf8 > 127) return 0; + if (utf8 > 127) return 1; // Uses the fontinfo struct array to avoid lots of 'if' or 'switch' statements - // A tad slower than above but this is not significant and is more convenient for the RLE fonts width = pgm_read_byte( (uint8_t *)pgm_read_dword( &(fontdata[textfont].widthtbl ) ) + uniCode-32 ); height= pgm_read_byte( &fontdata[textfont].height ); } @@ -1064,7 +1400,7 @@ size_t TFT_eSprite::write(uint8_t utf8) height = 8; } #else - if (textfont==1) return 0; + if (textfont==1) return 1; #endif height = height * textsize; @@ -1090,15 +1426,14 @@ size_t TFT_eSprite::write(uint8_t utf8) } // Custom GFX font else { - if(utf8 == '\n') { this->cursor_x = 0; this->cursor_y += (int16_t)textsize * (uint8_t)pgm_read_byte(&gfxFont->yAdvance); } else { - if (uniCode > (uint8_t)pgm_read_byte(&gfxFont->last )) return 0; - if (uniCode < (uint8_t)pgm_read_byte(&gfxFont->first)) return 0; + if (uniCode > pgm_read_word(&gfxFont->last )) return 1; + if (uniCode < pgm_read_word(&gfxFont->first)) return 1; - uint8_t c2 = uniCode - pgm_read_byte(&gfxFont->first); + uint8_t c2 = uniCode - pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]); uint8_t w = pgm_read_byte(&glyph->width), h = pgm_read_byte(&glyph->height); @@ -1126,7 +1461,7 @@ size_t TFT_eSprite::write(uint8_t utf8) ** Function name: drawChar ** Description: draw a single character in the Adafruit GLCD or freefont *************************************************************************************x*/ -void TFT_eSprite::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, uint32_t bg, uint8_t size) +void TFT_eSprite::drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uint32_t bg, uint8_t size) { if (!_created ) return; @@ -1136,6 +1471,7 @@ void TFT_eSprite::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color ((y + 8 * size - 1) < 0)) // Clip top return; + if (c < 32) return; #ifdef LOAD_GLCD //>>>>>>>>>>>>>>>>>> #ifdef LOAD_GFXFF @@ -1204,15 +1540,15 @@ void TFT_eSprite::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color #ifdef LOAD_GFXFF // Filter out bad characters not present in font - if ((c >= (uint8_t)pgm_read_byte(&gfxFont->first)) && (c <= (uint8_t)pgm_read_byte(&gfxFont->last ))) + if ((c >= pgm_read_word(&gfxFont->first)) && (c <= pgm_read_word(&gfxFont->last ))) { //>>>>>>>>>>>>>>>>>>>>>>>>>>> - c -= pgm_read_byte(&gfxFont->first); + c -= pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c]); uint8_t *bitmap = (uint8_t *)pgm_read_dword(&gfxFont->bitmap); - uint16_t bo = pgm_read_word(&glyph->bitmapOffset); + uint32_t bo = pgm_read_word(&glyph->bitmapOffset); uint8_t w = pgm_read_byte(&glyph->width), h = pgm_read_byte(&glyph->height); //xa = pgm_read_byte(&glyph->xAdvance); @@ -1267,15 +1603,19 @@ void TFT_eSprite::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color ** Function name: drawChar ** Description: draw a unicode onto the screen *************************************************************************************x*/ -int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y) + // Any UTF-8 decoding must be done before calling drawChar() +int16_t TFT_eSprite::drawChar(uint16_t uniCode, int32_t x, int32_t y) { return drawChar(uniCode, x, y, textfont); } -int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y, int font) + // Any UTF-8 decoding must be done before calling drawChar() +int16_t TFT_eSprite::drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font) { if (!_created ) return 0; + if (!uniCode) return 0; + if (font==1) { #ifdef LOAD_GLCD @@ -1300,9 +1640,9 @@ int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y, int font) } else { - if((uniCode >= pgm_read_byte(&gfxFont->first)) && (uniCode <= pgm_read_byte(&gfxFont->last) )) + if((uniCode >= pgm_read_word(&gfxFont->first)) && (uniCode <= pgm_read_word(&gfxFont->last) )) { - uint8_t c2 = uniCode - pgm_read_byte(&gfxFont->first); + uint16_t c2 = uniCode - pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]); return pgm_read_byte(&glyph->xAdvance) * textsize; } @@ -1316,8 +1656,8 @@ int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y, int font) if ((font>1) && (font<9) && ((uniCode < 32) || (uniCode > 127))) return 0; - int width = 0; - int height = 0; + int32_t width = 0; + int32_t height = 0; uint32_t flash_address = 0; uniCode -= 32; @@ -1346,9 +1686,9 @@ int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y, int font) } #endif - int w = width; - int pX = 0; - int pY = y; + int32_t w = width; + int32_t pX = 0; + int32_t pY = y; uint8_t line = 0; #ifdef LOAD_FONT2 // chop out code if we do not need it @@ -1357,11 +1697,11 @@ int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y, int font) w = w / 8; if (x + width * textsize >= _iwidth) return width * textsize ; - for (int i = 0; i < height; i++) + for (int32_t i = 0; i < height; i++) { if (textcolor != textbgcolor) fillRect(x, pY, width * textsize, textsize, textbgcolor); - for (int k = 0; k < w; k++) + for (int32_t k = 0; k < w; k++) { line = pgm_read_byte((uint8_t *)flash_address + w * i + k); if (line) { @@ -1407,8 +1747,8 @@ int16_t TFT_eSprite::drawChar(unsigned int uniCode, int x, int y, int font) int16_t color = textcolor; if (_bpp == 16) color = (textcolor >> 8) | (textcolor << 8); else if (_bpp == 8) color = ((textcolor & 0xE000)>>8 | (textcolor & 0x0700)>>6 | (textcolor & 0x0018)>>3); - int px = 0, py = pY; // To hold character block start and end column and row values - int pc = 0; // Pixel count + int32_t px = 0, py = pY; // To hold character block start and end column and row values + int32_t pc = 0; // Pixel count uint8_t np = textsize * textsize; // Number of pixels in a drawn pixel uint8_t tnp = 0; // Temporary copy of np for while loop uint8_t ts = textsize - 1; // Temporary copy of textsize @@ -1473,10 +1813,10 @@ void TFT_eSprite::drawGlyph(uint16_t code) if (code == '\n') { if (_created) { - this->cursor_x = 0; - this->cursor_y += this->gFont.yAdvance; - if (this->cursor_y >= _height) this->cursor_y = 0; - return; + this->cursor_x = 0; + this->cursor_y += this->gFont.yAdvance; + if (this->cursor_y >= _height) this->cursor_y = 0; + return; } else { @@ -1511,13 +1851,13 @@ void TFT_eSprite::drawGlyph(uint16_t code) uint8_t pbuffer[this->gWidth[gNum]]; - uint16_t xs = 0; + int16_t xs = 0; uint16_t dl = 0; - for (int y = 0; y < this->gHeight[gNum]; y++) + for (int32_t y = 0; y < this->gHeight[gNum]; y++) { this->fontFile.read(pbuffer, this->gWidth[gNum]); - for (int x = 0; x < this->gWidth[gNum]; x++) + for (int32_t x = 0; x < this->gWidth[gNum]; x++) { uint8_t pixel = pbuffer[x]; if (pixel) @@ -1525,7 +1865,8 @@ void TFT_eSprite::drawGlyph(uint16_t code) if (pixel != 0xFF) { if (dl) { drawFastHLine( xs, y + this->cursor_y + this->gFont.maxAscent - this->gdY[gNum], dl, fg); dl = 0; } - if (pixel>127) drawPixel(x + this->cursor_x + this->gdX[gNum], y + this->cursor_y + this->gFont.maxAscent - this->gdY[gNum], alphaBlend(pixel, fg, bg)); + if (_bpp != 1) drawPixel(x + this->cursor_x + this->gdX[gNum], y + this->cursor_y + this->gFont.maxAscent - this->gdY[gNum], alphaBlend(pixel, fg, bg)); + else if (pixel>127) drawPixel(x + this->cursor_x + this->gdX[gNum], y + this->cursor_y + this->gFont.maxAscent - this->gdY[gNum], fg); } else { @@ -1565,7 +1906,7 @@ void TFT_eSprite::drawGlyph(uint16_t code) void TFT_eSprite::printToSprite(String string) { if(!this->fontLoaded) return; - int16_t len = string.length(); + uint16_t len = string.length(); char cbuffer[len + 1]; // Add 1 for the null string.toCharArray(cbuffer, len + 1); // Add 1 for the null, otherwise characters get dropped printToSprite(cbuffer, len); @@ -1577,7 +1918,7 @@ void TFT_eSprite::printToSprite(String string) ** Function name: printToSprite ** Description: Write a string to the sprite cursor position *************************************************************************************x*/ -void TFT_eSprite::printToSprite(char *cbuffer, int len) //String string) +void TFT_eSprite::printToSprite(char *cbuffer, uint16_t len) //String string) { if(!this->fontLoaded) return; diff --git a/Extensions/Sprite.h b/Extensions/Sprite.h index 1ea7645..5dea24e 100644 --- a/Extensions/Sprite.h +++ b/Extensions/Sprite.h @@ -22,19 +22,20 @@ class TFT_eSprite : public TFT_eSPI { // Select the frame buffer for graphics void* frameBuffer(int8_t f); - // Set the colour depth to 8 or 16 bits. Can be used to change depth an existing + // Set or get the colour depth to 8 or 16 bits. Can be used to change depth an existing // sprite, but clears it to black, returns a new pointer if sprite is re-created. void* setColorDepth(int8_t b); + int8_t getColorDepth(void); void setBitmapColor(uint16_t c, uint16_t b); - void drawPixel(uint32_t x, uint32_t y, uint32_t color); + void drawPixel(int32_t x, int32_t y, uint32_t color); - void drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, uint32_t bg, uint8_t size), + void drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uint32_t bg, uint8_t size), fillSprite(uint32_t color), - // Define a window to push 16 bit colour pixels into is a raster order + // Define a window to push 16 bit colour pixels into in a raster order // Colours are converted to 8 bit if depth is set to 8 setWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1), pushColor(uint32_t color), @@ -44,7 +45,7 @@ class TFT_eSprite : public TFT_eSPI { // Set the scroll zone, top left corner at x,y with defined width and height // The colour (optional, black is default) is used to fill the gap after the scroll - setScrollRect(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t color = TFT_BLACK), + setScrollRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t color = TFT_BLACK), // Scroll the defined zone dx,dy pixels. Negative values left,up, positive right,down // dy is optional (default is then no up/down scroll). // The sprite coordinate frame does not move because pixels are moved @@ -59,15 +60,29 @@ class TFT_eSprite : public TFT_eSPI { // Set the sprite text cursor position for print class (does not change the TFT screen cursor) //setCursor(int16_t x, int16_t y); + // Set the rotation of the Sprite (for 1bpp Sprites only) void setRotation(uint8_t rotation); uint8_t getRotation(void); + // Push a rotated copy of Sprite to TFT with optional transparent colour + bool pushRotated(int16_t angle, int32_t transp = -1); + // Push a rotated copy of Sprite to another different Sprite with optional transparent colour + bool pushRotated(TFT_eSprite *spr, int16_t angle, int32_t transp = -1); + // Set and get the pivot point for this Sprite + void setPivot(int16_t x, int16_t y); + int16_t getPivotX(void), + getPivotY(void); + + // Get the bounding box for a rotated copy of this Sprite + void getRotatedBounds(float sina, float cosa, int16_t w, int16_t h, int16_t xp, int16_t yp, + int16_t *min_x, int16_t *min_y, int16_t *max_x, int16_t *max_y); + // Read the colour of a pixel at x,y and return value in 565 format uint16_t readPixel(int32_t x0, int32_t y0); // Write an image (colour bitmap) to the sprite - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, uint16_t *data); - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, const uint16_t *data); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, uint16_t *data); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, const uint16_t *data); // Swap the byte order for pushImage() - corrects different image endianness void setSwapBytes(bool swap); @@ -78,8 +93,8 @@ class TFT_eSprite : public TFT_eSPI { void pushSprite(int32_t x, int32_t y); void pushSprite(int32_t x, int32_t y, uint16_t transparent); - int16_t drawChar(unsigned int uniCode, int x, int y, int font), - drawChar(unsigned int uniCode, int x, int y); + int16_t drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font), + drawChar(uint16_t uniCode, int32_t x, int32_t y); // Return the width and height of the sprite int16_t width(void), @@ -91,22 +106,28 @@ class TFT_eSprite : public TFT_eSPI { // Functions associated with anti-aliased fonts void drawGlyph(uint16_t code); void printToSprite(String string); - void printToSprite(char *cbuffer, int len); + void printToSprite(char *cbuffer, uint16_t len); int16_t printToSprite(int16_t x, int16_t y, uint16_t index); private: TFT_eSPI *_tft; + // Reserve memory for the Sprite and return a pointer + void* callocSprite(int16_t width, int16_t height, uint8_t frames = 1); + protected: - uint8_t _bpp; + uint8_t _bpp; // bits per pixel (1, 8 or 16) uint16_t *_img; // pointer to 16 bit sprite uint8_t *_img8; // pointer to 8 bit sprite uint8_t *_img8_1; // pointer to frame 1 uint8_t *_img8_2; // pointer to frame 2 - bool _created; // created and bits per pixel depth flags + int16_t _xpivot; // x pivot point coordinate + int16_t _ypivot; // y pivot point coordinate + + bool _created; // A Sprite has been created and memory reserved bool _gFont = false; // int32_t _icursor_x, _icursor_y; diff --git a/Extensions/Touch.cpp b/Extensions/Touch.cpp index 8a3efa8..3f45102 100644 --- a/Extensions/Touch.cpp +++ b/Extensions/Touch.cpp @@ -12,34 +12,42 @@ /*************************************************************************************** ** Function name: getTouchRaw -** Description: read raw touch position. Return false if not pressed. +** Description: read raw touch position. Always returns true. ***************************************************************************************/ uint8_t TFT_eSPI::getTouchRaw(uint16_t *x, uint16_t *y){ uint16_t tmp; - CS_H; spi_begin_touch(); - - T_CS_L; - // Start bit + YP sample request for x position - tmp = SPI.transfer(0xd0); - tmp = SPI.transfer(0); + // Start YP sample request for x position, read 4 times and keep last sample + spi.transfer(0xd0); // Start new YP conversion + spi.transfer(0); // Read first 8 bits + spi.transfer(0xd0); // Read last 8 bits and start new YP conversion + spi.transfer(0); // Read first 8 bits + spi.transfer(0xd0); // Read last 8 bits and start new YP conversion + spi.transfer(0); // Read first 8 bits + spi.transfer(0xd0); // Read last 8 bits and start new YP conversion + + tmp = spi.transfer(0); // Read first 8 bits tmp = tmp <<5; - tmp |= 0x1f & (SPI.transfer(0)>>3); + tmp |= 0x1f & (spi.transfer(0x90)>>3); // Read last 8 bits and start new XP conversion *x = tmp; - // Start bit + XP sample request for y position - SPI.transfer(0x90); - tmp = SPI.transfer(0); + // Start XP sample request for y position, read 4 times and keep last sample + spi.transfer(0); // Read first 8 bits + spi.transfer(0x90); // Read last 8 bits and start new XP conversion + spi.transfer(0); // Read first 8 bits + spi.transfer(0x90); // Read last 8 bits and start new XP conversion + spi.transfer(0); // Read first 8 bits + spi.transfer(0x90); // Read last 8 bits and start new XP conversion + + tmp = spi.transfer(0); // Read first 8 bits tmp = tmp <<5; - tmp |= 0x1f & (SPI.transfer(0)>>3); + tmp |= 0x1f & (spi.transfer(0)>>3); // Read last 8 bits *y = tmp; - T_CS_H; - spi_end_touch(); return true; @@ -50,19 +58,14 @@ uint8_t TFT_eSPI::getTouchRaw(uint16_t *x, uint16_t *y){ ** Description: read raw pressure on touchpad and return Z value. ***************************************************************************************/ uint16_t TFT_eSPI::getTouchRawZ(void){ - CS_H; spi_begin_touch(); - T_CS_L; - // Z sample request int16_t tz = 0xFFF; - SPI.transfer(0xb1); - tz += SPI.transfer16(0xc1) >> 3; - tz -= SPI.transfer16(0x91) >> 3; - - T_CS_H; + spi.transfer(0xb0); // Start new Z1 conversion + tz += spi.transfer16(0xc0) >> 3; // Read Z1 and start Z2 conversion + tz -= spi.transfer16(0x00) >> 3; // Read Z2 spi_end_touch(); @@ -73,11 +76,11 @@ uint16_t TFT_eSPI::getTouchRawZ(void){ ** Function name: validTouch ** Description: read validated position. Return false if not pressed. ***************************************************************************************/ -#define _RAWERR 10 // Deadband in position samples +#define _RAWERR 20 // Deadband error allowed in successive position samples uint8_t TFT_eSPI::validTouch(uint16_t *x, uint16_t *y, uint16_t threshold){ uint16_t x_tmp, y_tmp, x_tmp2, y_tmp2; - // Wait until pressure stops increasing + // Wait until pressure stops increasing to debounce pressure uint16_t z1 = 1; uint16_t z2 = 0; while (z1 > z2) @@ -120,7 +123,7 @@ uint8_t TFT_eSPI::validTouch(uint16_t *x, uint16_t *y, uint16_t threshold){ ***************************************************************************************/ #define Z_THRESHOLD 350 // Touch pressure threshold for validating touches uint8_t TFT_eSPI::getTouch(uint16_t *x, uint16_t *y, uint16_t threshold){ - uint16_t x_tmp, y_tmp, xx, yy; + uint16_t x_tmp, y_tmp; if (threshold<20) threshold = 20; if (_pressTime > millis()) threshold=20; @@ -136,6 +139,25 @@ uint8_t TFT_eSPI::getTouch(uint16_t *x, uint16_t *y, uint16_t threshold){ _pressTime = millis() + 50; + convertRawXY(&x_tmp, &y_tmp); + + if (x_tmp >= _width || y_tmp >= _height) return valid; + + _pressX = x_tmp; + _pressY = y_tmp; + *x = _pressX; + *y = _pressY; + return valid; +} + +/*************************************************************************************** +** Function name: convertRawXY +** Description: convert raw touch x,y values to screen coordinates +***************************************************************************************/ +void TFT_eSPI::convertRawXY(uint16_t *x, uint16_t *y) +{ + uint16_t x_tmp = *x, y_tmp = *y, xx, yy; + if(!touchCalibration_rotate){ xx=(x_tmp-touchCalibration_x0)*_width/touchCalibration_x1; yy=(y_tmp-touchCalibration_y0)*_height/touchCalibration_y1; @@ -151,14 +173,8 @@ uint8_t TFT_eSPI::getTouch(uint16_t *x, uint16_t *y, uint16_t threshold){ if(touchCalibration_invert_y) yy = _height - yy; } - - if (xx >= _width || yy >= _height) return valid; - - _pressX = xx; - _pressY = yy; - *x = _pressX; - *y = _pressY; - return valid; + *x = xx; + *y = yy; } /*************************************************************************************** diff --git a/Extensions/Touch.h b/Extensions/Touch.h index 7f3b22a..de4ade7 100644 --- a/Extensions/Touch.h +++ b/Extensions/Touch.h @@ -2,23 +2,32 @@ // This is part of the TFT_eSPI class and is associated with the Touch Screen handlers public: - + // Get raw x,y ADC values from touch controller uint8_t getTouchRaw(uint16_t *x, uint16_t *y); + // Get raw z (i.e. pressure) ADC value from touch controller uint16_t getTouchRawZ(void); + // Convert raw x,y values to calibrated and correctly rotated screen coordinates + void convertRawXY(uint16_t *x, uint16_t *y); + // Get the screen touch coordinates, returns true if screen has been touched + // if the touch cordinates are off screen then x and y are not updated uint8_t getTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600); + // Run screen calibration and test, report calibration values to the serial port void calibrateTouch(uint16_t *data, uint32_t color_fg, uint32_t color_bg, uint8_t size); + // Set the screen calibration values void setTouch(uint16_t *data); private: - + // Handlers for the SPI settings and clock speed change inline void spi_begin_touch() __attribute__((always_inline)); inline void spi_end_touch() __attribute__((always_inline)); - // These are associated with the Touch Screen handlers + // Private function to validate a touch, allow settle time and reduce spurious coordinates uint8_t validTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600); + // Initialise with example calibration values so processor does not crash if setTouch() not called in setup() uint16_t touchCalibration_x0 = 300, touchCalibration_x1 = 3600, touchCalibration_y0 = 300, touchCalibration_y1 = 3600; uint8_t touchCalibration_rotate = 1, touchCalibration_invert_x = 2, touchCalibration_invert_y = 0; - uint32_t _pressTime; - uint16_t _pressX, _pressY; + + uint32_t _pressTime; // Press and hold time-out + uint16_t _pressX, _pressY; // For future use (last sampled calibrated coordinates) diff --git a/Fonts/GFXFF/gfxfont.h b/Fonts/GFXFF/gfxfont.h index eae3997..cd2bccc 100644 --- a/Fonts/GFXFF/gfxfont.h +++ b/Fonts/GFXFF/gfxfont.h @@ -12,7 +12,7 @@ #ifdef LOAD_GFXFF typedef struct { // Data stored PER GLYPH - uint16_t bitmapOffset; // Pointer into GFXfont->bitmap + uint32_t bitmapOffset; // Pointer into GFXfont->bitmap uint8_t width, height; // Bitmap dimensions in pixels uint8_t xAdvance; // Distance to advance cursor (x axis) int8_t xOffset, yOffset; // Dist from cursor pos to UL corner @@ -21,7 +21,7 @@ typedef struct { // Data stored PER GLYPH typedef struct { // Data stored for FONT AS A WHOLE: uint8_t *bitmap; // Glyph bitmaps, concatenated GFXglyph *glyph; // Glyph array - uint8_t first, last; // ASCII extents + uint16_t first, last; // ASCII extents uint8_t yAdvance; // Newline distance (y axis) } GFXfont; diff --git a/README.md b/README.md index b4d3d2e..2befb58 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,33 @@ + +# News + +1. Sprites can now by pushed to the screen (or another Sprite) with a rotation angle. The new function is pushRotated(). Three new examples (Rotate_Sprite_1/2/3) have been added to show how the functions can be used to rotate text, images and to draw animated dials with moving needles. + +2. A new TFT_eFEX support library has been created which includes extra functions such as drawing a BMP or Jpeg to the screen. This library will simplify the examples. It will be expanded at a future date to include meters, dials and GUI elements like progress bars, graphs and animated buttons: +https://github.com/Bodmer/TFT_eFEX + +3. androdlang has published a really nice companion library to extend the graphics capabilities of TFT_eSPI, you can find this here: +https://github.com/androdlang/TFTShape + +4. I have created a user updateable graphics extension library template that can be used to create your own graphics extensions. The Library contains examples and is commented so it should be clear what you need to do to add functions. You can find it here: +https://github.com/Bodmer/TFT_eFX + +5. The capability to read from an ST7789V TFT with a single bidirectional SDA pin has been added. At the moment this **ONLY** works with an ESP32. It is enabled with a #define TFT_SDA_READ in the setup file. + +6. ST7789V displays are manufactured in two variants that have the red and blue pixels swapped, this is catered for by a new option in the setup file: + //#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue + //#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + # TFT_eSPI -An Arduino IDE compatible graphics and fonts library for ESP8266 and ESP32 processors with drivers for ILI9341, ILI9163, ST7735, S6D02A1, ILI9481, ILI9486, ILI9488, HX8357D and ST7789 based TFT displays that support SPI. +An Arduino IDE compatible graphics and fonts library for ESP8266 and ESP32 processors with drivers for ILI9341, ILI9163, ST7735, S6D02A1, ILI9481, ILI9486, ILI9488, HX8357D and ST7789 based TFT displays that support SPI. The library can be loaded using the Arduino IDE's Library Manager. 8 bit parallel interface TFTs (e.g. UNO format mcufriend shields) can used with an ESP32. The library supports TFT displays designed for the Raspberry Pi that are based on a ILI9486 driver chip with a 480 x 320 pixel screen. This display must be of the Waveshare design and use a 16 bit serial interface based on the 74HC04, 74HC4040 and 2 x 74HC4094 logic chips. A modification to these displays is possible (see mod image in Tools folder) to make many graphics functions much faster (e.g. 23ms to clear the screen, 1.2ms to draw a 72 pixel high numeral). +Some displays permit the internal TFT screen RAM to be read. The library supports reading from ILI9341, ST7789 and ILI9488 SPI displays for the ESP32 and ESP8266. The 8 bit parallel displays used with the ESP32 can usually can be read too. The TFT_Screen_Capture example allows full screens to be captured and sent to a PC, this is handy to create program documentation. + Support has been added recently for Waveshare 2 and 3 colour ePaper displays using full frame buffers. This addition is currently relatively immature and thus only one example has been provided. Further examples will be added soon. The library includes a "Sprite" class, this enables flicker free updates of complex graphics. Direct writes to the TFT with graphics functions are still available, so existing sketches do not need to be changed. @@ -18,17 +40,19 @@ Drawing graphics into a sprite is very fast, for those familiar with the Adafrui Sprites can be plotted to the TFT with one colour being specified as "transparent", see Transparent_Sprite_Demo example. +If an ESP32 board has SPIRAM (i.e. PSRAM) fitted then Sprites will use the PSRAM memory and large full screen buffer Sprites can be created. Full screen Sprites take longer to render (~45ms for a 320 x 240 16 bit Sprite), so bear that in mind. + The XPT2046 touch screen controller is supported. The SPI bus for the touch controller is shared with the TFT and only an additional chip select line is needed. The Button class from Adafruit_GFX is incorporated, with the enhancement that the button labels can be in any font. The library supports SPI overlap on the ESP8266 so the TFT screen can share MOSI, MISO and SCLK pins with the program FLASH, this frees up GPIO pins for other uses. -The library contains proportional fonts, different sizes can be enabled/disabled at compile time to optimise the use of FLASH memory. Anti-alased (smooth) font files in vlw format stored in SPIFFS are supported and in the case any 16 bit Unicode character can be included and rendered, this means many language specific characters can be rendered to the screen. +The library contains proportional fonts, different sizes can be enabled/disabled at compile time to optimise the use of FLASH memory. Anti-alased (smooth) font files in vlw format stored in SPIFFS are supported. Any 16 bit Unicode character can be included and rendered, this means many language specific characters can be rendered to the screen. The library is based on the Adafruit GFX and Adafruit driver libraries and the aim is to retain compatibility. Significant additions have been made to the library to boost the speed for ESP8266/ESP32 processors (it is typically 3 to 10 times faster) and to add new features. The new graphics functions include different size proportional fonts and formatting features. There are lots of example sketches to demonstrate the different features and included functions. -Configuration of the library font selections, pins used to interface with the TFT and other features is made by editting the User_Setup.h file in the library folder, or by selecting a configuration in the library "User_Setup_Selet,h" file. Fonts and features can easily be disabled by commenting out lines. +Configuration of the library font selections, pins used to interface with the TFT and other features is made by editting the User_Setup.h file in the library folder, or by selecting your own configuration in the "User_Setup_Selet,h" file. Fonts and features can easily be enabled/disabled by commenting out lines. # Anti-aliased Fonts @@ -69,6 +93,8 @@ IO32 wired to IO36 ![Example](https://i.imgur.com/pUZn6lF.jpg) +If the display board is fitted with a resistance based touch screen then this can be used by performing the modifications described here and the fork of the Adafruit library: +https://github.com/s60sc/Adafruit_TouchScreen # ePaper displays diff --git a/TFT_Drivers/ILI9341_Init.h b/TFT_Drivers/ILI9341_Init.h index 124c849..404c3b9 100644 --- a/TFT_Drivers/ILI9341_Init.h +++ b/TFT_Drivers/ILI9341_Init.h @@ -121,10 +121,4 @@ writecommand(ILI9341_DISPON); //Display on -#ifdef M5STACK - // Turn on the back-light LED - digitalWrite(TFT_BL, HIGH); - pinMode(TFT_BL, OUTPUT); -#endif - } \ No newline at end of file diff --git a/TFT_Drivers/R61581_Defines.h b/TFT_Drivers/R61581_Defines.h new file mode 100644 index 0000000..bd5fb88 --- /dev/null +++ b/TFT_Drivers/R61581_Defines.h @@ -0,0 +1,42 @@ +// Change the width and height if required (defined in portrait mode) +// or use the constructor to over-ride defaults +#define TFT_WIDTH 320 +#define TFT_HEIGHT 480 + + +// Delay between some initialisation commands +#define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked + + +// Generic commands used by TFT_eSPI.cpp +#define TFT_NOP 0x00 +#define TFT_SWRST 0x01 + +#define TFT_SLPIN 0x10 +#define TFT_SLPOUT 0x11 + +#define TFT_INVOFF 0x20 +#define TFT_INVON 0x21 + +#define TFT_DISPOFF 0x28 +#define TFT_DISPON 0x29 + +#define TFT_CASET 0x2A +#define TFT_PASET 0x2B +#define TFT_RAMWR 0x2C + +#define TFT_RAMRD 0x2E + +#define TFT_MADCTL 0x36 + +#define TFT_MAD_MY 0x80 +#define TFT_MAD_MX 0x40 +#define TFT_MAD_MV 0x20 +#define TFT_MAD_ML 0x10 +#define TFT_MAD_RGB 0x00 +#define TFT_MAD_BGR 0x08 +#define TFT_MAD_MH 0x04 +#define TFT_MAD_SS 0x02 +#define TFT_MAD_GS 0x01 + +#define TFT_IDXRD 0x00 // ILI9341 only, indexed control register read diff --git a/TFT_Drivers/R61581_Init.h b/TFT_Drivers/R61581_Init.h new file mode 100644 index 0000000..929d680 --- /dev/null +++ b/TFT_Drivers/R61581_Init.h @@ -0,0 +1,80 @@ + +// This is the command sequence that initialises the R61581 driver +// +// This setup information uses simple 8 bit SPI writecommand() and writedata() functions +// +// See ST7735_Setup.h file for an alternative format + + +// Configure R61581 display + + writecommand(TFT_SLPOUT); + delay(20); + + writecommand(0xB0); + writedata(0x00); + + writecommand(0xD0); + writedata(0x07); + writedata(0x42); + writedata(0x18); + + writecommand(0xD1); + writedata(0x00); + writedata(0x07); + writedata(0x10); + + writecommand(0xD2); + writedata(0x01); + writedata(0x02); + + writecommand(0xC0); + writedata(0x12); + writedata(0x3B); + writedata(0x00); + writedata(0x02); + writedata(0x11); + + writecommand(0xC5); + writedata(0x03); + + writecommand(0xC8); + writedata(0x00); + writedata(0x32); + writedata(0x36); + writedata(0x45); + writedata(0x06); + writedata(0x16); + writedata(0x37); + writedata(0x75); + writedata(0x77); + writedata(0x54); + writedata(0x0C); + writedata(0x00); + + writecommand(TFT_MADCTL); + writedata(0x0A); + + writecommand(0x3A); + writedata(0x55); + + writecommand(TFT_CASET); + writedata(0x00); + writedata(0x00); + writedata(0x01); + writedata(0x3F); + + writecommand(TFT_PASET); + writedata(0x00); + writedata(0x00); + writedata(0x01); + writedata(0xDF); + + delay(120); + writecommand(TFT_DISPON); + + delay(25); +// End of R61581 display configuration + + + diff --git a/TFT_Drivers/R61581_Rotation.h b/TFT_Drivers/R61581_Rotation.h new file mode 100644 index 0000000..4d7dc61 --- /dev/null +++ b/TFT_Drivers/R61581_Rotation.h @@ -0,0 +1,27 @@ + // This is the command sequence that rotates the R61581 driver coordinate frame + + writecommand(TFT_MADCTL); + rotation = m % 4; + switch (rotation) { + case 0: // Portrait + writedata(TFT_MAD_BGR | TFT_MAD_MX); + _width = TFT_WIDTH; + _height = TFT_HEIGHT; + break; + case 1: // Landscape (Portrait + 90) + writedata(TFT_MAD_MV | TFT_MAD_BGR); + _width = TFT_HEIGHT; + _height = TFT_WIDTH; + break; + case 2: // Inverter portrait + writedata(TFT_MAD_BGR | TFT_MAD_GS); + _width = TFT_WIDTH; + _height = TFT_HEIGHT; + break; + case 3: // Inverted landscape + writedata(TFT_MAD_MV | TFT_MAD_BGR | TFT_MAD_MX | TFT_MAD_GS); + _width = TFT_HEIGHT; + _height = TFT_WIDTH; + break; + } + \ No newline at end of file diff --git a/TFT_Drivers/ST7735_Defines.h b/TFT_Drivers/ST7735_Defines.h index 5fe2662..494c673 100644 --- a/TFT_Drivers/ST7735_Defines.h +++ b/TFT_Drivers/ST7735_Defines.h @@ -9,13 +9,15 @@ // Enumerate the different configurations -#define INITR_GREENTAB 0x0 -#define INITR_REDTAB 0x1 -#define INITR_BLACKTAB 0x2 -#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display -#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen -#define INITR_GREENTAB128 0x5 // Use if you only get part of 128x128 screen in rotation 0 & 1 -#define INITB 0xB +#define INITR_GREENTAB 0x0 +#define INITR_REDTAB 0x1 +#define INITR_BLACKTAB 0x2 // Display with no offsets +#define INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of green tab display +#define INITR_GREENTAB3 0x4 // Use if you get random pixels on edge(s) of 128x128 screen +#define INITR_GREENTAB128 0x5 // Use if you only get part of 128x128 screen in rotation 0 & 1 +#define INITR_GREENTAB160x80 0x6 // Use if you only get part of 128x128 screen in rotation 0 & 1 +#define INITR_REDTAB160x80 0x7 // Added for https://www.aliexpress.com/item/ShengYang-1pcs-IPS-0-96-inch-7P-SPI-HD-65K-Full-Color-OLED-Module-ST7735-Drive/32918394604.html +#define INITB 0xB // Setup the tab color that will be used by the library setRotation() and setup command list @@ -38,6 +40,14 @@ #define TAB_COLOUR INITR_GREENTAB128 #define CGRAM_OFFSET +#elif defined (ST7735_GREENTAB160x80) + #define TAB_COLOUR INITR_GREENTAB160x80 + #define CGRAM_OFFSET + +#elif defined (ST7735_REDTAB160x80) + #define TAB_COLOUR INITR_REDTAB160x80 + #define CGRAM_OFFSET + #elif defined (ST7735_REDTAB) #define TAB_COLOUR INITR_REDTAB diff --git a/TFT_Drivers/ST7735_Init.h b/TFT_Drivers/ST7735_Init.h index 0df152c..a528785 100644 --- a/TFT_Drivers/ST7735_Init.h +++ b/TFT_Drivers/ST7735_Init.h @@ -173,6 +173,19 @@ colstart = 0; rowstart = 32; } + else if (tabcolor == INITR_GREENTAB160x80) + { + commandList(Rcmd2green); + writecommand(TFT_INVON); + colstart = 26; + rowstart = 1; + } + else if (tabcolor == INITR_REDTAB160x80) + { + commandList(Rcmd2green); + colstart = 24; + rowstart = 0; + } else if (tabcolor == INITR_REDTAB) { commandList(Rcmd2red); diff --git a/TFT_Drivers/ST7735_Rotation.h b/TFT_Drivers/ST7735_Rotation.h index b9476a1..6163abb 100644 --- a/TFT_Drivers/ST7735_Rotation.h +++ b/TFT_Drivers/ST7735_Rotation.h @@ -20,6 +20,14 @@ writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR); colstart = 0; rowstart = 32; + } else if(tabcolor == INITR_GREENTAB160x80) { + writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR); + colstart = 26; + rowstart = 1; + } else if(tabcolor == INITR_REDTAB160x80) { + writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MH | TFT_MAD_BGR); + colstart = 24; + rowstart = 0; } else if(tabcolor == INITB) { writedata(TFT_MAD_MX | TFT_MAD_RGB); } else { @@ -43,6 +51,14 @@ writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR); colstart = 32; rowstart = 0; + } else if(tabcolor == INITR_GREENTAB160x80) { + writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR); + colstart = 1; + rowstart = 26; + } else if(tabcolor == INITR_REDTAB160x80) { + writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR); + colstart = 0; + rowstart = 24; } else if(tabcolor == INITB) { writedata(TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_RGB); } else { @@ -66,6 +82,14 @@ writedata(TFT_MAD_BGR); colstart = 0; rowstart = 0; + } else if(tabcolor == INITR_GREENTAB160x80) { + writedata(TFT_MAD_BGR); + colstart = 0; + rowstart = 0; + } else if(tabcolor == INITR_REDTAB160x80) { + writedata(TFT_MAD_BGR); + colstart = 24; + rowstart = 0; } else if(tabcolor == INITB) { writedata(TFT_MAD_MY | TFT_MAD_RGB); } else { @@ -89,6 +113,14 @@ writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR); colstart = 0; rowstart = 0; + } else if(tabcolor == INITR_GREENTAB160x80) { + writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR); + colstart = 1; + rowstart = 26; + } else if(tabcolor == INITR_REDTAB160x80) { + writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR); + colstart = 0; + rowstart = 24; } else if(tabcolor == INITB) { writedata(TFT_MAD_MV | TFT_MAD_RGB); } else { diff --git a/TFT_Drivers/ST7789_2_Defines.h b/TFT_Drivers/ST7789_2_Defines.h new file mode 100644 index 0000000..b777b69 --- /dev/null +++ b/TFT_Drivers/ST7789_2_Defines.h @@ -0,0 +1,143 @@ +// Change the width and height if required (defined in portrait mode) +// or use the constructor to over-ride defaults +#ifndef TFT_WIDTH + #define TFT_WIDTH 240 +#endif +#ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 +#endif + +#if (TFT_HEIGHT == 240) && (TFT_WIDTH == 240) + #define CGRAM_OFFSET +#endif + +// Delay between some initialisation commands +#define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked + + +// Generic commands used by TFT_eSPI.cpp +#define TFT_NOP 0x00 +#define TFT_SWRST 0x01 + +#define TFT_SLPIN 0x10 +#define TFT_SLPOUT 0x11 +#define TFT_NORON 0x13 + +#define TFT_INVOFF 0x20 +#define TFT_INVON 0x21 +#define TFT_DISPOFF 0x28 +#define TFT_DISPON 0x29 +#define TFT_CASET 0x2A +#define TFT_PASET 0x2B +#define TFT_RAMWR 0x2C +#define TFT_RAMRD 0x2E +#define TFT_MADCTL 0x36 +#define TFT_COLMOD 0x3A + +// Flags for TFT_MADCTL +#define TFT_MAD_MY 0x80 +#define TFT_MAD_MX 0x40 +#define TFT_MAD_MV 0x20 +#define TFT_MAD_ML 0x10 +#define TFT_MAD_RGB 0x00 +#define TFT_MAD_BGR 0x08 +#define TFT_MAD_MH 0x04 +#define TFT_MAD_SS 0x02 +#define TFT_MAD_GS 0x01 + +#ifdef TFT_RGB_ORDER + #if (TFT_RGB_ORDER == 1) + #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB + #else + #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR + #endif +#else + #ifdef CGRAM_OFFSET + #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR + #else + #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB + #endif +#endif + +#define TFT_IDXRD 0x00 // ILI9341 only, indexed control register read + +#define ST_CMD_DELAY 0x80 // special signifier for command lists +#define ST7789_240x240_XSTART 0 +#define ST7789_240x240_YSTART 0 + +// ST7789 specific commands used in init +#define ST7789_NOP 0x00 +#define ST7789_SWRESET 0x01 +#define ST7789_RDDID 0x04 +#define ST7789_RDDST 0x09 + +#define ST7789_RDDPM 0x0A // Read display power mode +#define ST7789_RDD_MADCTL 0x0B // Read display MADCTL +#define ST7789_RDD_COLMOD 0x0C // Read display pixel format +#define ST7789_RDDIM 0x0D // Read display image mode +#define ST7789_RDDSM 0x0E // Read display signal mode +#define ST7789_RDDSR 0x0F // Read display self-diagnostic result (ST7789V) + +#define ST7789_SLPIN 0x10 +#define ST7789_SLPOUT 0x11 +#define ST7789_PTLON 0x12 +#define ST7789_NORON 0x13 + +#define ST7789_INVOFF 0x20 +#define ST7789_INVON 0x21 +#define ST7789_GAMSET 0x26 // Gamma set +#define ST7789_DISPOFF 0x28 +#define ST7789_DISPON 0x29 +#define ST7789_CASET 0x2A +#define ST7789_RASET 0x2B +#define ST7789_RAMWR 0x2C +#define ST7789_RGBSET 0x2D // Color setting for 4096, 64K and 262K colors +#define ST7789_RAMRD 0x2E + +#define ST7789_PTLAR 0x30 +#define ST7789_VSCRDEF 0x33 // Vertical scrolling definition (ST7789V) +#define ST7789_TEOFF 0x34 // Tearing effect line off +#define ST7789_TEON 0x35 // Tearing effect line on +#define ST7789_MADCTL 0x36 // Memory data access control +#define ST7789_IDMOFF 0x38 // Idle mode off +#define ST7789_IDMON 0x39 // Idle mode on +#define ST7789_RAMWRC 0x3C // Memory write continue (ST7789V) +#define ST7789_RAMRDC 0x3E // Memory read continue (ST7789V) +#define ST7789_COLMOD 0x3A + +#define ST7789_RAMCTRL 0xB0 // RAM control +#define ST7789_RGBCTRL 0xB1 // RGB control +#define ST7789_PORCTRL 0xB2 // Porch control +#define ST7789_FRCTRL1 0xB3 // Frame rate control +#define ST7789_PARCTRL 0xB5 // Partial mode control +#define ST7789_GCTRL 0xB7 // Gate control +#define ST7789_GTADJ 0xB8 // Gate on timing adjustment +#define ST7789_DGMEN 0xBA // Digital gamma enable +#define ST7789_VCOMS 0xBB // VCOMS setting +#define ST7789_LCMCTRL 0xC0 // LCM control +#define ST7789_IDSET 0xC1 // ID setting +#define ST7789_VDVVRHEN 0xC2 // VDV and VRH command enable +#define ST7789_VRHS 0xC3 // VRH set +#define ST7789_VDVSET 0xC4 // VDV setting +#define ST7789_VCMOFSET 0xC5 // VCOMS offset set +#define ST7789_FRCTR2 0xC6 // FR Control 2 +#define ST7789_CABCCTRL 0xC7 // CABC control +#define ST7789_REGSEL1 0xC8 // Register value section 1 +#define ST7789_REGSEL2 0xCA // Register value section 2 +#define ST7789_PWMFRSEL 0xCC // PWM frequency selection +#define ST7789_PWCTRL1 0xD0 // Power control 1 +#define ST7789_VAPVANEN 0xD2 // Enable VAP/VAN signal output +#define ST7789_CMD2EN 0xDF // Command 2 enable +#define ST7789_PVGAMCTRL 0xE0 // Positive voltage gamma control +#define ST7789_NVGAMCTRL 0xE1 // Negative voltage gamma control +#define ST7789_DGMLUTR 0xE2 // Digital gamma look-up table for red +#define ST7789_DGMLUTB 0xE3 // Digital gamma look-up table for blue +#define ST7789_GATECTRL 0xE4 // Gate control +#define ST7789_SPI2EN 0xE7 // SPI2 enable +#define ST7789_PWCTRL2 0xE8 // Power control 2 +#define ST7789_EQCTRL 0xE9 // Equalize time control +#define ST7789_PROMCTRL 0xEC // Program control +#define ST7789_PROMEN 0xFA // Program mode enable +#define ST7789_NVMSET 0xFC // NVM setting +#define ST7789_PROMACT 0xFE // Program action + diff --git a/TFT_Drivers/ST7789_2_Init.h b/TFT_Drivers/ST7789_2_Init.h new file mode 100644 index 0000000..3cd9630 --- /dev/null +++ b/TFT_Drivers/ST7789_2_Init.h @@ -0,0 +1,22 @@ + +// This is the command sequence that initialises the ST7789 driver + +// Configure ST7789 display + +{ +static const uint8_t PROGMEM + st7789[] = { + 8, + TFT_SLPOUT, TFT_INIT_DELAY, 255, + TFT_COLMOD, 1+TFT_INIT_DELAY, 0x55, 10, + TFT_MADCTL, 1, 0x00, + TFT_CASET, 4, 0x00, 0x00, 0x00, 0xF0, + TFT_PASET, 4, 0x00, 0x00, 0x00, 0xF0, + TFT_INVON, TFT_INIT_DELAY, 10, + TFT_NORON, TFT_INIT_DELAY, 10, + TFT_DISPON, TFT_INIT_DELAY, 255 + }; + + commandList(st7789); +} +// End of ST7789 display configuration \ No newline at end of file diff --git a/TFT_Drivers/ST7789_2_Rotation.h b/TFT_Drivers/ST7789_2_Rotation.h new file mode 100644 index 0000000..d25cc0c --- /dev/null +++ b/TFT_Drivers/ST7789_2_Rotation.h @@ -0,0 +1,48 @@ + // This is the command sequence that rotates the ST7789 driver coordinate frame + + writecommand(TFT_MADCTL); + rotation = m % 4; + switch (rotation) { + case 0: // Portrait +#ifdef CGRAM_OFFSET + colstart = 0; + rowstart = 0; +#endif + writedata(TFT_MAD_COLOR_ORDER); + + _width = _init_width; + _height = _init_height; + break; + + case 1: // Landscape (Portrait + 90) +#ifdef CGRAM_OFFSET + colstart = 0; + rowstart = 0; +#endif + writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_COLOR_ORDER); + + _width = _init_height; + _height = _init_width; + break; + + case 2: // Inverter portrait +#ifdef CGRAM_OFFSET + colstart = 0; + rowstart = 80; +#endif + writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_COLOR_ORDER); + + _width = _init_width; + _height = _init_height; + break; + case 3: // Inverted landscape +#ifdef CGRAM_OFFSET + colstart = 80; + rowstart = 0; +#endif + writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_COLOR_ORDER); + + _width = _init_height; + _height = _init_width; + break; + } diff --git a/TFT_Drivers/ST7789_Defines.h b/TFT_Drivers/ST7789_Defines.h index 99d35db..2695336 100644 --- a/TFT_Drivers/ST7789_Defines.h +++ b/TFT_Drivers/ST7789_Defines.h @@ -1,9 +1,15 @@ // Change the width and height if required (defined in portrait mode) // or use the constructor to over-ride defaults -#define TFT_WIDTH 240 -#define TFT_HEIGHT 240 +#ifndef TFT_WIDTH + #define TFT_WIDTH 240 +#endif +#ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 +#endif -#define CGRAM_OFFSET +#if (TFT_HEIGHT == 240) && (TFT_WIDTH == 240) + #define CGRAM_OFFSET +#endif // Delay between some initialisation commands #define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked @@ -15,25 +21,20 @@ #define TFT_SLPIN 0x10 #define TFT_SLPOUT 0x11 - #define TFT_NORON 0x13 #define TFT_INVOFF 0x20 #define TFT_INVON 0x21 - #define TFT_DISPOFF 0x28 #define TFT_DISPON 0x29 - #define TFT_CASET 0x2A #define TFT_PASET 0x2B #define TFT_RAMWR 0x2C - #define TFT_RAMRD 0x2E - #define TFT_MADCTL 0x36 - #define TFT_COLMOD 0x3A +// Flags for TFT_MADCTL #define TFT_MAD_MY 0x80 #define TFT_MAD_MX 0x40 #define TFT_MAD_MV 0x20 @@ -44,6 +45,95 @@ #define TFT_MAD_SS 0x02 #define TFT_MAD_GS 0x01 +#ifdef TFT_RGB_ORDER + #if (TFT_RGB_ORDER == 1) + #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB + #else + #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR + #endif +#else + #ifdef CGRAM_OFFSET + #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR + #else + #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB + #endif +#endif + #define TFT_IDXRD 0x00 // ILI9341 only, indexed control register read +// ST7789 specific commands used in init +#define ST7789_NOP 0x00 +#define ST7789_SWRESET 0x01 +#define ST7789_RDDID 0x04 +#define ST7789_RDDST 0x09 + +#define ST7789_RDDPM 0x0A // Read display power mode +#define ST7789_RDD_MADCTL 0x0B // Read display MADCTL +#define ST7789_RDD_COLMOD 0x0C // Read display pixel format +#define ST7789_RDDIM 0x0D // Read display image mode +#define ST7789_RDDSM 0x0E // Read display signal mode +#define ST7789_RDDSR 0x0F // Read display self-diagnostic result (ST7789V) + +#define ST7789_SLPIN 0x10 +#define ST7789_SLPOUT 0x11 +#define ST7789_PTLON 0x12 +#define ST7789_NORON 0x13 + +#define ST7789_INVOFF 0x20 +#define ST7789_INVON 0x21 +#define ST7789_GAMSET 0x26 // Gamma set +#define ST7789_DISPOFF 0x28 +#define ST7789_DISPON 0x29 +#define ST7789_CASET 0x2A +#define ST7789_RASET 0x2B +#define ST7789_RAMWR 0x2C +#define ST7789_RGBSET 0x2D // Color setting for 4096, 64K and 262K colors +#define ST7789_RAMRD 0x2E + +#define ST7789_PTLAR 0x30 +#define ST7789_VSCRDEF 0x33 // Vertical scrolling definition (ST7789V) +#define ST7789_TEOFF 0x34 // Tearing effect line off +#define ST7789_TEON 0x35 // Tearing effect line on +#define ST7789_MADCTL 0x36 // Memory data access control +#define ST7789_IDMOFF 0x38 // Idle mode off +#define ST7789_IDMON 0x39 // Idle mode on +#define ST7789_RAMWRC 0x3C // Memory write continue (ST7789V) +#define ST7789_RAMRDC 0x3E // Memory read continue (ST7789V) +#define ST7789_COLMOD 0x3A + +#define ST7789_RAMCTRL 0xB0 // RAM control +#define ST7789_RGBCTRL 0xB1 // RGB control +#define ST7789_PORCTRL 0xB2 // Porch control +#define ST7789_FRCTRL1 0xB3 // Frame rate control +#define ST7789_PARCTRL 0xB5 // Partial mode control +#define ST7789_GCTRL 0xB7 // Gate control +#define ST7789_GTADJ 0xB8 // Gate on timing adjustment +#define ST7789_DGMEN 0xBA // Digital gamma enable +#define ST7789_VCOMS 0xBB // VCOMS setting +#define ST7789_LCMCTRL 0xC0 // LCM control +#define ST7789_IDSET 0xC1 // ID setting +#define ST7789_VDVVRHEN 0xC2 // VDV and VRH command enable +#define ST7789_VRHS 0xC3 // VRH set +#define ST7789_VDVSET 0xC4 // VDV setting +#define ST7789_VCMOFSET 0xC5 // VCOMS offset set +#define ST7789_FRCTR2 0xC6 // FR Control 2 +#define ST7789_CABCCTRL 0xC7 // CABC control +#define ST7789_REGSEL1 0xC8 // Register value section 1 +#define ST7789_REGSEL2 0xCA // Register value section 2 +#define ST7789_PWMFRSEL 0xCC // PWM frequency selection +#define ST7789_PWCTRL1 0xD0 // Power control 1 +#define ST7789_VAPVANEN 0xD2 // Enable VAP/VAN signal output +#define ST7789_CMD2EN 0xDF // Command 2 enable +#define ST7789_PVGAMCTRL 0xE0 // Positive voltage gamma control +#define ST7789_NVGAMCTRL 0xE1 // Negative voltage gamma control +#define ST7789_DGMLUTR 0xE2 // Digital gamma look-up table for red +#define ST7789_DGMLUTB 0xE3 // Digital gamma look-up table for blue +#define ST7789_GATECTRL 0xE4 // Gate control +#define ST7789_SPI2EN 0xE7 // SPI2 enable +#define ST7789_PWCTRL2 0xE8 // Power control 2 +#define ST7789_EQCTRL 0xE9 // Equalize time control +#define ST7789_PROMCTRL 0xEC // Program control +#define ST7789_PROMEN 0xFA // Program mode enable +#define ST7789_NVMSET 0xFC // NVM setting +#define ST7789_PROMACT 0xFE // Program action diff --git a/TFT_Drivers/ST7789_Init.h b/TFT_Drivers/ST7789_Init.h index d5ba408..d6b0b11 100644 --- a/TFT_Drivers/ST7789_Init.h +++ b/TFT_Drivers/ST7789_Init.h @@ -1,24 +1,124 @@ // This is the command sequence that initialises the ST7789 driver - -// Configure ST7789 display +// +// This setup information uses simple 8 bit SPI writecommand() and writedata() functions +// +// See ST7735_Setup.h file for an alternative format { -static const uint8_t PROGMEM - st7789[] = { - 9, - TFT_SWRST, TFT_INIT_DELAY, 150, - TFT_SLPOUT, TFT_INIT_DELAY, 255, - TFT_COLMOD, 1+TFT_INIT_DELAY, 0x55, 10, - TFT_MADCTL, 1, TFT_MAD_RGB, - TFT_CASET, 4, 0x00, 0x00, 0x00, 0xF0, - TFT_PASET, 4, 0x00, 0x00, 0x00, 0xF0, - TFT_INVON, TFT_INIT_DELAY, 10, - TFT_NORON, TFT_INIT_DELAY, 10, - TFT_DISPON, TFT_INIT_DELAY, 255 - }; + writecommand(ST7789_SLPOUT); // Sleep out + delay(120); - commandList(st7789); + writecommand(ST7789_NORON); // Normal display mode on + + //------------------------------display and color format setting--------------------------------// + writecommand(ST7789_MADCTL); + //writedata(0x00); + writedata(TFT_MAD_COLOR_ORDER); + + // JLX240 display datasheet + writecommand(0xB6); + writedata(0x0A); + writedata(0x82); + + writecommand(ST7789_COLMOD); + writedata(0x55); + delay(10); + + //--------------------------------ST7789V Frame rate setting----------------------------------// + writecommand(ST7789_PORCTRL); + writedata(0x0c); + writedata(0x0c); + writedata(0x00); + writedata(0x33); + writedata(0x33); + + writecommand(ST7789_GCTRL); // Voltages: VGH / VGL + writedata(0x35); + + //---------------------------------ST7789V Power setting--------------------------------------// + writecommand(ST7789_VCOMS); + writedata(0x28); // JLX240 display datasheet + + writecommand(ST7789_LCMCTRL); + writedata(0x0C); + + writecommand(ST7789_VDVVRHEN); + writedata(0x01); + writedata(0xFF); + + writecommand(ST7789_VRHS); // voltage VRHS + writedata(0x10); + + writecommand(ST7789_VDVSET); + writedata(0x20); + + writecommand(ST7789_FRCTR2); + writedata(0x0f); + + writecommand(ST7789_PWCTRL1); + writedata(0xa4); + writedata(0xa1); + + //--------------------------------ST7789V gamma setting---------------------------------------// + writecommand(ST7789_PVGAMCTRL); + writedata(0xd0); + writedata(0x00); + writedata(0x02); + writedata(0x07); + writedata(0x0a); + writedata(0x28); + writedata(0x32); + writedata(0x44); + writedata(0x42); + writedata(0x06); + writedata(0x0e); + writedata(0x12); + writedata(0x14); + writedata(0x17); + + writecommand(ST7789_NVGAMCTRL); + writedata(0xd0); + writedata(0x00); + writedata(0x02); + writedata(0x07); + writedata(0x0a); + writedata(0x28); + writedata(0x31); + writedata(0x54); + writedata(0x47); + writedata(0x0e); + writedata(0x1c); + writedata(0x17); + writedata(0x1b); + writedata(0x1e); + + writecommand(ST7789_INVON); + + writecommand(ST7789_CASET); // Column address set + writedata(0x00); + writedata(0x00); + writedata(0x00); + writedata(0xE5); // 239 + + writecommand(ST7789_RASET); // Row address set + writedata(0x00); + writedata(0x00); + writedata(0x01); + writedata(0x3F); // 319 + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + spi_end(); + delay(120); + spi_begin(); + + writecommand(ST7789_DISPON); //Display on + delay(120); + +#ifdef TFT_BL + // Turn on the back-light LED + digitalWrite(TFT_BL, HIGH); + pinMode(TFT_BL, OUTPUT); +#endif } -// End of ST7789 display configuration - diff --git a/TFT_Drivers/ST7789_Rotation.h b/TFT_Drivers/ST7789_Rotation.h index 34ba394..d490279 100644 --- a/TFT_Drivers/ST7789_Rotation.h +++ b/TFT_Drivers/ST7789_Rotation.h @@ -3,32 +3,46 @@ writecommand(TFT_MADCTL); rotation = m % 4; switch (rotation) { - case 0: // Portrait - writedata(TFT_MAD_RGB); + case 0: // Portrait +#ifdef CGRAM_OFFSET + colstart = 0; + rowstart = 0; +#endif + writedata(TFT_MAD_COLOR_ORDER); + _width = _init_width; _height = _init_height; - colstart = 0; - rowstart = 0; - break; - case 1: // Landscape (Portrait + 90) - writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_RGB); + break; + + case 1: // Landscape (Portrait + 90) +#ifdef CGRAM_OFFSET + colstart = 0; + rowstart = 0; +#endif + writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_COLOR_ORDER); + _width = _init_height; _height = _init_width; - colstart = 0; - rowstart = 0; - break; - case 2: // Inverter portrait - writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_RGB); - _width = _init_width; - _height = _init_height; + break; + + case 2: // Inverter portrait +#ifdef CGRAM_OFFSET colstart = 0; rowstart = 80; - break; - case 3: // Inverted landscape - writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_RGB); +#endif + writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_COLOR_ORDER); + + _width = _init_width; + _height = _init_height; + break; + case 3: // Inverted landscape +#ifdef CGRAM_OFFSET + colstart = 80; + rowstart = 0; +#endif + writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_COLOR_ORDER); + _width = _init_height; _height = _init_width; - colstart = 80; - rowstart = 0; - break; + break; } diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index d19d0c6..bb3bfb8 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -13,12 +13,19 @@ Bodmer: Added RPi 16 bit display support ****************************************************/ + #include "TFT_eSPI.h" -#include - -#ifndef ESP32_PARALLEL - #include +#if defined (ESP32) + #if !defined (ESP32_PARALLEL) + #ifdef USE_HSPI_PORT + SPIClass spi = SPIClass(HSPI); + #else // use default VSPI port + SPIClass& spi = SPI; + #endif + #endif +#else // ESP8266 + SPIClass& spi = SPI; #endif // SUPPORT_TRANSACTIONS is mandatory for ESP32 so the hal mutex is toggled @@ -42,57 +49,85 @@ uint8_t readByte(void); // GPIO parallel input/output control void busDir(uint32_t mask, uint8_t mode); -// If the SPI library has transaction support, these functions -// establish settings and protect from interference from other -// libraries. Otherwise, they simply do nothing. - inline void TFT_eSPI::spi_begin(void){ #if defined (SPI_HAS_TRANSACTION) && defined (SUPPORT_TRANSACTIONS) && !defined(ESP32_PARALLEL) - if (locked) {locked = false; SPI.beginTransaction(SPISettings(SPI_FREQUENCY, MSBFIRST, TFT_SPI_MODE));} + if (locked) {locked = false; spi.beginTransaction(SPISettings(SPI_FREQUENCY, MSBFIRST, TFT_SPI_MODE)); CS_L;} +#else + CS_L; +#endif +#ifdef ESP8266 + SPI1U = SPI1U_WRITE; #endif } inline void TFT_eSPI::spi_end(void){ #if defined (SPI_HAS_TRANSACTION) && defined (SUPPORT_TRANSACTIONS) && !defined(ESP32_PARALLEL) - if(!inTransaction) {if (!locked) {locked = true; SPI.endTransaction();}} + if(!inTransaction) {if (!locked) {locked = true; CS_H; spi.endTransaction();}} + #ifdef ESP8266 + SPI1U = SPI1U_READ; + #endif +#else + if(!inTransaction) CS_H; #endif } inline void TFT_eSPI::spi_begin_read(void){ #if defined (SPI_HAS_TRANSACTION) && defined (SUPPORT_TRANSACTIONS) && !defined(ESP32_PARALLEL) - if (locked) {locked = false; SPI.beginTransaction(SPISettings(SPI_READ_FREQUENCY, MSBFIRST, TFT_SPI_MODE));} + if (locked) {locked = false; spi.beginTransaction(SPISettings(SPI_READ_FREQUENCY, MSBFIRST, TFT_SPI_MODE)); CS_L;} #else #if !defined(ESP32_PARALLEL) - SPI.setFrequency(SPI_READ_FREQUENCY); + spi.setFrequency(SPI_READ_FREQUENCY); #endif + CS_L; +#endif +#ifdef ESP8266 + SPI1U = SPI1U_READ; #endif } inline void TFT_eSPI::spi_end_read(void){ #if defined (SPI_HAS_TRANSACTION) && defined (SUPPORT_TRANSACTIONS) && !defined(ESP32_PARALLEL) - if(!inTransaction) {if (!locked) {locked = true; SPI.endTransaction();}} + if(!inTransaction) {if (!locked) {locked = true; CS_H; spi.endTransaction();}} #else #if !defined(ESP32_PARALLEL) - SPI.setFrequency(SPI_FREQUENCY); + spi.setFrequency(SPI_FREQUENCY); #endif + if(!inTransaction) CS_H; +#endif +#ifdef ESP8266 + SPI1U = SPI1U_WRITE; #endif } #if defined (TOUCH_CS) && defined (SPI_TOUCH_FREQUENCY) // && !defined(ESP32_PARALLEL) inline void TFT_eSPI::spi_begin_touch(void){ + CS_H; // Just in case it has been left low + #if defined (SPI_HAS_TRANSACTION) && defined (SUPPORT_TRANSACTIONS) - if (locked) {locked = false; SPI.beginTransaction(SPISettings(SPI_TOUCH_FREQUENCY, MSBFIRST, SPI_MODE0));} + if (locked) {locked = false; spi.beginTransaction(SPISettings(SPI_TOUCH_FREQUENCY, MSBFIRST, SPI_MODE0));} #else - SPI.setFrequency(SPI_TOUCH_FREQUENCY); + spi.setFrequency(SPI_TOUCH_FREQUENCY); #endif + + #ifdef ESP8266 + SPI1U = SPI1U_READ; + #endif + + T_CS_L; } inline void TFT_eSPI::spi_end_touch(void){ + T_CS_H; + #if defined (SPI_HAS_TRANSACTION) && defined (SUPPORT_TRANSACTIONS) - if(!inTransaction) {if (!locked) {locked = true; SPI.endTransaction();}} + if(!inTransaction) {if (!locked) {locked = true; spi.endTransaction();}} #else - SPI.setFrequency(SPI_FREQUENCY); + spi.setFrequency(SPI_FREQUENCY); + #endif + + #ifdef ESP8266 + SPI1U = SPI1U_WRITE; #endif } @@ -139,7 +174,7 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h) #ifdef ESP32_PARALLEL // Create a bit set lookup table for data bus - wastes 1kbyte of RAM but speeds things up dramatically - for (int c = 0; c<256; c++) + for (int32_t c = 0; c<256; c++) { xset_mask[c] = 0; if ( c & 0x01 ) xset_mask[c] |= (1 << TFT_D0); @@ -172,6 +207,7 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h) textcolor = bitmap_fg = 0xFFFF; // White textbgcolor = bitmap_bg = 0x0000; // Black padX = 0; // No padding + isDigits = false; // No bounding box adjustment textwrapX = true; // Wrap text at end of line when using print stream textwrapY = false; // Wrap text at bottom of screen when using print stream textdatum = TL_DATUM; // Top Left text alignment is default @@ -182,11 +218,21 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h) locked = true; // ESP32 transaction mutex lock flags inTransaction = false; - _booted = true; + _booted = true; + _cp437 = true; + _utf8 = true; addr_row = 0xFFFF; addr_col = 0xFFFF; + _xpivot = 0; + _ypivot = 0; + + cspinmask = 0; + dcpinmask = 0; + wrpinmask = 0; + sclkpinmask = 0; + #ifdef LOAD_GLCD fontsloaded = 0x0002; // Bit 1 set #endif @@ -240,32 +286,37 @@ void TFT_eSPI::init(uint8_t tc) if (_booted) { #if !defined (ESP32) - #ifdef TFT_CS + #if defined (TFT_CS) && (TFT_CS >= 0) cspinmask = (uint32_t) digitalPinToBitMask(TFT_CS); #endif - #ifdef TFT_DC + #if defined (TFT_DC) && (TFT_DC >= 0) dcpinmask = (uint32_t) digitalPinToBitMask(TFT_DC); #endif - #ifdef TFT_WR + #if defined (TFT_WR) && (TFT_WR >= 0) wrpinmask = (uint32_t) digitalPinToBitMask(TFT_WR); #endif + #if defined (TFT_SCLK) && (TFT_SCLK >= 0) + sclkpinmask = (uint32_t) digitalPinToBitMask(TFT_SCLK); + #endif + #ifdef TFT_SPI_OVERLAP // Overlap mode SD0=MISO, SD1=MOSI, CLK=SCLK must use D3 as CS // pins(int8_t sck, int8_t miso, int8_t mosi, int8_t ss); - //SPI.pins( 6, 7, 8, 0); - SPI.pins(6, 7, 8, 0); + //spi.pins( 6, 7, 8, 0); + spi.pins(6, 7, 8, 0); #endif - SPI.begin(); // This will set HMISO to input + spi.begin(); // This will set HMISO to input + #else #if !defined(ESP32_PARALLEL) #if defined (TFT_MOSI) && !defined (TFT_SPI_OVERLAP) - SPI.begin(TFT_SCLK, TFT_MISO, TFT_MOSI, -1); + spi.begin(TFT_SCLK, TFT_MISO, TFT_MOSI, -1); #else - SPI.begin(); + spi.begin(); #endif #endif #endif @@ -276,9 +327,9 @@ void TFT_eSPI::init(uint8_t tc) // SUPPORT_TRANSACTIONS is mandatory for ESP32 so the hal mutex is toggled // so the code here is for ESP8266 only #if !defined (SUPPORT_TRANSACTIONS) && defined (ESP8266) - SPI.setBitOrder(MSBFIRST); - SPI.setDataMode(TFT_SPI_MODE); - SPI.setFrequency(SPI_FREQUENCY); + spi.setBitOrder(MSBFIRST); + spi.setDataMode(TFT_SPI_MODE); + spi.setFrequency(SPI_FREQUENCY); #endif #if defined(ESP32_PARALLEL) @@ -290,10 +341,10 @@ void TFT_eSPI::init(uint8_t tc) digitalWrite(TFT_CS, HIGH); // Chip select high (inactive) pinMode(TFT_CS, OUTPUT); #else - SPI.setHwCs(1); // Use hardware SS toggling + spi.setHwCs(1); // Use hardware SS toggling #endif #endif - + // Set to output once again in case D6 (MISO) is used for DC #ifdef TFT_DC digitalWrite(TFT_DC, HIGH); // Data/Command high = data mode @@ -301,6 +352,7 @@ void TFT_eSPI::init(uint8_t tc) #endif _booted = false; + spi_end(); } // end of: if just _booted // Toggle RST low to reset @@ -320,6 +372,7 @@ void TFT_eSPI::init(uint8_t tc) #endif spi_end(); + delay(150); // Wait for reset to complete spi_begin(); @@ -356,11 +409,36 @@ void TFT_eSPI::init(uint8_t tc) #elif defined (ST7789_DRIVER) #include "TFT_Drivers/ST7789_Init.h" +#elif defined (R61581_DRIVER) + #include "TFT_Drivers/R61581_Init.h" + +#elif defined (ST7789_2_DRIVER) + #include "TFT_Drivers/ST7789_2_Init.h" + +#endif + +#ifdef TFT_INVERSION_ON + writecommand(TFT_INVON); +#endif + +#ifdef TFT_INVERSION_OFF + writecommand(TFT_INVOFF); #endif spi_end(); setRotation(rotation); + +#if defined (TFT_BL) && defined (TFT_BACKLIGHT_ON) + digitalWrite(TFT_BL, TFT_BACKLIGHT_ON); + pinMode(TFT_BL, OUTPUT); +#else + #if defined (TFT_BL) && defined (M5STACK) + // Turn on the back-light LED + digitalWrite(TFT_BL, HIGH); + pinMode(TFT_BL, OUTPUT); + #endif +#endif } @@ -404,6 +482,12 @@ void TFT_eSPI::setRotation(uint8_t m) #elif defined (ST7789_DRIVER) #include "TFT_Drivers/ST7789_Rotation.h" +#elif defined (R61581_DRIVER) + #include "TFT_Drivers/R61581_Rotation.h" + +#elif defined (ST7789_2_DRIVER) + #include "TFT_Drivers/ST7789_2_Rotation.h" + #endif delayMicroseconds(10); @@ -425,8 +509,6 @@ void TFT_eSPI::commandList (const uint8_t *addr) uint8_t numArgs; uint8_t ms; - spi_begin(); - numCommands = pgm_read_byte(addr++); // Number of commands to follow while (numCommands--) // For each command... @@ -447,7 +529,7 @@ void TFT_eSPI::commandList (const uint8_t *addr) delay( (ms==255 ? 500 : ms) ); } } - spi_end(); + } @@ -467,13 +549,16 @@ void TFT_eSPI::spiwrite(uint8_t c) ***************************************************************************************/ void TFT_eSPI::writecommand(uint8_t c) { + spi_begin(); // CS_L; + DC_C; - CS_L; tft_Write_8(c); - CS_H; DC_D; + + spi_end(); // CS_H; + } @@ -483,11 +568,15 @@ void TFT_eSPI::writecommand(uint8_t c) ***************************************************************************************/ void TFT_eSPI::writedata(uint8_t d) { - CS_L; + spi_begin(); // CS_L; + + DC_D; // Play safe, but should already be in data mode tft_Write_8(d); - CS_H; + CS_L; // Allow more hold time for low VDI rail + + spi_end(); // CS_H; } @@ -519,18 +608,17 @@ uint8_t TFT_eSPI::readcommand8(uint8_t cmd_function, uint8_t index) index = 0x10 + (index & 0x0F); DC_C; - CS_L; tft_Write_8(0xD9); DC_D; tft_Write_8(index); - CS_H; + + CS_H; // Some displays seem to need CS to be pulsed here, or is just a delay needed? + CS_L; DC_C; - CS_L; tft_Write_8(cmd_function); DC_D; - reg = tft_Write_8(0); - CS_H; + reg = tft_Read_8(); spi_end_read(); #endif @@ -578,7 +666,7 @@ uint16_t TFT_eSPI::readPixel(int32_t x0, int32_t y0) { #if defined(ESP32_PARALLEL) - readAddrWindow(x0, y0, x0, y0); // Sets CS low + readAddrWindow(x0, y0, 1, 1); // Sets CS low // Set masked pins D0- D7 to input busDir(dir_mask, INPUT); @@ -619,35 +707,46 @@ uint16_t TFT_eSPI::readPixel(int32_t x0, int32_t y0) spi_begin_read(); - readAddrWindow(x0, y0, x0, y0); // Sets CS low + readAddrWindow(x0, y0, 1, 1); // Sets CS low + + #ifdef TFT_SDA_READ + begin_SDA_Read(); + #endif // Dummy read to throw away don't care value - tft_Write_8(0); + tft_Read_8(); + + //#if !defined (ILI9488_DRIVER) // Read the 3 RGB bytes, colour is actually only in the top 6 bits of each byte // as the TFT stores colours as 18 bits - #if !defined (ILI9488_DRIVER) - uint8_t r = tft_Write_8(0); - uint8_t g = tft_Write_8(0); - uint8_t b = tft_Write_8(0); + uint8_t r = tft_Read_8(); + uint8_t g = tft_Read_8(); + uint8_t b = tft_Read_8(); +/* #else + // The 6 colour bits are in MS 6 bits of each byte, but the ILI9488 needs an extra clock pulse // so bits appear shifted right 1 bit, so mask the middle 6 bits then shift 1 place left - uint8_t r = (tft_Write_8(0)&0x7E)<<1; - uint8_t g = (tft_Write_8(0)&0x7E)<<1; - uint8_t b = (tft_Write_8(0)&0x7E)<<1; - #endif + uint8_t r = (tft_Read_8()&0x7E)<<1; + uint8_t g = (tft_Read_8()&0x7E)<<1; + uint8_t b = (tft_Read_8()&0x7E)<<1; + #endif +*/ CS_H; + #ifdef TFT_SDA_READ + end_SDA_Read(); + #endif + spi_end_read(); - + return color565(r, g, b); #endif } - /*************************************************************************************** ** Function name: read byte - supports class functions ** Description: Read a byte from ESP32 8 bit data port @@ -707,13 +806,13 @@ void busDir(uint32_t mask, uint8_t mode) ** Function name: read rectangle (for SPI Interface II i.e. IM [3:0] = "1101") ** Description: Read 565 pixel colours from a defined area ***************************************************************************************/ -void TFT_eSPI::readRect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t *data) +void TFT_eSPI::readRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data) { if ((x > _width) || (y > _height) || (w == 0) || (h == 0)) return; #if defined(ESP32_PARALLEL) - readAddrWindow(x, y, x + w - 1, y + h - 1); // Sets CS low + readAddrWindow(x, y, w, h); // Sets CS low // Set masked pins D0- D7 to input busDir(dir_mask, INPUT); @@ -755,27 +854,35 @@ void TFT_eSPI::readRect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t spi_begin_read(); - readAddrWindow(x, y, x + w - 1, y + h - 1); // Sets CS low + readAddrWindow(x, y, w, h); // Sets CS low + + #ifdef TFT_SDA_READ + begin_SDA_Read(); + #endif // Dummy read to throw away don't care value - tft_Write_8(0); + tft_Read_8(); // Read window pixel 24 bit RGB values uint32_t len = w * h; while (len--) { + #if !defined (ILI9488_DRIVER) + // Read the 3 RGB bytes, colour is actually only in the top 6 bits of each byte // as the TFT stores colours as 18 bits - #if !defined (ILI9488_DRIVER) - uint8_t r = tft_Write_8(0); - uint8_t g = tft_Write_8(0); - uint8_t b = tft_Write_8(0); + uint8_t r = tft_Read_8(); + uint8_t g = tft_Read_8(); + uint8_t b = tft_Read_8(); + #else + // The 6 colour bits are in LS 6 bits of each byte but we do not include the extra clock pulse // so we use a trick and mask the middle 6 bits of the byte, then only shift 1 place left - uint8_t r = (tft_Write_8(0)&0x7E)<<1; - uint8_t g = (tft_Write_8(0)&0x7E)<<1; - uint8_t b = (tft_Write_8(0)&0x7E)<<1; + uint8_t r = (tft_Read_8()&0x7E)<<1; + uint8_t g = (tft_Read_8()&0x7E)<<1; + uint8_t b = (tft_Read_8()&0x7E)<<1; + #endif // Swapped colour byte order for compatibility with pushRect() @@ -784,16 +891,84 @@ void TFT_eSPI::readRect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t CS_H; + #ifdef TFT_SDA_READ + end_SDA_Read(); + #endif + spi_end_read(); + #endif } +/*************************************************************************************** +** Function name: tft_Read_8 +** Description: Software SPI to read bidirectional SDA line +***************************************************************************************/ +#if defined (ESP8266) && defined (TFT_SDA_READ) +uint8_t TFT_eSPI::tft_Read_8(void) +{ + uint8_t ret = 0; + uint32_t reg = 0; + + for (uint8_t i = 0; i < 8; i++) { // read results + ret <<= 1; + SCLK_L; + if (digitalRead(TFT_MOSI)) ret |= 1; + SCLK_H; + } + + return ret; +} +#endif + +/*************************************************************************************** +** Function name: beginSDA +** Description: Detach SPI from pin to permit software SPI +***************************************************************************************/ +#ifdef TFT_SDA_READ +void TFT_eSPI::begin_SDA_Read(void) +{ + #ifdef ESP32 + pinMatrixOutDetach(TFT_MOSI, false, false); + pinMode(TFT_MOSI, INPUT); + pinMatrixInAttach(TFT_MOSI, VSPIQ_IN_IDX, false); + #else // ESP8266 + #ifdef TFT_SPI_OVERLAP + // Reads in overlap mode not supported + #else + spi.end(); + #endif + #endif +} +#endif + +/*************************************************************************************** +** Function name: endSDA +** Description: Attach SPI pins after software SPI +***************************************************************************************/ +#ifdef TFT_SDA_READ +void TFT_eSPI::end_SDA_Read(void) +{ + #ifdef ESP32 + pinMode(TFT_MOSI, OUTPUT); + pinMatrixOutAttach(TFT_MOSI, VSPID_OUT_IDX, false, false); + pinMode(TFT_MISO, INPUT); + pinMatrixInAttach(TFT_MISO, VSPIQ_IN_IDX, false); + #else + #ifdef TFT_SPI_OVERLAP + spi.pins(6, 7, 8, 0); + #else + spi.begin(); + #endif + #endif +} +#endif /*************************************************************************************** ** Function name: push rectangle (for SPI Interface II i.e. IM [3:0] = "1101") ** Description: push 565 pixel colours into a defined area ***************************************************************************************/ -void TFT_eSPI::pushRect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t *data) +void TFT_eSPI::pushRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data) { // Function deprecated, remains for backwards compatibility // pushImage() is better as it will crop partly off-screen image blocks @@ -805,10 +980,10 @@ void TFT_eSPI::pushRect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint16_t ** Function name: pushImage ** Description: plot 16 bit colour sprite or image onto TFT ***************************************************************************************/ -void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t *data) +void TFT_eSPI::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data) { - if ((x >= (int32_t)_width) || (y >= (int32_t)_height)) return; + if ((x >= _width) || (y >= _height)) return; int32_t dx = 0; int32_t dy = 0; @@ -826,7 +1001,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t spi_begin(); inTransaction = true; - setAddrWindow(x, y, x + dw - 1, y + dh - 1); // Sets CS low and sent RAMWR + setWindow(x, y, x + dw - 1, y + dh - 1); data += dx + dy * w; @@ -836,8 +1011,6 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t data += w; } - CS_H; - inTransaction = false; spi_end(); } @@ -846,10 +1019,10 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t ** Function name: pushImage ** Description: plot 16 bit sprite or image with 1 colour being transparent ***************************************************************************************/ -void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t *data, uint16_t transp) +void TFT_eSPI::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data, uint16_t transp) { - if ((x >= (int32_t)_width) || (y >= (int32_t)_height)) return; + if ((x >= _width) || (y >= _height)) return; int32_t dx = 0; int32_t dy = 0; @@ -887,7 +1060,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t { if (transp != *ptr) { - if (move) { move = false; setAddrWindow(px, y, xe, ye); } + if (move) { move = false; setWindow(px, y, xe, ye); } lineBuf[np] = *ptr; np++; } @@ -909,8 +1082,6 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t data += w; } - CS_H; - inTransaction = false; spi_end(); } @@ -920,10 +1091,13 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint16_t ** Function name: pushImage - for FLASH (PROGMEM) stored images ** Description: plot 16 bit image ***************************************************************************************/ -void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uint16_t *data) +void TFT_eSPI::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const uint16_t *data) { - - if ((x >= (int32_t)_width) || (y >= (int32_t)_height)) return; +#ifdef ESP32 + pushImage(x, y, w, h, (uint16_t*)data); +#else + // Partitioned memory FLASH processor + if ((x >= _width) || (y >= _height)) return; int32_t dx = 0; int32_t dy = 0; @@ -946,17 +1120,17 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin uint16_t buffer[64]; uint16_t* pix_buffer = buffer; - setAddrWindow(x, y, x + dw - 1, y + dh - 1); + setWindow(x, y, x + dw - 1, y + dh - 1); // Work out the number whole buffers to send uint16_t nb = (dw * dh) / 64; // Fill and send "nb" buffers to TFT - for (int i = 0; i < nb; i++) { - for (int j = 0; j < 64; j++) { + for (int32_t i = 0; i < nb; i++) { + for (int32_t j = 0; j < 64; j++) { pix_buffer[j] = pgm_read_word(&data[i * 64 + j]); } - pushColors(pix_buffer, 64, !_swapBytes); + pushColors(pix_buffer, 64, _swapBytes); } // Work out number of pixels not yet sent @@ -964,17 +1138,16 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin // Send any partial buffer left over if (np) { - for (int i = 0; i < np; i++) + for (int32_t i = 0; i < np; i++) { pix_buffer[i] = pgm_read_word(&data[nb * 64 + i]); } - pushColors(pix_buffer, np, !_swapBytes); + pushColors(pix_buffer, np, _swapBytes); } - CS_H; - inTransaction = false; spi_end(); +#endif // if ESP32 else ESP8266 check } @@ -982,10 +1155,13 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin ** Function name: pushImage - for FLASH (PROGMEM) stored images ** Description: plot 16 bit image with 1 colour being transparent ***************************************************************************************/ -void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uint16_t *data, uint16_t transp) +void TFT_eSPI::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const uint16_t *data, uint16_t transp) { - - if ((x >= (int32_t)_width) || (y >= (int32_t)_height)) return; +#ifdef ESP32 + pushImage(x, y, w, h, (uint16_t*) data, transp); +#else + // Partitioned memory FLASH processor + if ((x >= _width) || (y >= (int32_t)_height)) return; int32_t dx = 0; int32_t dy = 0; @@ -1009,7 +1185,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin uint16_t lineBuf[dw]; - if (_swapBytes) transp = transp >> 8 | transp << 8; + if (!_swapBytes) transp = transp >> 8 | transp << 8; while (dh--) { @@ -1025,7 +1201,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin uint16_t color = pgm_read_word(ptr); if (transp != color) { - if (move) { move = false; setAddrWindow(px, y, xe, ye); } + if (move) { move = false; setWindow(px, y, xe, ye); } lineBuf[np] = color; np++; } @@ -1034,23 +1210,22 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin move = true; if (np) { - pushColors(lineBuf, np, !_swapBytes); + pushColors(lineBuf, np, _swapBytes); np = 0; } } px++; ptr++; } - if (np) pushColors(lineBuf, np, !_swapBytes); + if (np) pushColors(lineBuf, np, _swapBytes); y++; data += w; } - CS_H; - inTransaction = false; spi_end(); +#endif // if ESP32 else ESP8266 check } @@ -1058,9 +1233,9 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, const uin ** Function name: pushImage ** Description: plot 8 bit image or sprite using a line buffer ***************************************************************************************/ -void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t *data, bool bpp8) +void TFT_eSPI::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t *data, bool bpp8) { - if ((x >= (int32_t)_width) || (y >= (int32_t)_height)) return; + if ((x >= _width) || (y >= (int32_t)_height)) return; int32_t dx = 0; int32_t dy = 0; @@ -1078,7 +1253,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * spi_begin(); inTransaction = true; - setAddrWindow(x, y, x + dw - 1, y + dh - 1); // Sets CS low and sent RAMWR + setWindow(x, y, x + dw - 1, y + dh - 1); // Sets CS low and sent RAMWR // Line buffer makes plotting faster uint16_t lineBuf[dw]; @@ -1145,7 +1320,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * //else drawPixel((dw-len)+xp,h-dh,bitmap_bg); xp++; } - *ptr++; + ptr++; len -= 8; } @@ -1155,8 +1330,6 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * } } - CS_H; - inTransaction = false; spi_end(); } @@ -1166,9 +1339,9 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * ** Function name: pushImage ** Description: plot 8 or 1 bit image or sprite with a transparent colour ***************************************************************************************/ -void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t *data, uint8_t transp, bool bpp8) +void TFT_eSPI::pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t *data, uint8_t transp, bool bpp8) { - if ((x >= (int32_t)_width) || (y >= (int32_t)_height)) return; + if ((x >= _width) || (y >= _height)) return; int32_t dx = 0; int32_t dy = 0; @@ -1219,7 +1392,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * { if (transp != *ptr) { - if (move) { move = false; setAddrWindow(px, y, xe, ye);} + if (move) { move = false; setWindow(px, y, xe, ye);} uint8_t color = *ptr; // Shifts are slow so check if colour has changed first @@ -1278,7 +1451,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * if (move) { move = false; - setAddrWindow(px, y, xe, ye); + setWindow(px, y, xe, ye); } np++; } @@ -1294,7 +1467,7 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * px++; xp++; } - *ptr++; + ptr++; len -= 8; } if (np) pushColor(bitmap_fg, np); @@ -1303,8 +1476,6 @@ void TFT_eSPI::pushImage(int32_t x, int32_t y, uint32_t w, uint32_t h, uint8_t * } } - CS_H; - inTransaction = false; spi_end(); } @@ -1336,38 +1507,55 @@ bool TFT_eSPI::getSwapBytes(void) // If w and h are 1, then 1 pixel is read, *data array size must be 3 bytes per pixel void TFT_eSPI::readRectRGB(int32_t x0, int32_t y0, int32_t w, int32_t h, uint8_t *data) { -#if !defined(ESP32_PARALLEL) +#if defined(ESP32_PARALLEL) + + // ESP32 parallel bus supported yet + +#else // Not ESP32_PARALLEL + spi_begin_read(); - readAddrWindow(x0, y0, x0 + w - 1, y0 + h - 1); // Sets CS low + readAddrWindow(x0, y0, w, h); // Sets CS low + + #ifdef TFT_SDA_READ + begin_SDA_Read(); + #endif // Dummy read to throw away don't care value - tft_Write_8(0); - + tft_Read_8(); + // Read window pixel 24 bit RGB values, buffer must be set in sketch to 3 * w * h uint32_t len = w * h; while (len--) { - // Read the 3 RGB bytes, colour is actually only in the top 6 bits of each byte - // as the TFT stores colours as 18 bits + + #if !defined (ILI9488_DRIVER) // Read the 3 RGB bytes, colour is actually only in the top 6 bits of each byte // as the TFT stores colours as 18 bits - #if !defined (ILI9488_DRIVER) - *data++ = tft_Write_8(0); - *data++ = tft_Write_8(0); - *data++ = tft_Write_8(0); + *data++ = tft_Read_8(); + *data++ = tft_Read_8(); + *data++ = tft_Read_8(); + #else + // The 6 colour bits are in MS 6 bits of each byte, but the ILI9488 needs an extra clock pulse // so bits appear shifted right 1 bit, so mask the middle 6 bits then shift 1 place left - *data++ = (tft_Write_8(0)&0x7E)<<1; - *data++ = (tft_Write_8(0)&0x7E)<<1; - *data++ = (tft_Write_8(0)&0x7E)<<1; + *data++ = (tft_Read_8()&0x7E)<<1; + *data++ = (tft_Read_8()&0x7E)<<1; + *data++ = (tft_Read_8()&0x7E)<<1; + #endif } + CS_H; + #ifdef TFT_SDA_READ + end_SDA_Read(); + #endif + spi_end_read(); + #endif } @@ -1384,7 +1572,7 @@ void TFT_eSPI::drawCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color) int32_t dy = r+r; int32_t p = -(r>>1); - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; // These are ordered to minimise coordinate changes in x or y @@ -1421,7 +1609,7 @@ void TFT_eSPI::drawCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color) } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1477,7 +1665,7 @@ void TFT_eSPI::fillCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color) int32_t dy = r+r; int32_t p = -(r>>1); - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; drawFastHLine(x0 - r, y0, dy+1, color); @@ -1503,7 +1691,7 @@ void TFT_eSPI::fillCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color) } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1548,7 +1736,7 @@ void TFT_eSPI::fillCircleHelper(int32_t x0, int32_t y0, int32_t r, uint8_t corne ** Function name: drawEllipse ** Description: Draw a ellipse outline ***************************************************************************************/ -void TFT_eSPI::drawEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint16_t color) +void TFT_eSPI::drawEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color) { if (rx<2) return; if (ry<2) return; @@ -1559,7 +1747,7 @@ void TFT_eSPI::drawEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint1 int32_t fy2 = 4 * ry2; int32_t s; - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; for (x = 0, y = ry, s = 2*ry2+rx2*(1-2*ry); ry2*x <= rx2*y; x++) @@ -1595,7 +1783,7 @@ void TFT_eSPI::drawEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint1 } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1603,7 +1791,7 @@ void TFT_eSPI::drawEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint1 ** Function name: fillEllipse ** Description: draw a filled ellipse ***************************************************************************************/ -void TFT_eSPI::fillEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint16_t color) +void TFT_eSPI::fillEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color) { if (rx<2) return; if (ry<2) return; @@ -1614,7 +1802,7 @@ void TFT_eSPI::fillEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint1 int32_t fy2 = 4 * ry2; int32_t s; - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; for (x = 0, y = ry, s = 2*ry2+rx2*(1-2*ry); ry2*x <= rx2*y; x++) @@ -1644,7 +1832,7 @@ void TFT_eSPI::fillEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint1 } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1665,16 +1853,17 @@ void TFT_eSPI::fillScreen(uint32_t color) // Draw a rectangle void TFT_eSPI::drawRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; drawFastHLine(x, y, w, color); drawFastHLine(x, y + h - 1, w, color); - drawFastVLine(x, y, h, color); - drawFastVLine(x + w - 1, y, h, color); + // Avoid drawing corner pixels twice + drawFastVLine(x, y+1, h-2, color); + drawFastVLine(x + w - 1, y+1, h-2, color); inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1685,7 +1874,7 @@ void TFT_eSPI::drawRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t col // Draw a rounded rectangle void TFT_eSPI::drawRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t r, uint32_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; // smarter version @@ -1700,7 +1889,7 @@ void TFT_eSPI::drawRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t drawCircleHelper(x + r , y + h - r - 1, r, 8, color); inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1711,7 +1900,7 @@ void TFT_eSPI::drawRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t // Fill a rounded rectangle, changed to horizontal lines (faster in sprites) void TFT_eSPI::fillRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t r, uint32_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; // smarter version @@ -1722,7 +1911,7 @@ void TFT_eSPI::fillRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t fillCircleHelper(x + r , y + r, r, 2, w - r - r - 1, color); inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1733,7 +1922,7 @@ void TFT_eSPI::fillRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t // Draw a triangle void TFT_eSPI::drawTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; drawLine(x0, y0, x1, y1, color); @@ -1741,7 +1930,7 @@ void TFT_eSPI::drawTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int3 drawLine(x2, y2, x0, y0, color); inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1775,7 +1964,7 @@ void TFT_eSPI::fillTriangle ( int32_t x0, int32_t y0, int32_t x1, int32_t y1, in return; } - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; int32_t @@ -1822,7 +2011,7 @@ void TFT_eSPI::fillTriangle ( int32_t x0, int32_t y0, int32_t x1, int32_t y1, in } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1832,7 +2021,7 @@ void TFT_eSPI::fillTriangle ( int32_t x0, int32_t y0, int32_t x1, int32_t y1, in ***************************************************************************************/ void TFT_eSPI::drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; int32_t i, j, byteWidth = (w + 7) / 8; @@ -1846,7 +2035,7 @@ void TFT_eSPI::drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1856,7 +2045,7 @@ void TFT_eSPI::drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w ***************************************************************************************/ void TFT_eSPI::drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; int32_t i, j, byteWidth = (w + 7) / 8; @@ -1870,7 +2059,7 @@ void TFT_eSPI::drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1880,7 +2069,7 @@ void TFT_eSPI::drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t ***************************************************************************************/ void TFT_eSPI::drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bgcolor) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; int32_t i, j, byteWidth = (w + 7) / 8; @@ -1894,7 +2083,7 @@ void TFT_eSPI::drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } @@ -1974,6 +2163,37 @@ void TFT_eSPI::setTextColor(uint16_t c, uint16_t b) } +/*************************************************************************************** +** Function name: setPivot +** Description: Set the pivot point on the TFT +*************************************************************************************x*/ +void TFT_eSPI::setPivot(int16_t x, int16_t y) +{ + _xpivot = x; + _ypivot = y; +} + + +/*************************************************************************************** +** Function name: getPivotX +** Description: Get the x pivot position +***************************************************************************************/ +int16_t TFT_eSPI::getPivotX(void) +{ + return _xpivot; +} + + +/*************************************************************************************** +** Function name: getPivotY +** Description: Get the y pivot position +***************************************************************************************/ +int16_t TFT_eSPI::getPivotY(void) +{ + return _ypivot; +} + + /*************************************************************************************** ** Function name: setBitmapColor ** Description: Set the foreground foreground and background colour @@ -2069,7 +2289,7 @@ int16_t TFT_eSPI::textWidth(const String& string) return textWidth(buffer, textfont); } -int16_t TFT_eSPI::textWidth(const String& string, int font) +int16_t TFT_eSPI::textWidth(const String& string, uint8_t font) { int16_t len = string.length() + 2; char buffer[len]; @@ -2082,49 +2302,48 @@ int16_t TFT_eSPI::textWidth(const char *string) return textWidth(string, textfont); } -int16_t TFT_eSPI::textWidth(const char *string, int font) +int16_t TFT_eSPI::textWidth(const char *string, uint8_t font) { - int str_width = 0; + int32_t str_width = 0; + uint16_t uniCode = 0; #ifdef SMOOTH_FONT if(fontLoaded) { while (*string) { - uint16_t unicode = decodeUTF8(*string++); - if (unicode) + uniCode = decodeUTF8(*string++); + if (uniCode) { - if (unicode == 0x20) str_width += gFont.spaceWidth; + if (uniCode == 0x20) str_width += gFont.spaceWidth; else { uint16_t gNum = 0; - bool found = getUnicodeIndex(unicode, &gNum); + bool found = getUnicodeIndex(uniCode, &gNum); if (found) { if(str_width == 0 && gdX[gNum] < 0) str_width -= gdX[gNum]; - if (*string) str_width += gxAdvance[gNum]; + if (*string || isDigits) str_width += gxAdvance[gNum]; else str_width += (gdX[gNum] + gWidth[gNum]); } else str_width += gFont.spaceWidth + 1; } } } + isDigits = false; return str_width; } #endif - unsigned char uniCode; - char *widthtable; - if (font>1 && font<9) { - widthtable = (char *)pgm_read_dword( &(fontdata[font].widthtbl ) ) - 32; //subtract the 32 outside the loop + char *widthtable = (char *)pgm_read_dword( &(fontdata[font].widthtbl ) ) - 32; //subtract the 32 outside the loop while (*string) { uniCode = *(string++); if (uniCode > 31 && uniCode < 128) - str_width += pgm_read_byte( widthtable + uniCode); // Normally we need to subract 32 from uniCode + str_width += pgm_read_byte( widthtable + uniCode); // Normally we need to subtract 32 from uniCode else str_width += pgm_read_byte( widthtable + 32); // Set illegal character = space width } } @@ -2136,13 +2355,13 @@ int16_t TFT_eSPI::textWidth(const char *string, int font) { while (*string) { - uniCode = *(string++); - if ((uniCode >= (uint8_t)pgm_read_byte(&gfxFont->first)) && (uniCode <= (uint8_t)pgm_read_byte(&gfxFont->last ))) + uniCode = decodeUTF8(*string++); + if ((uniCode >= pgm_read_word(&gfxFont->first)) && (uniCode <= pgm_read_word(&gfxFont->last ))) { - uniCode -= pgm_read_byte(&gfxFont->first); + uniCode -= pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[uniCode]); - // If this is not the last character then use xAdvance - if (*string) str_width += pgm_read_byte(&glyph->xAdvance); + // If this is not the last character or is a digit then use xAdvance + if (*string || isDigits) str_width += pgm_read_byte(&glyph->xAdvance); // Else use the offset plus width since this can be bigger than xAdvance else str_width += ((int8_t)pgm_read_byte(&glyph->xOffset) + pgm_read_byte(&glyph->width)); } @@ -2156,6 +2375,7 @@ int16_t TFT_eSPI::textWidth(const char *string, int font) #endif } } + isDigits = false; return str_width * textsize; } @@ -2203,10 +2423,10 @@ int16_t TFT_eSPI::fontHeight(void) ** Function name: drawChar ** Description: draw a single character in the Adafruit GLCD font ***************************************************************************************/ -void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, uint32_t bg, uint8_t size) +void TFT_eSPI::drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uint32_t bg, uint8_t size) { - if ((x >= (int16_t)_width) || // Clip right - (y >= (int16_t)_height) || // Clip bottom + if ((x >= _width) || // Clip right + (y >= _height) || // Clip bottom ((x + 6 * size - 1) < 0) || // Clip left ((y + 8 * size - 1) < 0)) // Clip top return; @@ -2226,16 +2446,16 @@ void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, u uint8_t column[6]; uint8_t mask = 0x1; spi_begin(); - //inTransaction = true; - setAddrWindow(x, y, x+5, y+8); + + setWindow(x, y, x+5, y+8); + for (int8_t i = 0; i < 5; i++ ) column[i] = pgm_read_byte(font + (c * 5) + i); column[5] = 0; #if defined (ESP8266) && !defined (ILI9488_DRIVER) color = (color >> 8) | (color << 8); bg = (bg >> 8) | (bg << 8); - uint32_t spimask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - SPI1U1 = (SPI1U1 & spimask) | (15 << SPILMOSI) | (15 << SPILMISO); + for (int8_t j = 0; j < 8; j++) { for (int8_t k = 0; k < 5; k++ ) { if (column[k] & mask) { @@ -2266,13 +2486,12 @@ void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, u } #endif - CS_H; - //inTransaction = false; + spi_end(); } else { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; for (int8_t i = 0; i < 6; i++ ) { uint8_t line; @@ -2297,7 +2516,7 @@ void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, u } } inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } //>>>>>>>>>>>>>>>>>>>>>>>>>>> @@ -2309,17 +2528,17 @@ void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, u #ifdef LOAD_GFXFF // Filter out bad characters not present in font - if ((c >= (uint8_t)pgm_read_byte(&gfxFont->first)) && (c <= (uint8_t)pgm_read_byte(&gfxFont->last ))) + if ((c >= pgm_read_word(&gfxFont->first)) && (c <= pgm_read_word(&gfxFont->last ))) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; //>>>>>>>>>>>>>>>>>>>>>>>>>>> - c -= pgm_read_byte(&gfxFont->first); + c -= pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c]); uint8_t *bitmap = (uint8_t *)pgm_read_dword(&gfxFont->bitmap); - uint16_t bo = pgm_read_word(&glyph->bitmapOffset); + uint32_t bo = pgm_read_word(&glyph->bitmapOffset); uint8_t w = pgm_read_byte(&glyph->width), h = pgm_read_byte(&glyph->height); //xa = pgm_read_byte(&glyph->xAdvance); @@ -2435,7 +2654,7 @@ void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, u } #endif inTransaction = false; - spi_end(); + spi_end(); // Does nothing if Sprite class uses this function } #endif @@ -2450,29 +2669,29 @@ void TFT_eSPI::drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, u /*************************************************************************************** -** Function name: setWindow +** Function name: setAddrWindow ** Description: define an area to receive a stream of pixels ***************************************************************************************/ // Chip select is high at the end of this function -void TFT_eSPI::setWindow(int16_t x0, int16_t y0, int16_t x1, int16_t y1) +void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t w, int32_t h) { spi_begin(); - setAddrWindow(x0, y0, x1, y1); - CS_H; + + setWindow(x0, y0, x0 + w - 1, y0 + h - 1); + spi_end(); } /*************************************************************************************** -** Function name: setAddrWindow +** Function name: setWindow ** Description: define an area to receive a stream of pixels ***************************************************************************************/ -// Chip select stays low, use setWindow() from sketches - +// Chip select stays low, call spi_begin first. Use setAddrWindow() from sketches #if defined (ESP8266) && !defined (RPI_WRITE_STROBE) && !defined (RPI_ILI9486_DRIVER) -inline void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) +void TFT_eSPI::setWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) { - //spi_begin(); + //spi_begin(); // Must be called before setWimdow #ifdef CGRAM_OFFSET xs+=colstart; @@ -2483,12 +2702,8 @@ inline void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t // Column addr set DC_C; - CS_L; - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = SPI1U1 & mask; - - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_CASET; SPI1CMD |= SPIBUSY; @@ -2500,7 +2715,7 @@ inline void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t DC_D; - SPI1U1 = mask | (31 << SPILMOSI) | (31 << SPILMISO); + SPI1U1 = (31 << SPILMOSI) | (31 << SPILMISO); // Load the two coords as a 32 bit value and shift in one go SPI1W0 = (xs >> 8) | (uint16_t)(xs << 8) | ((uint8_t)(xe >> 8)<<16 | (xe << 24)); SPI1CMD |= SPIBUSY; @@ -2509,7 +2724,7 @@ inline void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t // Row addr set DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_PASET; SPI1CMD |= SPIBUSY; @@ -2517,7 +2732,7 @@ inline void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t DC_D; - SPI1U1 = mask | (31 << SPILMOSI) | (31 << SPILMISO); + SPI1U1 = (31 << SPILMOSI) | (31 << SPILMISO); // Load the two coords as a 32 bit value and shift in one go SPI1W0 = (ys >> 8) | (uint16_t)(ys << 8) | ((uint8_t)(ye >> 8)<<16 | (ye << 24)); SPI1CMD |= SPIBUSY; @@ -2526,33 +2741,30 @@ inline void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t // write to RAM DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_RAMWR; SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} DC_D; + SPI1U1 = (15 << SPILMOSI) | (15 << SPILMISO); //spi_end(); } #elif defined (ESP8266) && !defined (RPI_WRITE_STROBE) && defined (RPI_ILI9486_DRIVER) // This is for the RPi display that needs 16 bits -void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) +void TFT_eSPI::setWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) { - //spi_begin(); + //spi_begin(); // Must be called before setWimdow addr_col = 0xFFFF; addr_row = 0xFFFF; // Column addr set DC_C; - CS_L; - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = SPI1U1 & mask; - - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_CASET<<8; SPI1CMD |= SPIBUSY; @@ -2560,13 +2772,13 @@ void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) DC_D; - uint8_t xBin[] = { 0, (uint8_t) (xs>>8), 0, (uint8_t) (xs>>0), 0, (uint8_t) (xe>>8), 0, (uint8_t) (xe>>0), }; - SPI.writePattern(&xBin[0], 8, 1); + uint8_t xb[] = { 0, (uint8_t) (xs>>8), 0, (uint8_t) (xs>>0), 0, (uint8_t) (xe>>8), 0, (uint8_t) (xe>>0), }; + spi.writePattern(&xb[0], 8, 1); // Row addr set DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_PASET<<8; SPI1CMD |= SPIBUSY; @@ -2574,33 +2786,33 @@ void TFT_eSPI::setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) DC_D; - uint8_t yBin[] = { 0, (uint8_t) (ys>>8), 0, (uint8_t) (ys>>0), 0, (uint8_t) (ye>>8), 0, (uint8_t) (ye>>0), }; - SPI.writePattern(&yBin[0], 8, 1); + uint8_t yb[] = { 0, (uint8_t) (ys>>8), 0, (uint8_t) (ys>>0), 0, (uint8_t) (ye>>8), 0, (uint8_t) (ye>>0), }; + spi.writePattern(&yb[0], 8, 1); // write to RAM DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_RAMWR<<8; SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} DC_D; + // Re-instate SPI flags settings corrupted by SPI library writePattern() call + SPI1U = SPI1U_WRITE; + //spi_end(); } #else #if defined (ESP8266) && defined (RPI_ILI9486_DRIVER) // This is for the RPi display that needs 16 bits -inline void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) +void TFT_eSPI::setWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) { - //spi_begin(); + //spi_begin(); // Must be called before setWimdow - CS_L; - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = SPI1U1 & mask; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); // Column addr set DC_C; @@ -2670,9 +2882,9 @@ inline void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t #else // This is for the ESP32 -inline void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) +void TFT_eSPI::setWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) { - //spi_begin(); + //spi_begin(); // Must be called before setWimdow addr_col = 0xFFFF; addr_row = 0xFFFF; @@ -2684,42 +2896,36 @@ inline void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1+=rowstart; #endif -#if !defined (RPI_ILI9486_DRIVER) - uint32_t xaw = ((uint32_t)x0 << 16) | x1; - uint32_t yaw = ((uint32_t)y0 << 16) | y1; -#endif - - // Column addr set DC_C; - CS_L; tft_Write_8(TFT_CASET); DC_D; #if defined (RPI_ILI9486_DRIVER) - uint8_t xBin[] = { 0, (uint8_t) (x0>>8), 0, (uint8_t) (x0>>0), 0, (uint8_t) (x1>>8), 0, (uint8_t) (x1>>0), }; - SPI.writePattern(&xBin[0], 8, 1); + uint8_t xb[] = { 0, (uint8_t) (x0>>8), 0, (uint8_t) (x0>>0), 0, (uint8_t) (x1>>8), 0, (uint8_t) (x1>>0), }; + spi.writePattern(&xb[0], 8, 1); #else - tft_Write_32(xaw); + tft_Write_32(SPI_32(x0, x1)); #endif - // Row addr set DC_C; + + // Row addr set tft_Write_8(TFT_PASET); DC_D; #if defined (RPI_ILI9486_DRIVER) - uint8_t yBin[] = { 0, (uint8_t) (y0>>8), 0, (uint8_t) (y0>>0), 0, (uint8_t) (y1>>8), 0, (uint8_t) (y1>>0), }; - SPI.writePattern(&yBin[0], 8, 1); + uint8_t yb[] = { 0, (uint8_t) (y0>>8), 0, (uint8_t) (y0>>0), 0, (uint8_t) (y1>>8), 0, (uint8_t) (y1>>0), }; + spi.writePattern(&yb[0], 8, 1); #else - tft_Write_32(yaw); + tft_Write_32(SPI_32(y0, y1)); #endif - // write to RAM DC_C; + // write to RAM tft_Write_8(TFT_RAMWR); DC_D; @@ -2736,28 +2942,26 @@ inline void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t ***************************************************************************************/ // Chip select stays low #if defined (ESP8266) && !defined (RPI_WRITE_STROBE) -void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) +void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h) { - //spi_begin(); + + int32_t xe = xs + w - 1; + int32_t ye = ys + h - 1; addr_col = 0xFFFF; addr_row = 0xFFFF; #ifdef CGRAM_OFFSET - xs+=colstart; - xe+=colstart; - ys+=rowstart; - ye+=rowstart; + xs += colstart; + xe += colstart; + ys += rowstart; + ye += rowstart; #endif // Column addr set DC_C; - CS_L; - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = SPI1U1 & mask; - - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_CASET; SPI1CMD |= SPIBUSY; @@ -2765,7 +2969,7 @@ void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) DC_D; - SPI1U1 = mask | (31 << SPILMOSI) | (31 << SPILMISO); + SPI1U1 = (31 << SPILMOSI) | (31 << SPILMISO); // Load the two coords as a 32 bit value and shift in one go SPI1W0 = (xs >> 8) | (uint16_t)(xs << 8) | ((uint8_t)(xe >> 8)<<16 | (xe << 24)); SPI1CMD |= SPIBUSY; @@ -2774,7 +2978,7 @@ void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) // Row addr set DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_PASET; SPI1CMD |= SPIBUSY; @@ -2782,7 +2986,7 @@ void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) DC_D; - SPI1U1 = mask | (31 << SPILMOSI) | (31 << SPILMISO); + SPI1U1 = (31 << SPILMOSI) | (31 << SPILMISO); // Load the two coords as a 32 bit value and shift in one go SPI1W0 = (ys >> 8) | (uint16_t)(ys << 8) | ((uint8_t)(ye >> 8)<<16 | (ye << 24)); SPI1CMD |= SPIBUSY; @@ -2791,44 +2995,41 @@ void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye) // read from RAM DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_RAMRD; SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} DC_D; - //spi_end(); + } #else //ESP32 -void TFT_eSPI::readAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) +void TFT_eSPI::readAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h) { - //spi_begin(); + + int32_t xe = xs + w - 1; + int32_t ye = ys + h - 1; addr_col = 0xFFFF; addr_row = 0xFFFF; #ifdef CGRAM_OFFSET - x0+=colstart; - x1+=colstart; - y0+=rowstart; - y1+=rowstart; +xs += colstart; +xe += colstart; +ys += rowstart; +ye += rowstart; #endif - uint32_t xaw = ((uint32_t)x0 << 16) | x1; - uint32_t yaw = ((uint32_t)y0 << 16) | y1; - // Column addr set DC_C; - CS_L; tft_Write_8(TFT_CASET); - DC_D; - tft_Write_32(xaw); + tft_Write_32(SPI_32(xs, xe)); // Row addr set DC_C; @@ -2837,14 +3038,14 @@ void TFT_eSPI::readAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) DC_D; - tft_Write_32(yaw); + tft_Write_32(SPI_32(ys, ye)); DC_C; + tft_Write_8(TFT_RAMRD); // Read CGRAM command DC_D; - //spi_end(); } #endif @@ -2854,11 +3055,11 @@ void TFT_eSPI::readAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1) ** Description: push a single pixel at an arbitrary position ***************************************************************************************/ #if defined (ESP8266) && !defined (RPI_WRITE_STROBE) -void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) +void TFT_eSPI::drawPixel(int32_t x, int32_t y, uint32_t color) { - // Faster range checking, possible because x and y are unsigned - if ((x >= _width) || (y >= _height)) return; - + // Range checking + if ((x < 0) || (y < 0) ||(x >= _width) || (y >= _height)) return; + #ifdef CGRAM_OFFSET x+=colstart; y+=rowstart; @@ -2866,16 +3067,12 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) spi_begin(); - CS_L; - - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = SPI1U1 & mask; // No need to send x if it has not changed (speeds things up) if (addr_col != x) { DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_CASET<<(CMD_BITS + 1 - 8); SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} @@ -2884,9 +3081,9 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) #if defined (RPI_ILI9486_DRIVER) // This is for the RPi display that needs 16 bits per byte uint8_t cBin[] = { 0, (uint8_t) (x>>8), 0, (uint8_t) (x>>0)}; - SPI.writePattern(&cBin[0], 4, 2); + spi.writePattern(&cBin[0], 4, 2); #else - SPI1U1 = mask | (31 << SPILMOSI) | (31 << SPILMISO); + SPI1U1 = (31 << SPILMOSI) | (31 << SPILMISO); // Load the two coords as a 32 bit value and shift in one go uint32_t xswap = (x >> 8) | (uint16_t)(x << 8); SPI1W0 = xswap | (xswap << 16); @@ -2902,7 +3099,7 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_PASET<<(CMD_BITS + 1 - 8); SPI1CMD |= SPIBUSY; @@ -2912,9 +3109,9 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) #if defined (RPI_ILI9486_DRIVER) // This is for the RPi display that needs 16 bits per byte uint8_t cBin[] = { 0, (uint8_t) (y>>8), 0, (uint8_t) (y>>0)}; - SPI.writePattern(&cBin[0], 4, 2); + spi.writePattern(&cBin[0], 4, 2); #else - SPI1U1 = mask | (31 << SPILMOSI) | (31 << SPILMISO); + SPI1U1 = (31 << SPILMOSI) | (31 << SPILMISO); // Load the two coords as a 32 bit value and shift in one go uint32_t yswap = (y >> 8) | (uint16_t)(y << 8); SPI1W0 = yswap | (yswap << 16); @@ -2927,7 +3124,7 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) DC_C; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); SPI1W0 = TFT_RAMWR<<(CMD_BITS + 1 - 8); SPI1CMD |= SPIBUSY; @@ -2938,15 +3135,13 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) #if defined (ILI9488_DRIVER) tft_Write_16(color); #else - SPI1U1 = mask | (15 << SPILMOSI) | (15 << SPILMISO); + SPI1U1 = (15 << SPILMOSI) | (15 << SPILMISO); SPI1W0 = (color >> 8) | (color << 8); SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} #endif - CS_H; - spi_end(); } @@ -2954,16 +3149,14 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) #if defined (ESP8266) && defined (RPI_ILI9486_DRIVER) // This is for the RPi display that needs 16 bits -void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) +void TFT_eSPI::drawPixel(int32_t x, int32_t y, uint32_t color) { - // Faster range checking, possible because x and y are unsigned - if ((x >= _width) || (y >= _height)) return; + // Range checking + if ((x < 0) || (y < 0) ||(x >= _width) || (y >= _height)) return; + spi_begin(); - CS_L; - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = SPI1U1 & mask; - SPI1U1 = mask | (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); + SPI1U1 = (CMD_BITS << SPILMOSI) | (CMD_BITS << SPILMISO); // No need to send x if it has not changed (speeds things up) if (addr_col != x) { DC_C; @@ -3032,17 +3225,16 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} - CS_H; - spi_end(); } #else // ESP32 -void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) +void TFT_eSPI::drawPixel(int32_t x, int32_t y, uint32_t color) { - // Faster range checking, possible because x and y are unsigned - if ((x >= _width) || (y >= _height)) return; + // Range checking + if ((x < 0) || (y < 0) ||(x >= _width) || (y >= _height)) return; + spi_begin(); #ifdef CGRAM_OFFSET @@ -3050,52 +3242,46 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) y+=rowstart; #endif -#if !defined (RPI_ILI9486_DRIVER) - uint32_t xaw = ((uint32_t)x << 16) | x; - uint32_t yaw = ((uint32_t)y << 16) | y; -#endif - - CS_L; + DC_C; // No need to send x if it has not changed (speeds things up) if (addr_col != x) { - DC_C; - tft_Write_8(TFT_CASET); DC_D; #if defined (RPI_ILI9486_DRIVER) - uint8_t xBin[] = { 0, (uint8_t) (x>>8), 0, (uint8_t) (x>>0), 0, (uint8_t) (x>>8), 0, (uint8_t) (x>>0), }; - SPI.writePattern(&xBin[0], 8, 1); + uint8_t xb[] = { 0, (uint8_t) (x>>8), 0, (uint8_t) (x>>0), 0, (uint8_t) (x>>8), 0, (uint8_t) (x>>0), }; + spi.writePattern(&xb[0], 8, 1); #else - tft_Write_32(xaw); + tft_Write_32(SPI_32(x, x)); #endif - + + DC_C; + addr_col = x; } // No need to send y if it has not changed (speeds things up) if (addr_row != y) { - DC_C; - tft_Write_8(TFT_PASET); DC_D; #if defined (RPI_ILI9486_DRIVER) - uint8_t yBin[] = { 0, (uint8_t) (y>>8), 0, (uint8_t) (y>>0), 0, (uint8_t) (y>>8), 0, (uint8_t) (y>>0), }; - SPI.writePattern(&yBin[0], 8, 1); + uint8_t yb[] = { 0, (uint8_t) (y>>8), 0, (uint8_t) (y>>0), 0, (uint8_t) (y>>8), 0, (uint8_t) (y>>0), }; + spi.writePattern(&yb[0], 8, 1); #else - tft_Write_32(yaw); + tft_Write_32(SPI_32(y, y)); #endif + DC_C; + addr_row = y; } - DC_C; tft_Write_8(TFT_RAMWR); @@ -3103,8 +3289,6 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color) tft_Write_16(color); - CS_H; - spi_end(); } #endif @@ -3119,12 +3303,8 @@ void TFT_eSPI::pushColor(uint16_t color) { spi_begin(); - CS_L; - tft_Write_16(color); - CS_H; - spi_end(); } @@ -3137,11 +3317,9 @@ void TFT_eSPI::pushColor(uint16_t color, uint32_t len) { spi_begin(); - CS_L; - #ifdef RPI_WRITE_STROBE uint8_t colorBin[] = { (uint8_t) (color >> 8), (uint8_t) color }; - if(len) SPI.writePattern(&colorBin[0], 2, 1); len--; + if(len) spi.writePattern(&colorBin[0], 2, 1); len--; while(len--) {WR_L; WR_H;} #else #if defined (ESP32_PARALLEL) @@ -3151,26 +3329,61 @@ void TFT_eSPI::pushColor(uint16_t color, uint32_t len) #endif #endif - CS_H; - spi_end(); } +/*************************************************************************************** +** Function name: startWrite +** Description: begin transaction with CS low, MUST later call endWrite +***************************************************************************************/ +void TFT_eSPI::startWrite(void) +{ + spi_begin(); + inTransaction = true; +} + +/*************************************************************************************** +** Function name: endWrite +** Description: end transaction with CS high +***************************************************************************************/ +void TFT_eSPI::endWrite(void) +{ + inTransaction = false; + spi_end(); +} + +/*************************************************************************************** +** Function name: writeColor (use startWrite() and endWrite() before & after) +** Description: raw write of "len" pixels avoiding transaction check +***************************************************************************************/ +void TFT_eSPI::writeColor(uint16_t color, uint32_t len) +{ +#ifdef RPI_WRITE_STROBE + uint8_t colorBin[] = { (uint8_t) (color >> 8), (uint8_t) color }; + if(len) spi.writePattern(&colorBin[0], 2, 1); len--; + while(len--) {WR_L; WR_H;} +#else + #if defined (ESP32_PARALLEL) + while (len--) {tft_Write_16(color);} + #else + writeBlock(color, len); + #endif +#endif +} + /*************************************************************************************** ** Function name: pushColors ** Description: push an array of pixels for 16 bit raw image drawing ***************************************************************************************/ -// Assumed that setWindow() has previously been called +// Assumed that setAddrWindow() has previously been called void TFT_eSPI::pushColors(uint8_t *data, uint32_t len) { spi_begin(); - CS_L; - #if defined (RPI_WRITE_STROBE) - while ( len >=64 ) {SPI.writePattern(data, 64, 1); data += 64; len -= 64; } - if (len) SPI.writePattern(data, len, 1); + while ( len >=64 ) {spi.writePattern(data, 64, 1); data += 64; len -= 64; } + if (len) spi.writePattern(data, len, 1); #else #ifdef ESP32_PARALLEL while (len--) {tft_Write_8(*data); data++;} @@ -3179,16 +3392,14 @@ void TFT_eSPI::pushColors(uint8_t *data, uint32_t len) while (len>1) {color = (*data++) | ((*data++)<<8); tft_Write_16(color); len-=2;} #else #if (SPI_FREQUENCY == 80000000) - while ( len >=64 ) {SPI.writePattern(data, 64, 1); data += 64; len -= 64; } - if (len) SPI.writePattern(data, len, 1); + while ( len >=64 ) {spi.writePattern(data, 64, 1); data += 64; len -= 64; } + if (len) spi.writePattern(data, len, 1); #else - SPI.writeBytes(data, len); + spi.writeBytes(data, len); #endif #endif #endif - CS_H; - spi_end(); } @@ -3201,23 +3412,20 @@ void TFT_eSPI::pushColors(uint16_t *data, uint32_t len, bool swap) { spi_begin(); - CS_L; - #if defined (ESP32) || defined (ILI9488_DRIVER) #if defined (ESP32_PARALLEL) || defined (ILI9488_DRIVER) if (swap) while ( len-- ) {tft_Write_16(*data); data++;} else while ( len-- ) {tft_Write_16S(*data); data++;} #else - if (swap) SPI.writePixels(data,len<<1); - else SPI.writeBytes((uint8_t*)data,len<<1); + if (swap) spi.writePixels(data,len<<1); + else spi.writeBytes((uint8_t*)data,len<<1); #endif #else uint32_t color[8]; - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); + SPI1U1 = (255 << SPILMOSI) | (255 << SPILMISO); - SPI1U1 = (SPI1U1 & mask) | (255 << SPILMOSI) | (255 << SPILMISO); while(len>15) { @@ -3272,7 +3480,7 @@ void TFT_eSPI::pushColors(uint16_t *data, uint32_t len, bool swap) memcpy(color,data,len<<1); } while(SPI1CMD & SPIBUSY) {} - SPI1U1 = (SPI1U1 & mask) | (bits << SPILMOSI) | (bits << SPILMISO); + SPI1U1 = (bits << SPILMOSI) | (bits << SPILMISO); SPI1W0 = color[0]; SPI1W1 = color[1]; SPI1W2 = color[2]; @@ -3288,8 +3496,6 @@ void TFT_eSPI::pushColors(uint16_t *data, uint32_t len, bool swap) #endif - CS_H; - spi_end(); } @@ -3305,7 +3511,7 @@ void TFT_eSPI::pushColors(uint16_t *data, uint32_t len, bool swap) void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t color) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; boolean steep = abs(y1 - y0) > abs(x1 - x0); if (steep) { @@ -3385,14 +3591,11 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t spi_begin(); - uint32_t mask = ~((SPIMMOSI << SPILMOSI) | (SPIMMISO << SPILMISO)); - mask = (SPI1U1 & mask) | (15 << SPILMOSI) | (15 << SPILMISO); - SPI1U = SPIUMOSI | SPIUSSE; int16_t swapped_color = (color >> 8) | (color << 8); if (steep) // y increments every iteration (y0 is x-axis, and x0 is y-axis) { - if (x1 >= _height) x1 = _height - 1; + if (x1 >= (int32_t)_height) x1 = _height - 1; for (; x0 <= x1; x0++) { if ((x0 >= 0) && (y0 >= 0) && (y0 < _width)) break; @@ -3405,8 +3608,7 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t if (x0 > x1) {spi_end(); return;} - setAddrWindow(y0, x0, y0, _height); - SPI1U1 = mask; + setWindow(y0, x0, y0, _height); SPI1W0 = swapped_color; for (; x0 <= x1; x0++) { while(SPI1CMD & SPIBUSY) {} @@ -3418,8 +3620,7 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t if ((y0 < 0) || (y0 >= _width)) break; err += dx; while(SPI1CMD & SPIBUSY) {} - setAddrWindow(y0, x0+1, y0, _height); - SPI1U1 = mask; + setWindow(y0, x0+1, y0, _height); SPI1W0 = swapped_color; } } @@ -3429,7 +3630,7 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t if (x1 >= _width) x1 = _width - 1; for (; x0 <= x1; x0++) { - if ((x0 >= 0) && (y0 >= 0) && (y0 < _height)) break; + if ((x0 >= 0) && (y0 >= 0) && (y0 < (int32_t)_height)) break; err -= dy; if (err < 0) { err += dx; @@ -3439,8 +3640,7 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t if (x0 > x1) {spi_end(); return;} - setAddrWindow(x0, y0, _width, y0); - SPI1U1 = mask; + setWindow(x0, y0, _width, y0); SPI1W0 = swapped_color; for (; x0 <= x1; x0++) { while(SPI1CMD & SPIBUSY) {} @@ -3449,19 +3649,17 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t err -= dy; if (err < 0) { y0 += ystep; - if ((y0 < 0) || (y0 >= _height)) break; + if ((y0 < 0) || (y0 >= (int32_t)_height)) break; err += dx; while(SPI1CMD & SPIBUSY) {} - setAddrWindow(x0+1, y0, _width, y0); - SPI1U1 = mask; + setWindow(x0+1, y0, _width, y0); SPI1W0 = swapped_color; } } } while(SPI1CMD & SPIBUSY) {} - SPI1U = SPIUMOSI | SPIUDUPLEX | SPIUSSE; - CS_H; + spi_end(); } @@ -3475,18 +3673,21 @@ void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t #if defined (ESP8266) && !defined (RPI_WRITE_STROBE) void TFT_eSPI::drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color) { - // Rudimentary clipping - if ((x >= _width) || (y >= _height) || (h < 1)) return; - if ((y + h - 1) >= _height) h = _height - y; + // Clipping + if ((x < 0) || (x >= _width) || (y >= _height)) return; + + if (y < 0) { h += y; y = 0; } + + if ((y + h) > _height) h = _height - y; + + if (h < 1) return; spi_begin(); - setAddrWindow(x, y, x, y + h - 1); + setWindow(x, y, x, y + h - 1); writeBlock(color, h); - CS_H; - spi_end(); } @@ -3494,17 +3695,21 @@ void TFT_eSPI::drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color) void TFT_eSPI::drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color) { - // Rudimentary clipping - if ((x >= _width) || (y >= _height) || (h < 1)) return; - if ((y + h - 1) >= _height) h = _height - y; + // Clipping + if ((x < 0) || (x >= _width) || (y >= _height)) return; + + if (y < 0) { h += y; y = 0; } + + if ((y + h) > _height) h = _height - y; + + if (h < 1) return; spi_begin(); - setAddrWindow(x, y, x, y + h - 1); + setWindow(x, y, x, y + h - 1); #ifdef RPI_WRITE_STROBE #if defined (ESP8266) - // SPI1U1 will already be set to transfer 16 bits by setAddrWindow() SPI1W0 = (color >> 8) | (color << 8); SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} @@ -3521,8 +3726,6 @@ void TFT_eSPI::drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color) #endif #endif - CS_H; - spi_end(); } #endif @@ -3534,18 +3737,21 @@ void TFT_eSPI::drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color) #if defined (ESP8266) && !defined (RPI_WRITE_STROBE) void TFT_eSPI::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color) { - // Rudimentary clipping - if ((x >= _width) || (y >= _height) || (w < 1)) return; - if ((x + w - 1) >= _width) w = _width - x; + // Clipping + if ((y < 0) || (x >= _width) || (y >= _height)) return; + + if (x < 0) { w += x; x = 0; } + + if ((x + w) > _width) w = _width - x; + + if (w < 1) return; spi_begin(); - setAddrWindow(x, y, x + w - 1, y); + setWindow(x, y, x + w - 1, y); writeBlock(color, w); - CS_H; - spi_end(); } @@ -3553,16 +3759,21 @@ void TFT_eSPI::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color) void TFT_eSPI::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color) { - // Rudimentary clipping - if ((x >= _width) || (y >= _height) || (w < 1)) return; - if ((x + w - 1) >= _width) w = _width - x; + // Clipping + if ((y < 0) || (x >= _width) || (y >= _height)) return; + + if (x < 0) { w += x; x = 0; } + + if ((x + w) > _width) w = _width - x; + + if (w < 1) return; spi_begin(); - setAddrWindow(x, y, x + w - 1, y); + + setWindow(x, y, x + w - 1, y); #ifdef RPI_WRITE_STROBE #if defined (ESP8266) - // SPI1U1 will already be set to transfer 16 bits by setAddrWindow() SPI1W0 = (color >> 8) | (color << 8); SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} @@ -3579,8 +3790,6 @@ void TFT_eSPI::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color) #endif #endif - CS_H; - spi_end(); } #endif @@ -3592,18 +3801,23 @@ void TFT_eSPI::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color) #if defined (ESP8266) && !defined (RPI_WRITE_STROBE) void TFT_eSPI::fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color) { - // rudimentary clipping (drawChar w/big text requires this) - if ((x > _width) || (y > _height) || (w < 1) || (h < 1)) return; - if ((x + w - 1) > _width) w = _width - x; - if ((y + h - 1) > _height) h = _height - y; + // Clipping + if ((x >= _width) || (y >= _height)) return; + + if (x < 0) { w += x; x = 0; } + if (y < 0) { h += y; y = 0; } + + if ((x + w) > _width) w = _width - x; + if ((y + h) > _height) h = _height - y; + + if ((w < 1) || (h < 1)) return; spi_begin(); - setAddrWindow(x, y, x + w - 1, y + h - 1); + + setWindow(x, y, x + w - 1, y + h - 1); writeBlock(color, w * h); - CS_H; - spi_end(); } @@ -3611,13 +3825,21 @@ void TFT_eSPI::fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t col void TFT_eSPI::fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color) { - // rudimentary clipping (drawChar w/big text requires this) - if ((x > _width) || (y > _height) || (w < 1) || (h < 1)) return; - if ((x + w - 1) > _width) w = _width - x; - if ((y + h - 1) > _height) h = _height - y; + + // Clipping + if ((x >= _width) || (y >= _height)) return; + + if (x < 0) { w += x; x = 0; } + if (y < 0) { h += y; y = 0; } + + if ((x + w) > _width) w = _width - x; + if ((y + h) > _height) h = _height - y; + + if ((w < 1) || (h < 1)) return; spi_begin(); - setAddrWindow(x, y, x + w - 1, y + h - 1); + + setWindow(x, y, x + w - 1, y + h - 1); uint32_t n = (uint32_t)w * (uint32_t)h; @@ -3641,8 +3863,6 @@ void TFT_eSPI::fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t col #endif #endif - CS_H; - spi_end(); } #endif @@ -3699,6 +3919,135 @@ void TFT_eSPI::invertDisplay(boolean i) } +/************************************************************************** +** Function name: setAttribute +** Description: Sets a control parameter of an attribute +**************************************************************************/ +void TFT_eSPI::setAttribute(uint8_t attr_id, uint8_t param) { + switch (attr_id) { + break; + case 1: + _cp437 = param; + break; + case 2: + _utf8 = param; + break; + //case 3: // TBD future feature control + // _tbd = param; + // break; + } +} + + +/************************************************************************** +** Function name: getAttribute +** Description: Get value of an attribute (control parameter) +**************************************************************************/ +uint8_t TFT_eSPI::getAttribute(uint8_t attr_id) { + switch (attr_id) { + case 1: // ON/OFF control of full CP437 character set + return _cp437; + break; + case 2: // ON/OFF control of UTF-8 decoding + return _utf8; + break; + //case 3: // TBD future feature control + // return _tbd; + // break; + } + + return false; +} + +/*************************************************************************************** +** Function name: decodeUTF8 +** Description: Serial UTF-8 decoder with fall-back to extended ASCII +*************************************************************************************x*/ +#define DECODE_UTF8 // Test only, comment out to stop decoding +uint16_t TFT_eSPI::decodeUTF8(uint8_t c) +{ +#ifdef DECODE_UTF8 + // 7 bit Unicode Code Point + if ((c & 0x80) == 0x00) { + decoderState = 0; + return (uint16_t)c; + } + + if (decoderState == 0) + { + // 11 bit Unicode Code Point + if ((c & 0xE0) == 0xC0) + { + decoderBuffer = ((c & 0x1F)<<6); + decoderState = 1; + return 0; + } + + // 16 bit Unicode Code Point + if ((c & 0xF0) == 0xE0) + { + decoderBuffer = ((c & 0x0F)<<12); + decoderState = 2; + return 0; + } + // 21 bit Unicode Code Point not supported so fall-back to extended ASCII + if ((c & 0xF8) == 0xF0) return (uint16_t)c; + } + else + { + if (decoderState == 2) + { + decoderBuffer |= ((c & 0x3F)<<6); + decoderState--; + return 0; + } + else + { + decoderBuffer |= (c & 0x3F); + decoderState = 0; + return decoderBuffer; + } + } + + decoderState = 0; +#endif + + return (uint16_t)c; // fall-back to extended ASCII +} + + +/*************************************************************************************** +** Function name: decodeUTF8 +** Description: Line buffer UTF-8 decoder with fall-back to extended ASCII +*************************************************************************************x*/ +uint16_t TFT_eSPI::decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining) +{ + uint16_t c = buf[(*index)++]; + //Serial.print("Byte from string = 0x"); Serial.println(c, HEX); + +#ifdef DECODE_UTF8 + // 7 bit Unicode + if ((c & 0x80) == 0x00) return c; + + // 11 bit Unicode + if (((c & 0xE0) == 0xC0) && (remaining > 1)) + return ((c & 0x1F)<<6) | (buf[(*index)++]&0x3F); + + // 16 bit Unicode + if (((c & 0xF0) == 0xE0) && (remaining > 2)) + { + c = ((c & 0x0F)<<12) | ((buf[(*index)++]&0x3F)<<6); + return c | ((buf[(*index)++]&0x3F)); + } + + // 21 bit Unicode not supported so fall-back to extended ASCII + // if ((c & 0xF8) == 0xF0) return c; +#endif + + return c; // fall-back to extended ASCII +} + + /*************************************************************************************** ** Function name: write ** Description: draw characters piped through serial stream @@ -3707,30 +4056,35 @@ size_t TFT_eSPI::write(uint8_t utf8) { if (utf8 == '\r') return 1; + uint16_t uniCode = utf8; + + if (_utf8) uniCode = decodeUTF8(utf8); + + if (uniCode == 0) return 1; + #ifdef SMOOTH_FONT if(fontLoaded) { - uint16_t unicode = decodeUTF8(utf8); - if (!unicode) return 0; + //Serial.print("UniCode="); Serial.println(uniCode); + //Serial.print("UTF8 ="); Serial.println(utf8); //fontFile = SPIFFS.open( _gFontFilename, "r" ); - if(!fontFile) - { - fontLoaded = false; - return 0; - } + //if(!fontFile) + //{ + // fontLoaded = false; + // return 1; + //} - drawGlyph(unicode); + drawGlyph(uniCode); //fontFile.close(); return 1; } #endif - uint8_t uniCode = utf8; // Work with a copy - if (utf8 == '\n') uniCode+=22; // Make it a valid space character to stop errors - else if (utf8 < 32) return 0; + if (uniCode == '\n') uniCode+=22; // Make it a valid space character to stop errors + else if (uniCode < 32) return 1; uint16_t width = 0; uint16_t height = 0; @@ -3750,8 +4104,8 @@ size_t TFT_eSPI::write(uint8_t utf8) #ifdef LOAD_FONT2 if (textfont == 2) { - if (utf8 > 127) return 0; - // This is 20us faster than using the fontdata structure (0.443ms per character instead of 0.465ms) + if (uniCode > 127) return 1; + width = pgm_read_byte(widtbl_f16 + uniCode-32); height = chr_hgt_f16; // Font 2 is rendered in whole byte widths so we must allow for this @@ -3767,9 +4121,8 @@ size_t TFT_eSPI::write(uint8_t utf8) { if ((textfont>2) && (textfont<9)) { - if (utf8 > 127) return 0; + if (uniCode > 127) return 1; // Uses the fontinfo struct array to avoid lots of 'if' or 'switch' statements - // A tad slower than above but this is not significant and is more convenient for the RLE fonts width = pgm_read_byte( (uint8_t *)pgm_read_dword( &(fontdata[textfont].widthtbl ) ) + uniCode-32 ); height= pgm_read_byte( &fontdata[textfont].height ); } @@ -3783,7 +4136,7 @@ size_t TFT_eSPI::write(uint8_t utf8) height = 8; } #else - if (textfont==1) return 0; + if (textfont==1) return 1; #endif height = height * textsize; @@ -3799,7 +4152,7 @@ size_t TFT_eSPI::write(uint8_t utf8) cursor_y += height; cursor_x = 0; } - if (textwrapY && (cursor_y >= _height)) cursor_y = 0; + if (textwrapY && (cursor_y >= (int32_t)_height)) cursor_y = 0; cursor_x += drawChar(uniCode, cursor_x, cursor_y, textfont); } @@ -3808,16 +4161,15 @@ size_t TFT_eSPI::write(uint8_t utf8) } // Custom GFX font else { - if(utf8 == '\n') { cursor_x = 0; cursor_y += (int16_t)textsize * (uint8_t)pgm_read_byte(&gfxFont->yAdvance); } else { - if (uniCode > (uint8_t)pgm_read_byte(&gfxFont->last )) return 0; - if (uniCode < (uint8_t)pgm_read_byte(&gfxFont->first)) return 0; + if (uniCode > pgm_read_word(&gfxFont->last )) return 1; + if (uniCode < pgm_read_word(&gfxFont->first)) return 1; - uint8_t c2 = uniCode - pgm_read_byte(&gfxFont->first); + uint16_t c2 = uniCode - pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]); uint8_t w = pgm_read_byte(&glyph->width), h = pgm_read_byte(&glyph->height); @@ -3829,7 +4181,7 @@ size_t TFT_eSPI::write(uint8_t utf8) cursor_y += (int16_t)textsize * (uint8_t)pgm_read_byte(&gfxFont->yAdvance); } - if (textwrapY && (cursor_y >= _height)) cursor_y = 0; + if (textwrapY && (cursor_y >= (int32_t)_height)) cursor_y = 0; drawChar(cursor_x, cursor_y, uniCode, textcolor, textbgcolor, textsize); } cursor_x += pgm_read_byte(&glyph->xAdvance) * (int16_t)textsize; @@ -3844,15 +4196,18 @@ size_t TFT_eSPI::write(uint8_t utf8) /*************************************************************************************** ** Function name: drawChar -** Description: draw a Unicode onto the screen +** Description: draw a Unicode glyph onto the screen ***************************************************************************************/ -int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y) + // Any UTF-8 decoding must be done before calling drawChar() +int16_t TFT_eSPI::drawChar(uint16_t uniCode, int32_t x, int32_t y) { - return drawChar(uniCode, x, y, textfont); + return drawChar(uniCode, x, y, textfont); } -int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) + // Any UTF-8 decoding must be done before calling drawChar() +int16_t TFT_eSPI::drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font) { + if (!uniCode) return 0; if (font==1) { @@ -3878,9 +4233,9 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) } else { - if((uniCode >= pgm_read_byte(&gfxFont->first)) && (uniCode <= pgm_read_byte(&gfxFont->last) )) + if((uniCode >= pgm_read_word(&gfxFont->first)) && (uniCode <= pgm_read_word(&gfxFont->last) )) { - uint8_t c2 = uniCode - pgm_read_byte(&gfxFont->first); + uint16_t c2 = uniCode - pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]); return pgm_read_byte(&glyph->xAdvance) * textsize; } @@ -3894,15 +4249,14 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) if ((font>1) && (font<9) && ((uniCode < 32) || (uniCode > 127))) return 0; - int width = 0; - int height = 0; + int32_t width = 0; + int32_t height = 0; uint32_t flash_address = 0; uniCode -= 32; #ifdef LOAD_FONT2 if (font == 2) { - // This is faster than using the fontdata structure flash_address = pgm_read_dword(&chrtbl_f16[uniCode]); width = pgm_read_byte(widtbl_f16 + uniCode); height = chr_hgt_f16; @@ -3916,7 +4270,6 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) { if ((font>2) && (font<9)) { - // This is slower than above but is more convenient for the RLE fonts flash_address = pgm_read_dword( pgm_read_dword( &(fontdata[font].chartbl ) ) + uniCode*sizeof(void *) ); width = pgm_read_byte( (uint8_t *)pgm_read_dword( &(fontdata[font].widthtbl ) ) + uniCode ); height= pgm_read_byte( &fontdata[font].height ); @@ -3924,9 +4277,9 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) } #endif - int w = width; - int pX = 0; - int pY = y; + int32_t w = width; + int32_t pX = 0; + int32_t pY = y; uint8_t line = 0; #ifdef LOAD_FONT2 // chop out code if we do not need it @@ -3936,14 +4289,14 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) if (x + width * textsize >= (int16_t)_width) return width * textsize ; if (textcolor == textbgcolor || textsize != 1) { - spi_begin(); + //spi_begin(); // Sprite class can use this function, avoiding spi_begin() inTransaction = true; - for (int i = 0; i < height; i++) + for (int32_t i = 0; i < height; i++) { if (textcolor != textbgcolor) fillRect(x, pY, width * textsize, textsize, textbgcolor); - for (int k = 0; k < w; k++) + for (int32_t k = 0; k < w; k++) { line = pgm_read_byte((uint8_t *)flash_address + w * i + k); if (line) { @@ -3981,12 +4334,13 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) // Faster drawing of characters and background using block write { spi_begin(); - setAddrWindow(x, y, (x + w * 8) - 1, y + height - 1); + + setWindow(x, y, (x + w * 8) - 1, y + height - 1); uint8_t mask; - for (int i = 0; i < height; i++) + for (int32_t i = 0; i < height; i++) { - for (int k = 0; k < w; k++) + for (int32_t k = 0; k < w; k++) { line = pgm_read_byte((uint8_t *)flash_address + w * i + k); pX = x + k * 8; @@ -4000,7 +4354,6 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) pY += textsize; } - CS_H; spi_end(); } } @@ -4014,12 +4367,13 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) // Font is not 2 and hence is RLE encoded { spi_begin(); + inTransaction = true; w *= height; // Now w is total number of pixels in the character if ((textsize != 1) || (textcolor == textbgcolor)) { if (textcolor != textbgcolor) fillRect(x, pY, width * textsize, textsize * height, textbgcolor); - int px = 0, py = pY; // To hold character block start and end column and row values - int pc = 0; // Pixel count + int32_t px = 0, py = pY; // To hold character block start and end column and row values + int32_t pc = 0; // Pixel count uint8_t np = textsize * textsize; // Number of pixels in a drawn pixel uint8_t tnp = 0; // Temporary copy of np for while loop @@ -4043,7 +4397,7 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) } while (line--) { // In this case the while(line--) is faster pc++; // This is faster than putting pc+=line before while()? - setAddrWindow(px, py, px + ts, py + ts); + setWindow(px, py, px + ts, py + ts); if (ts) { tnp = np; @@ -4064,15 +4418,11 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) pc += line; } } - - CS_H; - spi_end(); } else // Text colour != background && textsize = 1 // so use faster drawing of characters and background using block write { - //spi_begin(); - setAddrWindow(x, y, x + width - 1, y + height - 1); + setWindow(x, y, x + width - 1, y + height - 1); #ifdef RPI_WRITE_STROBE uint8_t textcolorBin[] = { (uint8_t) (textcolor >> 8), (uint8_t) textcolor }; @@ -4087,7 +4437,7 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) line &= 0x7F; line++; w -= line; #ifdef RPI_WRITE_STROBE - SPI.writePattern(&textcolorBin[0], 2, 1); line--; + spi.writePattern(&textcolorBin[0], 2, 1); line--; while(line--) {WR_L; WR_H;} #else #ifdef ESP32_PARALLEL @@ -4100,7 +4450,7 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) else { line++; w -= line; #ifdef RPI_WRITE_STROBE - SPI.writePattern(&textbgcolorBin[0], 2, 1); line--; + spi.writePattern(&textbgcolorBin[0], 2, 1); line--; while(line--) {WR_L; WR_H;} #else #ifdef ESP32_PARALLEL @@ -4111,9 +4461,9 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) #endif } } - CS_H; - spi_end(); } + inTransaction = false; + spi_end(); } // End of RLE font rendering #endif @@ -4126,7 +4476,7 @@ int16_t TFT_eSPI::drawChar(unsigned int uniCode, int x, int y, int font) ** Description : draw string with padding if it is defined ***************************************************************************************/ // Without font number, uses font set by setTextFont() -int16_t TFT_eSPI::drawString(const String& string, int poX, int poY) +int16_t TFT_eSPI::drawString(const String& string, int32_t poX, int32_t poY) { int16_t len = string.length() + 2; char buffer[len]; @@ -4134,7 +4484,7 @@ int16_t TFT_eSPI::drawString(const String& string, int poX, int poY) return drawString(buffer, poX, poY, textfont); } // With font number -int16_t TFT_eSPI::drawString(const String& string, int poX, int poY, int font) +int16_t TFT_eSPI::drawString(const String& string, int32_t poX, int32_t poY, uint8_t font) { int16_t len = string.length() + 2; char buffer[len]; @@ -4143,12 +4493,13 @@ int16_t TFT_eSPI::drawString(const String& string, int poX, int poY, int font) } // Without font number, uses font set by setTextFont() -int16_t TFT_eSPI::drawString(const char *string, int poX, int poY) +int16_t TFT_eSPI::drawString(const char *string, int32_t poX, int32_t poY) { return drawString(string, poX, poY, textfont); } -// With font number -int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) + +// With font number. Note: font number is over-ridden if a smooth font is loaded +int16_t TFT_eSPI::drawString(const char *string, int32_t poX, int32_t poY, uint8_t font) { int16_t sumX = 0; uint8_t padding = 1, baseline = 0; @@ -4156,38 +4507,42 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) uint16_t cheight = 8 * textsize; #ifdef LOAD_GFXFF - if (font == 1) { - if(gfxFont) { - cheight = glyph_ab * textsize; - poY += cheight; // Adjust for baseline datum of free fonts - baseline = cheight; - padding =101; // Different padding method used for Free Fonts + #ifdef SMOOTH_FONT + bool freeFont = (font == 1 && gfxFont && !fontLoaded); + #else + bool freeFont = (font == 1 && gfxFont); + #endif - // We need to make an adjustment for the bottom of the string (eg 'y' character) - if ((textdatum == BL_DATUM) || (textdatum == BC_DATUM) || (textdatum == BR_DATUM)) { - cheight += glyph_bb * textsize; - } + if (freeFont) { + cheight = glyph_ab * textsize; + poY += cheight; // Adjust for baseline datum of free fonts + baseline = cheight; + padding =101; // Different padding method used for Free Fonts + + // We need to make an adjustment for the bottom of the string (eg 'y' character) + if ((textdatum == BL_DATUM) || (textdatum == BC_DATUM) || (textdatum == BR_DATUM)) { + cheight += glyph_bb * textsize; } } #endif + + // If it is not font 1 (GLCD or free font) get the baseline and pixel height of the font +#ifdef SMOOTH_FONT + if(fontLoaded) { + baseline = gFont.maxAscent; + cheight = fontHeight(); + } + else +#endif + if (font!=1) { + baseline = pgm_read_byte( &fontdata[font].baseline ) * textsize; + cheight = fontHeight(font); + } + if (textdatum || padX) { - // If it is not font 1 (GLCD or free font) get the baseline and pixel height of the font -#ifdef SMOOTH_FONT - if(fontLoaded) { - baseline = gFont.maxAscent; - cheight = fontHeight(0); - } - - else -#endif - if (font!=1) { - baseline = pgm_read_byte( &fontdata[font].baseline ) * textsize; - cheight = fontHeight(font); - } - switch(textdatum) { case TC_DATUM: poX -= cwidth/2; @@ -4250,14 +4605,19 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) int8_t xo = 0; #ifdef LOAD_GFXFF - if ((font == 1) && (gfxFont) && (textcolor!=textbgcolor)) + if (freeFont && (textcolor!=textbgcolor)) { cheight = (glyph_ab + glyph_bb) * textsize; // Get the offset for the first character only to allow for negative offsets - uint8_t c2 = *string; - if((c2 >= pgm_read_byte(&gfxFont->first)) && (c2 <= pgm_read_byte(&gfxFont->last) )) + uint16_t c2 = 0; + uint16_t len = strlen(string); + uint16_t n = 0; + + while (n < len && c2 == 0) c2 = decodeUTF8((uint8_t*)string, &n, len - n); + + if((c2 >= pgm_read_word(&gfxFont->first)) && (c2 <= pgm_read_word(&gfxFont->last) )) { - c2 -= pgm_read_byte(&gfxFont->first); + c2 -= pgm_read_word(&gfxFont->first); GFXglyph *glyph = &(((GFXglyph *)pgm_read_dword(&gfxFont->glyph))[c2]); xo = pgm_read_byte(&glyph->xOffset) * textsize; // Adjust for negative xOffset @@ -4272,6 +4632,9 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) } #endif + uint16_t len = strlen(string); + uint16_t n = 0; + #ifdef SMOOTH_FONT if(fontLoaded) { @@ -4280,20 +4643,26 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) //drawLine(poX, poY - 5, poX, poY + 5, TFT_GREEN); //fontFile = SPIFFS.open( _gFontFilename, "r"); if(!fontFile) return 0; - uint16_t len = strlen(string); - uint16_t n = 0; + setCursor(poX, poY); + while (n < len) { - uint16_t unicode = decodeUTF8((uint8_t*)string, &n, len - n); - drawGlyph(unicode); + uint16_t uniCode = decodeUTF8((uint8_t*)string, &n, len - n); + drawGlyph(uniCode); } sumX += cwidth; //fontFile.close(); } else #endif - while (*string) sumX += drawChar(*(string++), poX+sumX, poY, font); + { + while (n < len) + { + uint16_t uniCode = decodeUTF8((uint8_t*)string, &n, len - n); + sumX += drawChar(uniCode, poX+sumX, poY, font); + } + } //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DEBUG vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // Switch on debugging for the padding areas @@ -4306,10 +4675,11 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) { int16_t padXc = poX+cwidth+xo; #ifdef LOAD_GFXFF - if ((font == 1) && (gfxFont)) + if (freeFont) { poX +=xo; // Adjust for negative offset start character poY -= glyph_ab * textsize; + sumX += poX; } #endif switch(padding) { @@ -4370,7 +4740,7 @@ return sumX; ** Function name: drawCentreString (deprecated, use setTextDatum()) ** Descriptions: draw string centred on dX ***************************************************************************************/ -int16_t TFT_eSPI::drawCentreString(const String& string, int dX, int poY, int font) +int16_t TFT_eSPI::drawCentreString(const String& string, int32_t dX, int32_t poY, uint8_t font) { int16_t len = string.length() + 2; char buffer[len]; @@ -4378,10 +4748,10 @@ int16_t TFT_eSPI::drawCentreString(const String& string, int dX, int poY, int fo return drawCentreString(buffer, dX, poY, font); } -int16_t TFT_eSPI::drawCentreString(const char *string, int dX, int poY, int font) +int16_t TFT_eSPI::drawCentreString(const char *string, int32_t dX, int32_t poY, uint8_t font) { uint8_t tempdatum = textdatum; - int sumX = 0; + int32_t sumX = 0; textdatum = TC_DATUM; sumX = drawString(string, dX, poY, font); textdatum = tempdatum; @@ -4393,7 +4763,7 @@ int16_t TFT_eSPI::drawCentreString(const char *string, int dX, int poY, int font ** Function name: drawRightString (deprecated, use setTextDatum()) ** Descriptions: draw string right justified to dX ***************************************************************************************/ -int16_t TFT_eSPI::drawRightString(const String& string, int dX, int poY, int font) +int16_t TFT_eSPI::drawRightString(const String& string, int32_t dX, int32_t poY, uint8_t font) { int16_t len = string.length() + 2; char buffer[len]; @@ -4401,7 +4771,7 @@ int16_t TFT_eSPI::drawRightString(const String& string, int dX, int poY, int fon return drawRightString(buffer, dX, poY, font); } -int16_t TFT_eSPI::drawRightString(const char *string, int dX, int poY, int font) +int16_t TFT_eSPI::drawRightString(const char *string, int32_t dX, int32_t poY, uint8_t font) { uint8_t tempdatum = textdatum; int16_t sumX = 0; @@ -4416,15 +4786,17 @@ int16_t TFT_eSPI::drawRightString(const char *string, int dX, int poY, int font) ** Function name: drawNumber ** Description: draw a long integer ***************************************************************************************/ -int16_t TFT_eSPI::drawNumber(long long_num, int poX, int poY) +int16_t TFT_eSPI::drawNumber(long long_num, int32_t poX, int32_t poY) { + isDigits = true; // Eliminate jiggle in monospaced fonts char str[12]; ltoa(long_num, str, 10); return drawString(str, poX, poY, textfont); } -int16_t TFT_eSPI::drawNumber(long long_num, int poX, int poY, int font) +int16_t TFT_eSPI::drawNumber(long long_num, int32_t poX, int32_t poY, uint8_t font) { + isDigits = true; // Eliminate jiggle in monospaced fonts char str[12]; ltoa(long_num, str, 10); return drawString(str, poX, poY, font); @@ -4437,13 +4809,14 @@ int16_t TFT_eSPI::drawNumber(long long_num, int poX, int poY, int font) ***************************************************************************************/ // Assemble and print a string, this permits alignment relative to a datum // looks complicated but much more compact and actually faster than using print class -int16_t TFT_eSPI::drawFloat(float floatNumber, int dp, int poX, int poY) +int16_t TFT_eSPI::drawFloat(float floatNumber, uint8_t dp, int32_t poX, int32_t poY) { return drawFloat(floatNumber, dp, poX, poY, textfont); } -int16_t TFT_eSPI::drawFloat(float floatNumber, int dp, int poX, int poY, int font) +int16_t TFT_eSPI::drawFloat(float floatNumber, uint8_t dp, int32_t poX, int32_t poY, uint8_t font) { + isDigits = true; char str[14]; // Array to contain decimal string uint8_t ptr = 0; // Initialise pointer for array int8_t digits = 1; // Count the digits to avoid array overflow @@ -4472,7 +4845,7 @@ int16_t TFT_eSPI::drawFloat(float floatNumber, int dp, int poX, int poY, int fon // No chance of overflow from here on // Get integer part - unsigned long temp = (unsigned long)floatNumber; + uint32_t temp = (uint32_t)floatNumber; // Put integer part into array ltoa(temp, str + ptr, 10); @@ -4520,7 +4893,7 @@ void TFT_eSPI::setFreeFont(const GFXfont *f) glyph_ab = 0; glyph_bb = 0; - uint8_t numChars = pgm_read_byte(&gfxFont->last) - pgm_read_byte(&gfxFont->first); + uint16_t numChars = pgm_read_word(&gfxFont->last) - pgm_read_word(&gfxFont->first); // Find the biggest above and below baseline offsets for (uint8_t c = 0; c < numChars; c++) @@ -4572,7 +4945,7 @@ void TFT_eSPI::setTextFont(uint8_t f) /*************************************************************************************** -** Function name: spiBlockWrite +** Function name: writeBlock ** Description: Write a block of pixels of the same colour ***************************************************************************************/ //Clear screen test 76.8ms theoretical. 81.5ms TFT_eSPI, 967ms Adafruit_ILI9341 @@ -4586,9 +4959,6 @@ void writeBlock(uint16_t color, uint32_t repeat) { uint16_t color16 = (color >> 8) | (color << 8); uint32_t color32 = color16 | color16 << 16; - uint32_t mask = ~(SPIMMOSI << SPILMOSI); - mask = SPI1U1 & mask; - SPI1U = SPIUMOSI | SPIUSSE; SPI1W0 = color32; SPI1W1 = color32; @@ -4617,7 +4987,7 @@ void writeBlock(uint16_t color, uint32_t repeat) } if (repeat > 31) { - SPI1U1 = mask | (511 << SPILMOSI); + SPI1U1 = (511 << SPILMOSI); while(repeat>31) { #if defined SPI_FREQUENCY && (SPI_FREQUENCY == 80000000) @@ -4633,12 +5003,11 @@ void writeBlock(uint16_t color, uint32_t repeat) if (repeat) { repeat = (repeat << 4) - 1; - SPI1U1 = mask | (repeat << SPILMOSI); + SPI1U1 = (repeat << SPILMOSI); SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} } - SPI1U = SPIUMOSI | SPIUDUPLEX | SPIUSSE; } #elif defined (ILI9488_DRIVER) @@ -4647,10 +5016,6 @@ void writeBlock(uint16_t color, uint32_t repeat) void writeBlock(uint16_t color, uint32_t repeat) { - uint32_t mask = ~(SPIMMOSI << SPILMOSI); - mask = SPI1U1 & mask; - SPI1U = SPIUMOSI | SPIUSSE; - // Split out the colours uint8_t r = (color & 0xF800)>>8; uint8_t g = (color & 0x07E0)>>3; @@ -4689,7 +5054,7 @@ void writeBlock(uint16_t color, uint32_t repeat) if (repeat > 20) { - SPI1U1 = mask | (503 << SPILMOSI); + SPI1U1 = (503 << SPILMOSI); while(repeat>20) { while(SPI1CMD & SPIBUSY) {} @@ -4702,18 +5067,14 @@ void writeBlock(uint16_t color, uint32_t repeat) if (repeat) { repeat = (repeat * 24) - 1; - SPI1U1 = mask | (repeat << SPILMOSI); + SPI1U1 = (repeat << SPILMOSI); SPI1CMD |= SPIBUSY; while(SPI1CMD & SPIBUSY) {} } - SPI1U = SPIUMOSI | SPIUDUPLEX | SPIUSSE; } #else // Now the code for ESP32 and ILI9488 -#include "soc/spi_reg.h" -#define SPI_NUM 0x3 - void writeBlock(uint16_t color, uint32_t repeat) { // Split out the colours @@ -4727,56 +5088,56 @@ void writeBlock(uint16_t color, uint32_t repeat) if (repeat > 19) { - SET_PERI_REG_BITS(SPI_MOSI_DLEN_REG(SPI_NUM), SPI_USR_MOSI_DBITLEN, 479, SPI_USR_MOSI_DBITLEN_S); + SET_PERI_REG_BITS(SPI_MOSI_DLEN_REG(SPI_PORT), SPI_USR_MOSI_DBITLEN, 479, SPI_USR_MOSI_DBITLEN_S); while(repeat>19) { - while (READ_PERI_REG(SPI_CMD_REG(SPI_NUM))&SPI_USR); - WRITE_PERI_REG(SPI_W0_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W1_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W2_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W3_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W4_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W5_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W6_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W7_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W8_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W9_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W10_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W11_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W12_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W13_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W14_REG(SPI_NUM), r2); - SET_PERI_REG_MASK(SPI_CMD_REG(SPI_NUM), SPI_USR); + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W1_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W2_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W3_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W4_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W5_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W6_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W7_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W8_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W9_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W10_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W11_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W12_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W13_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W14_REG(SPI_PORT), r2); + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); repeat -= 20; } - while (READ_PERI_REG(SPI_CMD_REG(SPI_NUM))&SPI_USR); + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); } if (repeat) { - SET_PERI_REG_BITS(SPI_MOSI_DLEN_REG(SPI_NUM), SPI_USR_MOSI_DBITLEN, (repeat * 24) - 1, SPI_USR_MOSI_DBITLEN_S); - WRITE_PERI_REG(SPI_W0_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W1_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W2_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W3_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W4_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W5_REG(SPI_NUM), r2); + SET_PERI_REG_BITS(SPI_MOSI_DLEN_REG(SPI_PORT), SPI_USR_MOSI_DBITLEN, (repeat * 24) - 1, SPI_USR_MOSI_DBITLEN_S); + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W1_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W2_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W3_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W4_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W5_REG(SPI_PORT), r2); if (repeat > 8 ) { - WRITE_PERI_REG(SPI_W6_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W7_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W8_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W9_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W10_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W11_REG(SPI_NUM), r2); - WRITE_PERI_REG(SPI_W12_REG(SPI_NUM), r0); - WRITE_PERI_REG(SPI_W13_REG(SPI_NUM), r1); - WRITE_PERI_REG(SPI_W14_REG(SPI_NUM), r2); + WRITE_PERI_REG(SPI_W6_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W7_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W8_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W9_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W10_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W11_REG(SPI_PORT), r2); + WRITE_PERI_REG(SPI_W12_REG(SPI_PORT), r0); + WRITE_PERI_REG(SPI_W13_REG(SPI_PORT), r1); + WRITE_PERI_REG(SPI_W14_REG(SPI_PORT), r2); } - SET_PERI_REG_MASK(SPI_CMD_REG(SPI_NUM), SPI_USR); - while (READ_PERI_REG(SPI_CMD_REG(SPI_NUM))&SPI_USR); + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); } } @@ -4784,38 +5145,58 @@ void writeBlock(uint16_t color, uint32_t repeat) #else // Low level register based ESP32 code for 16 bit colour SPI TFTs -#include "soc/spi_reg.h" -#define SPI_NUM 0x3 - - void writeBlock(uint16_t color, uint32_t repeat) { - uint16_t color16 = (color >> 8) | (color << 8); - uint32_t color32 = color16 | color16 << 16; + uint32_t color32 = COL_32(color, color); - if (repeat > 15) + if (repeat > 31) // Revert legacy toggle buffer change { - SET_PERI_REG_BITS(SPI_MOSI_DLEN_REG(SPI_NUM), SPI_USR_MOSI_DBITLEN, 255, SPI_USR_MOSI_DBITLEN_S); - - while(repeat>15) + WRITE_PERI_REG(SPI_MOSI_DLEN_REG(SPI_PORT), 511); + while(repeat>31) { - while (READ_PERI_REG(SPI_CMD_REG(SPI_NUM))&SPI_USR); - for (uint32_t i=0; i<8; i++) WRITE_PERI_REG((SPI_W0_REG(SPI_NUM) + (i << 2)), color32); - SET_PERI_REG_MASK(SPI_CMD_REG(SPI_NUM), SPI_USR); - repeat -= 16; + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W1_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W2_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W3_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W4_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W5_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W6_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W7_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W8_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W9_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W10_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W11_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W12_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W13_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W14_REG(SPI_PORT), color32); + WRITE_PERI_REG(SPI_W15_REG(SPI_PORT), color32); + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); + repeat -= 32; } - while (READ_PERI_REG(SPI_CMD_REG(SPI_NUM))&SPI_USR); + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); } if (repeat) { - repeat = (repeat << 4) - 1; - SET_PERI_REG_BITS(SPI_MOSI_DLEN_REG(SPI_NUM), SPI_USR_MOSI_DBITLEN, repeat, SPI_USR_MOSI_DBITLEN_S); - for (uint32_t i=0; i<8; i++) WRITE_PERI_REG((SPI_W0_REG(SPI_NUM) + (i << 2)), color32); - SET_PERI_REG_MASK(SPI_CMD_REG(SPI_NUM), SPI_USR); - while (READ_PERI_REG(SPI_CMD_REG(SPI_NUM))&SPI_USR); + // Revert toggle buffer change + WRITE_PERI_REG(SPI_MOSI_DLEN_REG(SPI_PORT), (repeat << 4) - 1); + for (uint32_t i=0; i <= (repeat>>1); i++) WRITE_PERI_REG((SPI_W0_REG(SPI_PORT) + (i << 2)), color32); + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); } +} +#endif + +/*************************************************************************************** +** Function name: getSPIinstance +** Description: Get the instance of the SPI class (for ESP32 only) +***************************************************************************************/ +#ifndef ESP32_PARALLEL +SPIClass& TFT_eSPI::getSPIinstance(void) +{ + return spi; } #endif @@ -4826,6 +5207,7 @@ void writeBlock(uint16_t color, uint32_t repeat) ***************************************************************************************/ void TFT_eSPI::getSetup(setup_t &tft_settings) { +// tft_settings.version is set in header file #if defined (ESP8266) tft_settings.esp = 8266; @@ -4847,6 +5229,9 @@ void TFT_eSPI::getSetup(setup_t &tft_settings) #else tft_settings.serial = true; tft_settings.tft_spi_freq = SPI_FREQUENCY/100000; + #ifdef SPI_READ_FREQUENCY + tft_settings.tft_rd_freq = SPI_READ_FREQUENCY/100000; + #endif #endif #if defined(TFT_SPI_OVERLAP) diff --git a/TFT_eSPI.h b/TFT_eSPI.h index 5729a37..0756d39 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -15,6 +15,8 @@ #ifndef _TFT_eSPIH_ #define _TFT_eSPIH_ +#define TFT_ESPI_VERSION "1.4.5" + //#define ESP32 //Just used to test ESP32 options // Include header file that defines the fonts loaded, the TFT drivers @@ -35,7 +37,7 @@ #define SPI_READ_FREQUENCY SPI_FREQUENCY #endif -#ifdef ST7789_DRIVER +#if defined(ST7789_DRIVER) || defined(ST7789_2_DRIVER) #define TFT_SPI_MODE SPI_MODE3 #else #define TFT_SPI_MODE SPI_MODE0 @@ -103,6 +105,15 @@ #include +#ifdef ESP32 + #include "soc/spi_reg.h" + #ifdef USE_HSPI_PORT + #define SPI_PORT HSPI + #else + #define SPI_PORT VSPI + #endif +#endif + #ifdef SMOOTH_FONT // Call up the SPIFFS FLASH filing system for the anti-aliased fonts #define FS_NO_GLOBALS @@ -117,7 +128,7 @@ #define DC_C // No macro allocated so it generates no code #define DC_D // No macro allocated so it generates no code #else - #if defined (ESP8266) && defined (D0_USED_FOR_DC) + #if defined (ESP8266) && (TFT_DC == 16) #define DC_C digitalWrite(TFT_DC, LOW) #define DC_D digitalWrite(TFT_DC, HIGH) #elif defined (ESP32) @@ -127,16 +138,26 @@ #else #if TFT_DC >= 32 - #define DC_C GPIO.out1_w1ts.val = (1 << (TFT_DC - 32)); \ - GPIO.out1_w1tc.val = (1 << (TFT_DC - 32)) - #define DC_D GPIO.out1_w1tc.val = (1 << (TFT_DC - 32)); \ - GPIO.out1_w1ts.val = (1 << (TFT_DC - 32)) + #ifdef RPI_ILI9486_DRIVER // RPi display needs a slower DC change + #define DC_C GPIO.out1_w1ts.val = (1 << (TFT_DC - 32)); \ + GPIO.out1_w1tc.val = (1 << (TFT_DC - 32)) + #define DC_D GPIO.out1_w1tc.val = (1 << (TFT_DC - 32)); \ + GPIO.out1_w1ts.val = (1 << (TFT_DC - 32)) + #else + #define DC_C GPIO.out1_w1tc.val = (1 << (TFT_DC - 32))//;GPIO.out1_w1tc.val = (1 << (TFT_DC - 32)) + #define DC_D GPIO.out1_w1ts.val = (1 << (TFT_DC - 32))//;GPIO.out1_w1ts.val = (1 << (TFT_DC - 32)) + #endif #else #if TFT_DC >= 0 - #define DC_C GPIO.out_w1ts = (1 << TFT_DC); \ - GPIO.out_w1tc = (1 << TFT_DC) - #define DC_D GPIO.out_w1tc = (1 << TFT_DC); \ - GPIO.out_w1ts = (1 << TFT_DC) + #ifdef RPI_ILI9486_DRIVER // RPi display needs a slower DC change + #define DC_C GPIO.out_w1ts = (1 << TFT_DC); \ + GPIO.out_w1tc = (1 << TFT_DC) + #define DC_D GPIO.out_w1tc = (1 << TFT_DC); \ + GPIO.out_w1ts = (1 << TFT_DC) + #else + #define DC_C GPIO.out_w1tc = (1 << TFT_DC)//;GPIO.out_w1tc = (1 << TFT_DC) + #define DC_D GPIO.out_w1ts = (1 << TFT_DC)//;GPIO.out_w1ts = (1 << TFT_DC) + #endif #else #define DC_C #define DC_D @@ -151,13 +172,20 @@ #if defined (TFT_SPI_OVERLAP) #undef TFT_CS + #define SPI1U_WRITE (SPIUMOSI | SPIUSSE | SPIUCSSETUP | SPIUCSHOLD) + #define SPI1U_READ (SPIUMOSI | SPIUSSE | SPIUCSSETUP | SPIUCSHOLD | SPIUDUPLEX) +#else + #ifdef ESP8266 + #define SPI1U_WRITE (SPIUMOSI | SPIUSSE) + #define SPI1U_READ (SPIUMOSI | SPIUSSE | SPIUDUPLEX) + #endif #endif #ifndef TFT_CS #define CS_L // No macro allocated so it generates no code #define CS_H // No macro allocated so it generates no code #else - #if defined (ESP8266) && defined (D0_USED_FOR_CS) + #if defined (ESP8266) && (TFT_CS == 16) #define CS_L digitalWrite(TFT_CS, LOW) #define CS_H digitalWrite(TFT_CS, HIGH) #elif defined (ESP32) @@ -166,14 +194,24 @@ #define CS_H #else #if TFT_CS >= 32 - #define CS_L GPIO.out1_w1ts.val = (1 << (TFT_CS - 32)); \ - GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)) - #define CS_H GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)); \ - GPIO.out1_w1ts.val = (1 << (TFT_CS - 32)) + #ifdef RPI_ILI9486_DRIVER // RPi display needs a slower CS change + #define CS_L GPIO.out1_w1ts.val = (1 << (TFT_CS - 32)); \ + GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)) + #define CS_H GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)); \ + GPIO.out1_w1ts.val = (1 << (TFT_CS - 32)) + #else + #define CS_L GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)); GPIO.out1_w1tc.val = (1 << (TFT_CS - 32)) + #define CS_H GPIO.out1_w1ts.val = (1 << (TFT_CS - 32))//;GPIO.out1_w1ts.val = (1 << (TFT_CS - 32)) + #endif #else #if TFT_CS >= 0 - #define CS_L GPIO.out_w1ts = (1 << TFT_CS);GPIO.out_w1tc = (1 << TFT_CS) - #define CS_H GPIO.out_w1tc = (1 << TFT_CS);GPIO.out_w1ts = (1 << TFT_CS) + #ifdef RPI_ILI9486_DRIVER // RPi display needs a slower CS change + #define CS_L GPIO.out_w1ts = (1 << TFT_CS); GPIO.out_w1tc = (1 << TFT_CS) + #define CS_H GPIO.out_w1tc = (1 << TFT_CS); GPIO.out_w1ts = (1 << TFT_CS) + #else + #define CS_L GPIO.out_w1tc = (1 << TFT_CS);GPIO.out_w1tc = (1 << TFT_CS) + #define CS_H GPIO.out_w1ts = (1 << TFT_CS)//;GPIO.out_w1ts = (1 << TFT_CS) + #endif #else #define CS_L #define CS_H @@ -186,6 +224,26 @@ #endif #endif +// Use single register write for CS_L and DC_C if pins are both in range 0-31 +#ifdef ESP32 + #ifdef TFT_CS + #if (TFT_CS >= 0) && (TFT_CS < 32) && (TFT_DC >= 0) && (TFT_DC < 32) + #ifdef RPI_ILI9486_DRIVER // RPi display needs a slower CD and DC change + #define CS_L_DC_C GPIO.out_w1tc = ((1 << TFT_CS) | (1 << TFT_DC)); \ + GPIO.out_w1tc = ((1 << TFT_CS) | (1 << TFT_DC)) + #else + #define CS_L_DC_C GPIO.out_w1tc = ((1 << TFT_CS) | (1 << TFT_DC)); GPIO.out_w1tc = ((1 << TFT_CS) | (1 << TFT_DC)) + #endif + #else + #define CS_L_DC_C CS_L; DC_C + #endif + #else + #define CS_L_DC_C CS_L; DC_C + #endif +#else // ESP8266 + #define CS_L_DC_C CS_L; DC_C +#endif + // chip select signal for touchscreen #ifndef TOUCH_CS #define T_CS_L // No macro allocated so it generates no code @@ -206,6 +264,20 @@ #endif #endif +#ifdef ESP8266 + // Concatenate two 16 bit values for the SPI 32 bit register write + #define SPI_32(H,L) ( (H)<<16 | (L) ) + #define COL_32(H,L) ( (H)<<16 | (L) ) +#else + #if defined (ESP32_PARALLEL) || defined (ILI9488_DRIVER) + #define SPI_32(H,L) ( (H)<<16 | (L) ) + #else + #define SPI_32(H,L) ( ((H)<<8 | (H)>>8) | (((L)<<8 | (L)>>8)<<16 ) ) + #endif + // Swap byte order for concatenated 16 bit colors + // AB CD -> DCBA for 32 bit register write + #define COL_32(H,L) ( ((H)<<8 | (H)>>8) | (((L)<<8 | (L)>>8)<<16 ) ) +#endif #if defined (ESP32) && defined (ESP32_PARALLEL) // Mask for the 8 data bits to set pin directions @@ -230,7 +302,7 @@ #define tft_Write_16(C) WR_L;GPIO.out_w1tc = clr_mask; GPIO.out_w1ts = set_mask((uint8_t)(C >> 0)); WR_H #else #define tft_Write_16(C) GPIO.out_w1tc = clr_mask; GPIO.out_w1ts = set_mask((uint8_t)(C >> 8)); WR_H; \ - GPIO.out_w1tc = clr_mask; GPIO.out_w1ts = set_mask((uint8_t)(C >> 0)); WR_H + GPIO.out_w1tc = clr_mask; GPIO.out_w1ts = set_mask((uint8_t)(C >> 0)); WR_H #endif // 16 bit write with swapped bytes @@ -253,34 +325,89 @@ #elif defined (ILI9488_DRIVER) // 16 bit colour converted to 3 bytes for 18 bit RGB // Write 8 bits to TFT - #define tft_Write_8(C) SPI.transfer(C) + #define tft_Write_8(C) spi.transfer(C) // Convert 16 bit colour to 18 bit and write in 3 bytes - #define tft_Write_16(C) SPI.transfer((C & 0xF800)>>8); \ - SPI.transfer((C & 0x07E0)>>3); \ - SPI.transfer((C & 0x001F)<<3) + #define tft_Write_16(C) spi.transfer((C & 0xF800)>>8); \ + spi.transfer((C & 0x07E0)>>3); \ + spi.transfer((C & 0x001F)<<3) // Convert swapped byte 16 bit colour to 18 bit and write in 3 bytes - #define tft_Write_16S(C) SPI.transfer(C & 0xF8); \ - SPI.transfer((C & 0xE0)>>11 | (C & 0x07)<<5); \ - SPI.transfer((C & 0x1F00)>>5) + #define tft_Write_16S(C) spi.transfer(C & 0xF8); \ + spi.transfer((C & 0xE0)>>11 | (C & 0x07)<<5); \ + spi.transfer((C & 0x1F00)>>5) // Write 32 bits to TFT - #define tft_Write_32(C) SPI.write32(C) + #define tft_Write_32(C) spi.write32(C) #elif defined (RPI_ILI9486_DRIVER) - #define tft_Write_8(C) SPI.transfer(0); SPI.transfer(C) - #define tft_Write_16(C) SPI.write16(C) - #define tft_Write_32(C) SPI.write32(C) + #define tft_Write_8(C) spi.transfer(0); spi.transfer(C) + #define tft_Write_16(C) spi.write16(C) + #define tft_Write_16S(C) spi.write16(C<<8 | C>>8) + #define tft_Write_32(C) spi.write32(C) -#else +#elif defined ESP8266 - #define tft_Write_8(C) SPI.transfer(C) - #define tft_Write_16(C) SPI.write16(C) - #define tft_Write_32(C) SPI.write32(C) + #define tft_Write_8(C) spi.write(C) + #define tft_Write_16(C) spi.write16(C) + #define tft_Write_32(C) spi.write32(C) + +#else // ESP32 using SPI with 16 bit color display + + // ESP32 low level SPI writes for 8, 16 and 32 bit values + // to avoid the function call overhead + + // Write 8 bits + #define tft_Write_8(C) \ + WRITE_PERI_REG(SPI_MOSI_DLEN_REG(SPI_PORT), 8-1); \ + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), C); \ + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); \ + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); + + // Write 16 bits with corrected endianess for 16 bit colours + #define tft_Write_16(C) \ + WRITE_PERI_REG(SPI_MOSI_DLEN_REG(SPI_PORT), 16-1); \ + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), C<<8 | C>>8); \ + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); \ + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); + + // Write 16 bits + #define tft_Write_16S(C) \ + WRITE_PERI_REG(SPI_MOSI_DLEN_REG(SPI_PORT), 16-1); \ + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), C); \ + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); \ + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); + + // Write 32 bits + #define tft_Write_32(C) \ + WRITE_PERI_REG(SPI_MOSI_DLEN_REG(SPI_PORT), 32-1); \ + WRITE_PERI_REG(SPI_W0_REG(SPI_PORT), C); \ + SET_PERI_REG_MASK(SPI_CMD_REG(SPI_PORT), SPI_USR); \ + while (READ_PERI_REG(SPI_CMD_REG(SPI_PORT))&SPI_USR); #endif + +#if !defined (ESP32_PARALLEL) + + // Read from display using SPI or software SPI + #if defined (ESP8266) && defined (TFT_SDA_READ) + // Use a bit banged function call for ESP8266 and bi-directional SDA pin + #define SCLK_L GPOC=sclkpinmask + #define SCLK_H GPOS=sclkpinmask + #else + // Use a SPI read transfer + #define tft_Read_8() spi.transfer(0) + #endif + + // Make sure TFT_MISO is defined if not used to avoid an error message + #ifndef TFT_MISO + #define TFT_MISO -1 + #endif + +#endif + + #ifdef LOAD_GFXFF // We can include all the free fonts and they will only be built into // the sketch if they are used @@ -406,6 +533,7 @@ template static inline void swap_coord(T& a, T& b) { T t = a; a = b; b = t; } #ifndef min + // Return minimum of two numbers, may already be defined #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif @@ -413,11 +541,20 @@ swap_coord(T& a, T& b) { T t = a; a = b; b = t; } // by calling getSetup(), zero impact on code size unless used, mainly for diagnostics typedef struct { +String version = TFT_ESPI_VERSION; int16_t esp; uint8_t trans; uint8_t serial; uint8_t overlap; +#if defined (ESP32) + #if defined (USE_HSPI_PORT) + uint8_t port = HSPI; + #else + uint8_t port = VSPI; + #endif +#endif + uint16_t tft_driver; // Hexadecimal code uint16_t tft_width; // Rotation 0 width and height uint16_t tft_height; @@ -453,6 +590,7 @@ int8_t pin_tft_d7; int8_t pin_tch_cs; int16_t tft_spi_freq; +int16_t tft_rd_freq; int16_t tch_spi_freq; } setup_t; @@ -529,20 +667,20 @@ class TFT_eSPI : public Print { void init(uint8_t tc = TAB_COLOUR), begin(uint8_t tc = TAB_COLOUR); // Same - begin included for backwards compatibility // These are virtual so the TFT_eSprite class can override them with sprite specific functions - virtual void drawPixel(uint32_t x, uint32_t y, uint32_t color), - drawChar(int32_t x, int32_t y, unsigned char c, uint32_t color, uint32_t bg, uint8_t size), + virtual void drawPixel(int32_t x, int32_t y, uint32_t color), + drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uint32_t bg, uint8_t size), drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t color), drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color), drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color), fillRect(int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color); - virtual int16_t drawChar(unsigned int uniCode, int x, int y, int font), - drawChar(unsigned int uniCode, int x, int y), + virtual int16_t drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font), + drawChar(uint16_t uniCode, int32_t x, int32_t y), height(void), width(void); // The TFT_eSprite class inherits the following functions - void setWindow(int16_t x0, int16_t y0, int16_t x1, int16_t y1), + void setWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye), pushColor(uint16_t color), pushColor(uint16_t color, uint32_t len), pushColors(uint16_t *data, uint32_t len, bool swap = true), // With byte swap option @@ -562,8 +700,8 @@ class TFT_eSPI : public Print { fillCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color), fillCircleHelper(int32_t x0, int32_t y0, int32_t r, uint8_t cornername, int32_t delta, uint32_t color), - drawEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint16_t color), - fillEllipse(int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint16_t color), + drawEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color), + fillEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color), drawTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t color), fillTriangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t color), @@ -572,7 +710,7 @@ class TFT_eSPI : public Print { drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color), drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor, uint16_t bgcolor), setBitmapColor(uint16_t fgcolor, uint16_t bgcolor), // For 1bpp sprites - + setPivot(int16_t x, int16_t y), setCursor(int16_t x, int16_t y), setCursor(int16_t x, int16_t y, uint8_t font), setTextColor(uint16_t color), @@ -596,30 +734,30 @@ class TFT_eSPI : public Print { commandList(const uint8_t *addr); - uint8_t readcommand8(uint8_t cmd_function, uint8_t index); - uint16_t readcommand16(uint8_t cmd_function, uint8_t index); - uint32_t readcommand32(uint8_t cmd_function, uint8_t index); + uint8_t readcommand8(uint8_t cmd_function, uint8_t index = 0); + uint16_t readcommand16(uint8_t cmd_function, uint8_t index = 0); + uint32_t readcommand32(uint8_t cmd_function, uint8_t index = 0); // Read the colour of a pixel at x,y and return value in 565 format uint16_t readPixel(int32_t x0, int32_t y0); // The next functions can be used as a pair to copy screen blocks (or horizontal/vertical lines) to another location // Read a block of pixels to a data buffer, buffer is 16 bit and the array size must be at least w * h - void readRect(uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint16_t *data); + void readRect(int32_t x0, int32_t y0, int32_t w, int32_t h, uint16_t *data); // Write a block of pixels to the screen - void pushRect(uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint16_t *data); + void pushRect(int32_t x0, int32_t y0, int32_t w, int32_t h, uint16_t *data); // These are used to render images or sprites stored in RAM arrays - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, uint16_t *data); - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, uint16_t *data, uint16_t transparent); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, uint16_t *data); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, uint16_t *data, uint16_t transparent); // These are used to render images stored in FLASH (PROGMEM) - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, const uint16_t *data, uint16_t transparent); - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, const uint16_t *data); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, const uint16_t *data, uint16_t transparent); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, const uint16_t *data); // These are used by pushSprite for 1 and 8 bit colours - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, uint8_t *data, bool bpp8 = true); - void pushImage(int32_t x0, int32_t y0, uint32_t w, uint32_t h, uint8_t *data, uint8_t transparent, bool bpp8 = true); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, uint8_t *data, bool bpp8 = true); + void pushImage(int32_t x0, int32_t y0, int32_t w, int32_t h, uint8_t *data, uint8_t transparent, bool bpp8 = true); // Swap the byte order for pushImage() - corrects endianness void setSwapBytes(bool swap); @@ -637,41 +775,64 @@ class TFT_eSPI : public Print { int16_t getCursorX(void), getCursorY(void); + int16_t getPivotX(void), + getPivotY(void); + uint16_t fontsLoaded(void), color565(uint8_t red, uint8_t green, uint8_t blue), // Convert 8 bit red, green and blue to 16 bits color8to16(uint8_t color332); // Convert 8 bit colour to 16 bits - int16_t drawNumber(long long_num,int poX, int poY, int font), - drawNumber(long long_num,int poX, int poY), - drawFloat(float floatNumber,int decimal,int poX, int poY, int font), - drawFloat(float floatNumber,int decimal,int poX, int poY), + int16_t drawNumber(long long_num, int32_t poX, int32_t poY, uint8_t font), + drawNumber(long long_num, int32_t poX, int32_t poY), + drawFloat(float floatNumber, uint8_t decimal, int32_t poX, int32_t poY, uint8_t font), + drawFloat(float floatNumber, uint8_t decimal, int32_t poX, int32_t poY), // Handle char arrays - drawString(const char *string, int poX, int poY, int font), - drawString(const char *string, int poX, int poY), - drawCentreString(const char *string, int dX, int poY, int font), // Deprecated, use setTextDatum() and drawString() - drawRightString(const char *string, int dX, int poY, int font), // Deprecated, use setTextDatum() and drawString() + drawString(const char *string, int32_t poX, int32_t poY, uint8_t font), + drawString(const char *string, int32_t poX, int32_t poY), + drawCentreString(const char *string, int32_t dX, int32_t poY, uint8_t font), // Deprecated, use setTextDatum() and drawString() + drawRightString(const char *string, int32_t dX, int32_t poY, uint8_t font), // Deprecated, use setTextDatum() and drawString() // Handle String type - drawString(const String& string, int poX, int poY, int font), - drawString(const String& string, int poX, int poY), - drawCentreString(const String& string, int dX, int poY, int font), // Deprecated, use setTextDatum() and drawString() - drawRightString(const String& string, int dX, int poY, int font); // Deprecated, use setTextDatum() and drawString() + drawString(const String& string, int32_t poX, int32_t poY, uint8_t font), + drawString(const String& string, int32_t poX, int32_t poY), + drawCentreString(const String& string, int32_t dX, int32_t poY, uint8_t font), // Deprecated, use setTextDatum() and drawString() + drawRightString(const String& string, int32_t dX, int32_t poY, uint8_t font); // Deprecated, use setTextDatum() and drawString() - int16_t textWidth(const char *string, int font), + int16_t textWidth(const char *string, uint8_t font), textWidth(const char *string), - textWidth(const String& string, int font), + textWidth(const String& string, uint8_t font), textWidth(const String& string), fontHeight(int16_t font), fontHeight(void); - void setAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye); + void setAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h); + // Compatibility additions + void startWrite(void); // Begin SPI transaction + void writeColor(uint16_t color, uint32_t len); // Write colours without transaction overhead + void endWrite(void); // End SPI transaction + uint16_t decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining); + uint16_t decodeUTF8(uint8_t c); size_t write(uint8_t); +#ifdef TFT_SDA_READ + #if defined (ESP8266) && defined (TFT_SDA_READ) + uint8_t tft_Read_8(void); + #endif + void begin_SDA_Read(void); + void end_SDA_Read(void); +#endif + + // Set or get an arbitrary library attribute or configuration option + void setAttribute(uint8_t id = 0, uint8_t a = 0); + uint8_t getAttribute(uint8_t id = 0); + void getSetup(setup_t& tft_settings); // Sketch provides the instance to populate + static SPIClass& getSPIinstance(void); + int32_t cursor_x, cursor_y, padX; uint32_t textcolor, textbgcolor; @@ -682,6 +843,12 @@ class TFT_eSPI : public Print { textdatum, // Text reference datum rotation; // Display rotation (0-3) + int16_t _xpivot; // x pivot point coordinate + int16_t _ypivot; // x pivot point coordinate + + uint8_t decoderState = 0; // UTF8 decoder state + uint16_t decoderBuffer; // Unicode code-point buffer + private: inline void spi_begin() __attribute__((always_inline)); @@ -690,14 +857,14 @@ class TFT_eSPI : public Print { inline void spi_begin_read() __attribute__((always_inline)); inline void spi_end_read() __attribute__((always_inline)); - void readAddrWindow(int32_t xs, int32_t ys, int32_t xe, int32_t ye); + void readAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h); uint8_t tabcolor, colstart = 0, rowstart = 0; // some ST7735 displays need this changed volatile uint32_t *dcport, *csport; - uint32_t cspinmask, dcpinmask, wrpinmask; + uint32_t cspinmask, dcpinmask, wrpinmask, sclkpinmask; #if defined(ESP32_PARALLEL) uint32_t xclr_mask, xdir_mask, xset_mask[256]; @@ -710,22 +877,25 @@ class TFT_eSPI : public Print { int32_t win_xe, win_ye; - uint32_t _init_width, _init_height; // Display w/h as input, used by setRotation() - uint32_t _width, _height; // Display w/h as modified by current rotation - uint32_t addr_row, addr_col; + int32_t _init_width, _init_height; // Display w/h as input, used by setRotation() + int32_t _width, _height; // Display w/h as modified by current rotation + int32_t addr_row, addr_col; uint32_t fontsloaded; - uint8_t glyph_ab, // glyph height above baseline - glyph_bb; // glyph height below baseline + uint8_t glyph_ab, // glyph delta Y (height) above baseline + glyph_bb; // glyph delta Y (height) below baseline + bool isDigits; // adjust bounding box for numbers to reduce visual jiggling bool textwrapX, textwrapY; // If set, 'wrap' text at right and optionally bottom edge of display bool _swapBytes; // Swap the byte order for TFT pushImage() bool locked, inTransaction; // Transaction and mutex lock flags for ESP32 - bool _booted; + bool _booted; // init() or begin() has already run once + bool _cp437; // If set, use correct CP437 charset (default is ON) + bool _utf8; // If set, use UTF-8 decoder in print stream 'write()' function (default ON) - uint32_t _lastColor; + uint32_t _lastColor; // Buffered value of last colour used #ifdef LOAD_GFXFF GFXfont *gfxFont; diff --git a/Tools/Create_Smooth_Font/Create_font/Create_font.pde b/Tools/Create_Smooth_Font/Create_font/Create_font.pde index 1363b6b..6832248 100644 --- a/Tools/Create_Smooth_Font/Create_font/Create_font.pde +++ b/Tools/Create_Smooth_Font/Create_font/Create_font.pde @@ -1,6 +1,8 @@ // This is a Processing sketch, see https://processing.org/ to download the IDE -// Select the character range in the user configure section starting at line 100 +// Select the font, size and character ranges in the user configuration section +// of this sketch, which starts at line 120. Instructions start at line 50. + /* Software License Agreement (FreeBSD License) @@ -36,47 +38,61 @@ Software License Agreement (FreeBSD License) //////////////////////////////////////////////////////////////////////////////////////////////// - // This is a processing sketch to create font files for the TFT_eSPI library: // https://github.com/Bodmer/TFT_eSPI -// Coded by Bodmer January 2018 +// Coded by Bodmer January 2018, updated 10/2/19 +// Version 0.8 -// See comments below in code for specifying the font parameters -// (point size, unicode blocks to include etc). Ranges of characers or -// specific individual unicodes can be included in the created font file/ +// >>>>>>>>>>>>>>>>>>>> INSTRUCTIONS <<<<<<<<<<<<<<<<<<<< + +// See comments below in code for specifying the font parameters (point size, +// unicode blocks to include etc). Ranges of characters (glyphs) and specific +// individual glyphs can be included in the created "*.vlw" font file. // Created fonts are saved in the sketches "FontFiles" folder. Press Ctrl+K to -// see that folder. +// see that folder location. -// 16 bit unicodes in the range 0x0000 - 0xFFFF are supported. +// 16 bit Unicode point codes in the range 0x0000 - 0xFFFF are supported. +// Codes 0-31 are control codes such as "tab" and "carraige return" etc. +// and 32 is a "space", these should NOT be included. // The sketch will convert True Type (a .ttf or .otf file) file stored in the -// sketches "Data" folder as well as your computers system fonts. +// sketches "Data" folder as well as your computers' system fonts. -// To maximise rendering performance only include the characters you will use. -// Characters at the start of the file will render faster than those at the end. +// To maximise rendering performance and the memory consumed only include the characters +// you will use. Characters at the start of the file will render faster than those at +// the end due to the buffering and file seeking overhead. + +// The inclusion of "non-existant" characters in a font may give unpredicatable results +// when rendering with the TFT_eSPI library. The Processing sketch window that pops up +// to show the font characters will print "boxes" (also known as Tofu!) for non existant +// characters. // Once created the files must be loaded into the ESP32 or ESP8266 SPIFFS memory // using the Arduino IDE plugin detailed here: // https://github.com/esp8266/arduino-esp8266fs-plugin // https://github.com/me-no-dev/arduino-esp32fs-plugin -// The sketch list all the available PC fonts to the console, you may need to increase -// console line count (in preferences.txt) to stop some fonts scrolling out of view. +// When the sketch is run it will generate a file called "System_Font_List.txt" in the +// sketch "FontFiles" folder, press Ctrl+K to see it. Open the file in a text editor to +// view it. This list provides the font reference number needed below to locate that +// font on your system. + +// The sketch also lists all the available system fonts to the console, you can increase +// the console line count (in preferences.txt) to stop some fonts scrolling out of view. // See link in File>Preferences to locate "preferences.txt" file. You must close // Processing then edit the file lines. If Processing is not closed first then the // edits will be overwritten by defaults! Edit "preferences.txt" as follows for -// 1000 lines, then save, then run Processing again: +// 3000 lines, then save, then run Processing again: + +// console.length=3000; // Line 4 in file +// console.scrollback.lines=3000; // Line 7 in file - /* - console.length=1000 // Line 4 in file - console.scrollback.lines=1000 // Line 7 in file - */ // Useful links: - /* +/* https://en.wikipedia.org/wiki/Unicode_font @@ -86,33 +102,39 @@ Software License Agreement (FreeBSD License) http://savannah.gnu.org/projects/freefont/ http://www.google.com/get/noto/ - + https://github.com/Bodmer/TFT_eSPI https://github.com/esp8266/arduino-esp8266fs-plugin https://github.com/me-no-dev/arduino-esp32fs-plugin - */ -//////////////////////////////////////////////////////////////////////////////////////////////// + >>>>>>>>>>>>>>>>>>>> END OF INSTRUCTIONS <<<<<<<<<<<<<<<<<<<< */ -import java.awt.Desktop; + +import java.awt.Desktop; // Required to allow sketch to open file windows + + +//////////////////////////////////////////////////////////////////////////////////////////////// // >>>>>>>>>> USER CONFIGURED PARAMETERS START HERE <<<<<<<<<< +// Use font number or name, -1 for fontNumber means use fontName below, a value >=0 means use system font number from list. +// When the sketch is run it will generate a file called "systemFontList.txt" in the sketch folder, press Ctrl+K to see it. +// Open the "systemFontList.txt" in a text editor to view the font files and reference numbers for your system. -// Use font name for ttf files placed in the "Data" folder or the font number seen in IDE Console for system fonts +int fontNumber = -1; // << Use [Number] in brackets from the fonts listed. + +// OR use font name for ttf files placed in the "Data" folder or the font number seen in IDE Console for system fonts // the font numbers are listed when the sketch is run. -// | 1 2 | Maximum filename size for SPIFFS is 32 including leading / +// | 1 2 | Maximum filename size for SPIFFS is 31 including leading / // 1234567890123456789012345 and added point size and .vlw extension, so max is 25 -String fontName = "Final-Frontier"; //Manually crop the filename length later after creation if needed - -String fontType = ".ttf"; //SPIFFS does not accept underscore in filename! +String fontName = "Final-Frontier"; // Manually crop the filename length later after creation if needed + // Note: SPIFFS does NOT accept underscore in a filename! +String fontType = ".ttf"; //String fontType = ".otf"; -// Use font number instead of name, -1 means use name above, or a value >=0 means use system font number from list. -int fontNumber = -1; // << Use [Number] in brackets from the fonts listed in console window -// Define the font size in points for the created font file -int fontSize = 28; +// Define the font size in points for the TFT_eSPI font file +int fontSize = 20; // Font size to use in the Processing sketch display window that pops up (can be different to above) int displayFontSize = 28; @@ -125,7 +147,7 @@ int displayFontSize = 28; static final int[] unicodeBlocks = { // The list below has been created from the table here: https://en.wikipedia.org/wiki/Unicode_block // Remove // at start of lines below to include that unicode block, different code ranges can also be specified by - // editting the start and end of range values. Multiple lines from the list below can be included, limited only by + // editting the start and end-of-range values. Multiple lines from the list below can be included, limited only by // the final font file size! // Block range, //Block name, Code points, Assigned characters, Scripts @@ -298,20 +320,20 @@ static final int[] unicodeBlocks = { //0x0061, 0x007A, //Example custom range (Lower case a-z) }; -// Here we specify specific individual Unicodes to be included (appended at end of selected range) +// Here we specify particular individual Unicodes to be included (appended at end of selected range) static final int[] specificUnicodes = { // Commonly used codes, add or remove // in next line // 0x00A3, 0x00B0, 0x00B5, 0x03A9, 0x20AC, // £ ° µ Ω € // Numbers and characters for showing time, change next line to //* to use - /* +/* 0x002B, 0x002D, 0x002E, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, // - + . 0 1 2 3 4 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x0061, 0x006D, // 5 6 7 8 9 : a m 0x0070, // p - //*/ + //*/ - // More characters, change next line to //* to use + // More characters for TFT_eSPI test sketches, change next line to //* to use /* 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x010C, 0x010D, 0x010E, 0x010F, 0x0110, 0x0111, 0x0118, 0x0119, 0x011A, 0x011B, @@ -337,8 +359,8 @@ static final int[] specificUnicodes = { //*/ }; - // >>>>>>>>>> USER CONFIGURED PARAMETERS END HERE <<<<<<<<<< + //////////////////////////////////////////////////////////////////////////////////////////////// // Variable to hold the inclusive Unicode range (16 bit values only for this sketch) @@ -347,7 +369,10 @@ int lastUnicode = 0; PFont myFont; +PrintWriter logOutput; + void setup() { + logOutput = createWriter("FontFiles/System_Font_List.txt"); size(1000, 800); @@ -355,6 +380,15 @@ void setup() { String[] fontList = PFont.list(); printArray(fontList); + // Save font list to file + for (int x = 0; x < fontList.length; x++) + { + logOutput.print("[" + x + "] "); + logOutput.println(fontList[x]); + } + logOutput.flush(); // Writes the remaining data to the file + logOutput.close(); // Finishes the file + // Set the fontName from the array number or the defined fontName if (fontNumber >= 0) { @@ -410,19 +444,19 @@ void setup() { } } - // loading the range specified + // loading the specific point codes for (int i = 0; i < specificUnicodes.length; i++) { charset[index] = Character.toChars(specificUnicodes[i])[0]; index++; } - - // Make font smooth + + // Make font smooth (anti-aliased) boolean smooth = true; // Create the font in memory myFont = createFont(fontName+fontType, displayFontSize, smooth, charset); - // Print a few characters to the sketch window + // Print characters to the sketch window fill(0, 0, 0); textFont(myFont); @@ -444,10 +478,10 @@ void setup() { int unicode = charset[index]; float cwidth = textWidth((char)unicode) + 2; if ( (x + cwidth) > (width - gapx) ) break; - - // Draw the letter to the screen + + // Draw the glyph to the screen text(new String(Character.toChars(unicode)), x, y); - + // Move cursor x += cwidth; // Increment the counter @@ -458,12 +492,12 @@ void setup() { } - // creating font + // creating font to save as a file PFont font; font = createFont(fontName+fontType, fontSize, smooth, charset); - println("Created font " + fontName + str(fontSize) + ".vlw"); + println("Created font " + fontName + str(fontSize) + ".vlw"); // creating file try { @@ -486,4 +520,4 @@ void setup() { catch(IOException e) { println("Doh! Failed to create the file"); } -} \ No newline at end of file +} diff --git a/User_Setup.h b/User_Setup.h index 139f0e9..3f44644 100644 --- a/User_Setup.h +++ b/User_Setup.h @@ -8,31 +8,51 @@ // run without the need to make any more changes for a particular hardware setup! // Note that some sketches are designed for a particular TFT pixel width/height + // ################################################################################## // -// Section 0. Call up the right driver file and any options for it +// Section 1. Call up the right driver file and any options for it // // ################################################################################## // Only define one driver, the other ones must be commented out #define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER +//#define ST7735_DRIVER // Define additional parameters below for this display +//#define ILI9163_DRIVER // Define additional parameters below for this display //#define S6D02A1_DRIVER //#define RPI_ILI9486_DRIVER // 20MHz maximum SPI //#define HX8357D_DRIVER //#define ILI9481_DRIVER //#define ILI9486_DRIVER -//#define ILI9488_DRIVER -//#define ST7789_DRIVER +//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high) +//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display +//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display +//#define R61581_DRIVER -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK +// Some displays support SPI reads via the MISO pin, other displays have a single +// bi-directional SDA pin and the library will try to read this via the MOSI line. +// To use the SDA line for reading data from the TFT uncomment the following line: -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 +// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only + +// For ST7789 ONLY, define the colour order IF the blue and red are swapped on your display +// Try ONE option at a time to find the correct colour order for your display + +// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + +// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below + +// #define M5STACK + +// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation +// #define TFT_WIDTH 80 +// #define TFT_WIDTH 128 +// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320 +// #define TFT_HEIGHT 160 +// #define TFT_HEIGHT 128 +// #define TFT_HEIGHT 240 // ST7789 240 x 240 +// #define TFT_HEIGHT 320 // ST7789 240 x 320 // For ST7735 ONLY, define the type of display, originally this was based on the // colour of the tab on the screen protector film but this is not always true, so try @@ -41,17 +61,33 @@ // Comment out ALL BUT ONE of these options for a ST7735 display driver, save this // this User_Setup file, then rebuild and upload the sketch to the board again: -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB +// #define ST7735_INITB +// #define ST7735_GREENTAB +// #define ST7735_GREENTAB2 +// #define ST7735_GREENTAB3 +// #define ST7735_GREENTAB128 // For 128 x 128 display +// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset) +// #define ST7735_REDTAB +// #define ST7735_BLACKTAB +// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset + +// If colours are inverted (white shows as black) then uncomment one of the next +// 2 lines try both options, one of the options should correct the inversion. + +// #define TFT_INVERSION_ON +// #define TFT_INVERSION_OFF + +// If a backlight control signal is available then define the TFT_BL pin in Section 2 +// below. The backlight will be turned ON when tft.begin() is called, but the library +// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be +// driven with a PWM signal or turned OFF/ON then this must be handled by the user +// sketch. e.g. with digitalWrite(TFT_BL, LOW); + +// #define TFT_BACKLIGHT_ON HIGH // HIGH or LOW are options // ################################################################################## // -// Section 1. Define the pins that are used to interface with the display here +// Section 2. Define the pins that are used to interface with the display here // // ################################################################################## @@ -79,7 +115,6 @@ // // The NodeMCU D0 pin can be used for RST // -// See Section 2. below if DC or CS is connected to D0 // // Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin // If 5V is not available at a pin you can use 3.3V but backlight brightness @@ -92,7 +127,9 @@ #define TFT_CS PIN_D8 // Chip select control pin D8 #define TFT_DC PIN_D3 // Data Command control pin #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V +//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V + +//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin) //#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen @@ -105,14 +142,15 @@ // but saves pins for other functions. // Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode +// In ESP8266 overlap mode the following must be defined +//#define TFT_SPI_OVERLAP + // In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 //#define TFT_CS PIN_D3 //#define TFT_DC PIN_D5 // Data Command control pin //#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP // ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### @@ -122,11 +160,17 @@ //#define TFT_MISO 19 //#define TFT_MOSI 23 //#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin +//#define TFT_CS 15 // Chip select control pin //#define TFT_DC 2 // Data Command control pin //#define TFT_RST 4 // Reset pin (could connect to RST pin) //#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST +//#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin) + +//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen + +//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only + // For the M5Stack module use these #define lines //#define TFT_MISO 19 //#define TFT_MOSI 23 @@ -134,11 +178,7 @@ //#define TFT_CS 14 // Chip select control pin //#define TFT_DC 27 // Data Command control pin //#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only +//#define TFT_BL 32 // LED back-light (required for M5Stack) // ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ###### @@ -154,11 +194,11 @@ // The ESP32 and TFT the pins used for testing are: //#define TFT_CS 33 // Chip select control pin (library pulls permanently low -//#define TFT_DC 15 // Data Command control pin - use a pin in the range 0-31 +//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31 //#define TFT_RST 32 // Reset pin, toggles on startup -//#define TFT_WR 4 // Write strobe control pin - use a pin in the range 0-31 -//#define TFT_RD 2 // Read strobe control pin - use a pin in the range 0-31 +//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31 +//#define TFT_RD 2 // Read strobe control pin //#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus //#define TFT_D1 13 // so a single register write sets/clears all bits. @@ -169,20 +209,6 @@ //#define TFT_D6 27 //#define TFT_D7 14 -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS // ################################################################################## // @@ -208,16 +234,10 @@ // this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - // ################################################################################## // -// Section 5. Other options +// Section 4. Other options // // ################################################################################## @@ -236,11 +256,16 @@ // #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS // #define SPI_FREQUENCY 80000000 -#define SPI_READ_FREQUENCY 20000000 // Optional reduced SPI frequency for reading TFT +// Optional reduced SPI frequency for reading TFT +#define SPI_READ_FREQUENCY 20000000 // The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 +// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default. +// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam) +// then uncomment the following line: +//#define USE_HSPI_PORT // Comment out the following #define if "SPI Transactions" do not need to be // supported. When commented out the code size will be smaller and sketches will @@ -252,4 +277,4 @@ // Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) // so changing it here has no effect -//#define SUPPORT_TRANSACTIONS +// #define SUPPORT_TRANSACTIONS diff --git a/User_Setup_Select.h b/User_Setup_Select.h index 00b6013..06568f1 100644 --- a/User_Setup_Select.h +++ b/User_Setup_Select.h @@ -25,24 +25,31 @@ //#include // Setup file configured for my ST7735 //#include // Setup file configured for my ILI9163 //#include // Setup file configured for my S6D02A1 -//#include // Setup file configured for my stock RPi TFT -//#include // Setup file configured for my modified RPi TFT -//#include // Setup file configured for my ST7735 128x128 display -//#include // Setup file configured for my ILI9163 128x128 display -//#include // Setup file configured for my ST7735 -//#include // Setup file configured for ESP8266 and RPi TFT with touch -//#include // Setup file configured for ESP32 and RPi TFT with touch +//#include // Setup file configured for my stock RPi TFT +//#include // Setup file configured for my modified RPi TFT +//#include // Setup file configured for my ST7735 128x128 display +//#include // Setup file configured for my ILI9163 128x128 display +//#include // Setup file configured for my ST7735 +//#include // Setup file configured for ESP8266 and RPi TFT with touch + +//#include // Setup file configured for ESP32 and RPi TFT with touch //#include // Setup file for the ESP32 based M5Stack //#include // Setup file for the ESP32 with parallel bus TFT //#include // Setup file for the ESP32 with parallel bus TFT //#include // Setup file configured for HX8357D (untested) //#include // Setup file for the ESP32 with parallel bus TFT //#include // Setup file for any Waveshare ePaper display -//#include // Setup file configured for HX8357D (untested) +//#include // Setup file configured for ST7789 //#include // Setup file for ESP8266 and ILI9488 SPI bus TFT //#include // Setup file for ESP32 and ILI9488 SPI bus TFT +//#include // Setup file for ESP32 and TTGO T4 (BTC) ILI9341 SPI bus TFT +//#include // Setup file for ESP32 and TTGO TM ST7789 SPI bus TFT +//#include // Setup file configured for ST7789 240 x 240 + +//#include // Setup file configured for my ST7735S 80x160 + //#include @@ -58,6 +65,11 @@ ///////////////////////////////////////////////////////////////////////////////////// +// Identical looking TFT displays may have a different colour ordering in the 16 bit colour +#define TFT_BGR 0 // Colour order Blue-Green-Red +#define TFT_RGB 1 // Colour order Red-Green-Blue + + // Load the right driver definition - do not tinker here ! #if defined (ILI9341_DRIVER) #include @@ -92,6 +104,12 @@ #elif defined (ST7789_DRIVER) #include "TFT_Drivers/ST7789_Defines.h" #define TFT_DRIVER 0x7789 +#elif defined (R61581_DRIVER) + #include "TFT_Drivers/R61581_Defines.h" + #define TFT_DRIVER 0x6158 +#elif defined (ST7789_2_DRIVER) + #include "TFT_Drivers/ST7789_2_Defines.h" + #define TFT_DRIVER 0x778B #elif defined (XYZZY_DRIVER) // <<<<<<<<<<<<<<<<<<<<<<<< ADD NEW DRIVER HERE #include "TFT_Drivers/XYZZY_Defines.h" #define TFT_DRIVER 0x0000 @@ -99,6 +117,7 @@ #define TFT_DRIVER 0x0000 #endif + // These are the pins for all ESP8266 boards // Name GPIO Function #define PIN_D0 16 // WAKE diff --git a/User_Setups/Setup10_RPi_touch_ILI9486.h b/User_Setups/Setup10_RPi_touch_ILI9486.h index bbfe895..ffe2f71 100644 --- a/User_Setups/Setup10_RPi_touch_ILI9486.h +++ b/User_Setups/Setup10_RPi_touch_ILI9486.h @@ -1,86 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER #define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -90,75 +11,6 @@ #define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -166,53 +18,14 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## +#define SPI_FREQUENCY 16000000 -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 -#define SPI_FREQUENCY 20000000 -// #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 - -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup11_RPi_touch_ILI9486.h b/User_Setups/Setup11_RPi_touch_ILI9486.h index cbb489b..e2edbb3 100644 --- a/User_Setups/Setup11_RPi_touch_ILI9486.h +++ b/User_Setups/Setup11_RPi_touch_ILI9486.h @@ -1,117 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER #define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### - -// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation -//#define TFT_CS PIN_D8 // Chip select control pin D8 -//#define TFT_DC PIN_D3 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins #define TFT_MISO 19 #define TFT_MOSI 23 @@ -123,43 +13,6 @@ #define TOUCH_CS 22 // Chip select pin (T_CS) of touch screen -//#define TFT_WR 21 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -167,53 +20,11 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 #define SPI_FREQUENCY 20000000 -// #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 - - -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - -// #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup12_M5Stack.h b/User_Setups/Setup12_M5Stack.h index 3439512..d4b50b8 100644 --- a/User_Setups/Setup12_M5Stack.h +++ b/User_Setups/Setup12_M5Stack.h @@ -1,131 +1,11 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out #define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below + #define M5STACK -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### - -// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation -//#define TFT_CS PIN_D8 // Chip select control pin D8 -//#define TFT_DC PIN_D3 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines #define TFT_MISO 19 #define TFT_MOSI 23 #define TFT_SCLK 18 @@ -134,31 +14,6 @@ #define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) #define TFT_BL 32 // LED back-light -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -166,53 +21,9 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 -// #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 - -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: -#define SPI_TOUCH_FREQUENCY 2500000 - - -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - -// #define SUPPORT_TRANSACTIONS +#define SPI_FREQUENCY 27000000 diff --git a/User_Setups/Setup13_ILI9481_Parallel.h b/User_Setups/Setup13_ILI9481_Parallel.h index 0de1ebd..1758420 100644 --- a/User_Setups/Setup13_ILI9481_Parallel.h +++ b/User_Setups/Setup13_ILI9481_Parallel.h @@ -1,37 +1,17 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Parallel bus is only supported on ESP32 -// Use ESP32 Parallel interface instead of SPI #define ESP32_PARALLEL -// Only define one driver, the other ones must be commented out + #define ILI9481_DRIVER -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## -// ESP32 pins used +// ESP32 pins used for UNO format board #define TFT_CS 33 // Chip select control pin -#define TFT_DC 15 // Data Command control pin - use a pin in the range 0-31 +#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31 #define TFT_RST 32 // Reset pin -#define TFT_WR 4 // Write strobe control pin - use a pin in the range 0-31 +#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31 #define TFT_RD 2 #define TFT_D0 12 // Must use pins in the range 0-31 for the data bus @@ -44,48 +24,12 @@ #define TFT_D7 14 -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! - #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT - -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - - diff --git a/User_Setups/Setup14_ILI9341_Parallel.h b/User_Setups/Setup14_ILI9341_Parallel.h index d777264..d19a827 100644 --- a/User_Setups/Setup14_ILI9341_Parallel.h +++ b/User_Setups/Setup14_ILI9341_Parallel.h @@ -1,37 +1,17 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Parallel bus is only supported on ESP32 -// Use ESP32 Parallel interface instead of SPI #define ESP32_PARALLEL -// Only define one driver, the other ones must be commented out + #define ILI9341_DRIVER -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## // ESP32 pins used for the parallel interface TFT #define TFT_CS 33 // Chip select control pin -#define TFT_DC 15 // Data Command control pin - use a pin in the range 0-31 +#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31 #define TFT_RST 32 // Reset pin -#define TFT_WR 4 // Write strobe control pin - use a pin in the range 0-31 +#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31 #define TFT_RD 2 #define TFT_D0 12 // Must use pins in the range 0-31 for the data bus @@ -44,48 +24,12 @@ #define TFT_D7 14 -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! - #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT - -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - - diff --git a/User_Setups/Setup15_HX8357D.h b/User_Setups/Setup15_HX8357D.h index 99ae1d6..f4ee614 100644 --- a/User_Setups/Setup15_HX8357D.h +++ b/User_Setups/Setup15_HX8357D.h @@ -1,87 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI #define HX8357D_DRIVER -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -89,77 +9,6 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -167,53 +16,16 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup16_ILI9488_Parallel.h b/User_Setups/Setup16_ILI9488_Parallel.h index bcaca48..5d3cb58 100644 --- a/User_Setups/Setup16_ILI9488_Parallel.h +++ b/User_Setups/Setup16_ILI9488_Parallel.h @@ -1,37 +1,17 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Parallel bus is only supported on ESP32 -// Use ESP32 Parallel interface instead of SPI #define ESP32_PARALLEL -// Only define one driver, the other ones must be commented out + #define ILI9488_DRIVER -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## // ESP32 pins used #define TFT_CS 33 // Chip select control pin -#define TFT_DC 15 // Data Command control pin - use a pin in the range 0-31 +#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31 #define TFT_RST 32 // Reset pin -#define TFT_WR 4 // Write strobe control pin - use a pin in the range 0-31 +#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31 #define TFT_RD 2 #define TFT_D0 12 // Must use pins in the range 0-31 for the data bus @@ -44,48 +24,12 @@ #define TFT_D7 14 -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! - #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT - -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - - diff --git a/User_Setups/Setup17_ePaper.h b/User_Setups/Setup17_ePaper.h index 3704cc5..86d0e65 100644 --- a/User_Setups/Setup17_ePaper.h +++ b/User_Setups/Setup17_ePaper.h @@ -1,26 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! - -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## +// See SetupX_Template.h for all options available #define EPD_DRIVER // ePaper driver -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - // READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS // Install the ePaper library for your own display size and type @@ -48,47 +29,12 @@ /////////////////////////////////////////////////////////////////// -// ################################################################################## -// -// Section 2. Not used -// -// ################################################################################## - - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! - #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 below, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT - -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - - -// ################################################################################## -// -// Section 5. Not used -// -// ################################################################################## - diff --git a/User_Setups/Setup18_ST7789.h b/User_Setups/Setup18_ST7789.h index 1f2030a..1f9be03 100644 --- a/User_Setups/Setup18_ST7789.h +++ b/User_Setups/Setup18_ST7789.h @@ -1,198 +1,26 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! -// Note that some sketches are designed for a particular TFT pixel width/height +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -//#define HX8357D_DRIVER -//#define ILI9481_DRIVER -//#define ILI9488_DRIVER #define ST7789_DRIVER -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK +// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 +// If colours are inverted (white shows as black) then uncomment one of the next +// 2 lines try both options, one of the options should correct the inversion. +// #define TFT_INVERSION_ON +// #define TFT_INVERSION_OFF -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. +// For ST7789 ONLY, define the colour order IF the blue and red are swapped on your display +// Try ONE option at a time to find the correct colour order for your display +// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### +// My ST7789 display has TCT_CS wired permananently low so the pin is not defined here // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation -//#define TFT_CS PIN_D8 // Chip select control pin D8 #define TFT_DC PIN_D3 // Data Command control pin #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ###### - -// The library supports 8 bit parallel TFTs with the ESP32, the pin -// selection below is compatible with ESP32 boards in UNO format. -// Wemos D32 boards need to be modified, see diagram in Tools folder. -// Only ILI9481 and ILI9341 based displays have been tested! - -// Parallel bus is only supported on ESP32 -// Uncomment line below to use ESP32 Parallel interface instead of SPI - -//#define ESP32_PARALLEL - -// The ESP32 and TFT the pins used for testing are: -//#define TFT_CS 33 // Chip select control pin (library pulls permanently low -//#define TFT_DC 15 // Data Command control pin - use a pin in the range 0-31 -//#define TFT_RST 32 // Reset pin, toggles on startup - -//#define TFT_WR 4 // Write strobe control pin - use a pin in the range 0-31 -//#define TFT_RD 2 // Read strobe control pin - use a pin in the range 0-31 - -//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus -//#define TFT_D1 13 // so a single register write sets/clears all bits. -//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect -//#define TFT_D3 25 // TFT screen update performance. -//#define TFT_D4 17 -//#define TFT_D5 16 -//#define TFT_D6 27 -//#define TFT_D7 14 - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -200,53 +28,17 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 // #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - //#define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup1_ILI9341.h b/User_Setups/Setup1_ILI9341.h index 7eb6fba..82d69c5 100644 --- a/User_Setups/Setup1_ILI9341.h +++ b/User_Setups/Setup1_ILI9341.h @@ -1,164 +1,13 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out #define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI - -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### - -// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 #define TFT_DC PIN_D3 // Data Command control pin #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V +//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -166,53 +15,19 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH + #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 -// #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS +// #define SPI_FREQUENCY 27000000 +#define SPI_FREQUENCY 40000000 // #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: +#define SPI_READ_FREQUENCY 20000000 + #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup20_ILI9488.h b/User_Setups/Setup20_ILI9488.h index 1a20ffd..7d1eaf1 100644 --- a/User_Setups/Setup20_ILI9488.h +++ b/User_Setups/Setup20_ILI9488.h @@ -1,87 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI #define ILI9488_DRIVER -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -89,77 +9,6 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -167,53 +16,17 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 + -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup21_ILI9488.h b/User_Setups/Setup21_ILI9488.h index 9b74048..358eef4 100644 --- a/User_Setups/Setup21_ILI9488.h +++ b/User_Setups/Setup21_ILI9488.h @@ -1,165 +1,16 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI #define ILI9488_DRIVER -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK +//#define TFT_INVERSION_OFF -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### - -// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation -//#define TFT_CS PIN_D8 // Chip select control pin D8 -//#define TFT_DC PIN_D3 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -#define TFT_MISO 19 +#define TFT_MISO 19 // (leave TFT SDO disconnected if other SPI devices share MISO) #define TFT_MOSI 23 #define TFT_SCLK 18 #define TFT_CS 15 // Chip select control pin #define TFT_DC 2 // Data Command control pin #define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -167,53 +18,17 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 // #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: +// Optional reduced SPI frequency for reading TFT +#define SPI_READ_FREQUENCY 16000000 + #define SPI_TOUCH_FREQUENCY 2500000 - - -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - -// #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup22_TTGO_T4.h b/User_Setups/Setup22_TTGO_T4.h new file mode 100644 index 0000000..cfed5b5 --- /dev/null +++ b/User_Setups/Setup22_TTGO_T4.h @@ -0,0 +1,29 @@ +// Setup for the TTGO T4 ("Bitcoin Tracker") ESP32 board with 2.2" ILI9341 display + +// See SetupX_Template.h for all options available + +#define ILI9341_DRIVER + +#define TFT_MISO 12 +#define TFT_MOSI 23 +#define TFT_SCLK 18 + +#define TFT_CS 27 +#define TFT_DC 26 +#define TFT_RST 5 + +#define LOAD_GLCD +#define LOAD_FONT2 +#define LOAD_FONT4 +#define LOAD_FONT6 +#define LOAD_FONT7 +#define LOAD_FONT8 +#define LOAD_GFXFF + +#define SMOOTH_FONT + +//#define SPI_FREQUENCY 27000000 + #define SPI_FREQUENCY 40000000 // Maximum for ILI9341 + + +#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V diff --git a/User_Setups/Setup23_TTGO_TM.h b/User_Setups/Setup23_TTGO_TM.h new file mode 100644 index 0000000..58468d5 --- /dev/null +++ b/User_Setups/Setup23_TTGO_TM.h @@ -0,0 +1,36 @@ +// Setup for the TTGO TM (Music) ESP32 board with 2.4" ST7789V display + +// See SetupX_Template.h for all options available + +#define ST7789_DRIVER + +#define TFT_SDA_READ // Read from display, it only provides an SDA pin + +#define TFT_MISO 19 // Must be defined even though it is not used +#define TFT_MOSI 23 // Connected to display SDA line +#define TFT_SCLK 18 + +#define TFT_CS 05 +#define TFT_DC 16 +#define TFT_RST 17 + +#define TFT_WIDTH 240 +#define TFT_HEIGHT 320 + +//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + +#define LOAD_GLCD +#define LOAD_FONT2 +#define LOAD_FONT4 +#define LOAD_FONT6 +#define LOAD_FONT7 +#define LOAD_FONT8 +#define LOAD_GFXFF + +#define SMOOTH_FONT + +#define SPI_FREQUENCY 40000000 // This display also seems to work reliably at 80MHz +#define SPI_FREQUENCY 80000000 + +#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V diff --git a/User_Setups/Setup24_ST7789.h b/User_Setups/Setup24_ST7789.h new file mode 100644 index 0000000..d75b743 --- /dev/null +++ b/User_Setups/Setup24_ST7789.h @@ -0,0 +1,53 @@ +// ST7789 240 x 240 display with no chip select line + +#define ST7789_DRIVER // Configure all registers + +#define TFT_WIDTH 240 +#define TFT_HEIGHT 240 + +//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + +//#define TFT_INVERSION_ON +//#define TFT_INVERSION_OFF + +// DSTIKE stepup +//#define TFT_DC 23 +//#define TFT_RST 32 +//#define TFT_MOSI 26 +//#define TFT_SCLK 27 + +// Generic ESP32 setup +//#define TFT_MISO 19 +//#define TFT_MOSI 23 +//#define TFT_SCLK 18 +//#define TFT_CS -1 // Not connected +//#define TFT_DC 2 +//#define TFT_RST 4 // Connect reset to ensure display initialises + +// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation +#define TFT_CS -1 // Define as not used +#define TFT_DC PIN_D3 // Data Command control pin +#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) + + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT + + +// #define SPI_FREQUENCY 27000000 +#define SPI_FREQUENCY 40000000 + +#define SPI_READ_FREQUENCY 20000000 + +#define SPI_TOUCH_FREQUENCY 2500000 + +// #define SUPPORT_TRANSACTIONS \ No newline at end of file diff --git a/User_Setups/Setup2_ST7735.h b/User_Setups/Setup2_ST7735.h index 7f79ca8..b9e618f 100644 --- a/User_Setups/Setup2_ST7735.h +++ b/User_Setups/Setup2_ST7735.h @@ -1,164 +1,21 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER #define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation #define TFT_WIDTH 128 #define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display #define ST7735_REDTAB -//#define ST7735_BLACKTAB -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 #define TFT_DC PIN_D3 // Data Command control pin #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V +//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -169,50 +26,14 @@ //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup3_ILI9163.h b/User_Setups/Setup3_ILI9163.h index e8bd1b2..f9b2656 100644 --- a/User_Setups/Setup3_ILI9163.h +++ b/User_Setups/Setup3_ILI9163.h @@ -1,86 +1,11 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER #define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation #define TFT_WIDTH 128 #define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -88,77 +13,6 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -169,50 +23,14 @@ //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup43_ST7735.h b/User_Setups/Setup43_ST7735.h new file mode 100644 index 0000000..8865f54 --- /dev/null +++ b/User_Setups/Setup43_ST7735.h @@ -0,0 +1,37 @@ +// Setup for ESP32 and ST7735 80 x 160 TFT + +// See SetupX_Template.h for all options available + +#define ST7735_DRIVER + + +#define TFT_WIDTH 80 +#define TFT_HEIGHT 160 + + +#define ST7735_GREENTAB160x80 + + +#define TFT_MISO 19 +#define TFT_MOSI 23 +#define TFT_SCLK 18 +#define TFT_CS 15 // Chip select control pin +#define TFT_DC 2 // Data Command control pin +#define TFT_RST 4 // Reset pin (could connect to RST pin) +//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST + + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT + + +//#define SPI_FREQUENCY 20000000 + #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 diff --git a/User_Setups/Setup4_S6D02A1.h b/User_Setups/Setup4_S6D02A1.h index 0a1530b..233117c 100644 --- a/User_Setups/Setup4_S6D02A1.h +++ b/User_Setups/Setup4_S6D02A1.h @@ -1,86 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER #define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -88,77 +9,6 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -169,50 +19,14 @@ //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 +// #define SPI_FREQUENCY 40000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup5_RPi_ILI9486.h b/User_Setups/Setup5_RPi_ILI9486.h index c21e181..ba21c31 100644 --- a/User_Setups/Setup5_RPi_ILI9486.h +++ b/User_Setups/Setup5_RPi_ILI9486.h @@ -1,164 +1,14 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER #define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 #define TFT_DC PIN_D3 // Data Command control pin #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V +//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -166,53 +16,14 @@ #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 #define SPI_FREQUENCY 20000000 -// #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup6_RPi_Wr_ILI9486.h b/User_Setups/Setup6_RPi_Wr_ILI9486.h index e5c9303..abeaddb 100644 --- a/User_Setups/Setup6_RPi_Wr_ILI9486.h +++ b/User_Setups/Setup6_RPi_Wr_ILI9486.h @@ -1,86 +1,7 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER #define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK - -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 - -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -88,131 +9,23 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - #define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! - #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 #define SPI_FREQUENCY 20000000 -// #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup7_ST7735_128x128.h b/User_Setups/Setup7_ST7735_128x128.h index 3bb32cf..6821f47 100644 --- a/User_Setups/Setup7_ST7735_128x128.h +++ b/User_Setups/Setup7_ST7735_128x128.h @@ -1,86 +1,14 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER #define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation #define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 #define TFT_HEIGHT 128 -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 #define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -88,77 +16,6 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -169,50 +26,14 @@ //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH + #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup8_ILI9163_128x128.h b/User_Setups/Setup8_ILI9163_128x128.h index 05b7cb6..da42ec3 100644 --- a/User_Setups/Setup8_ILI9163_128x128.h +++ b/User_Setups/Setup8_ILI9163_128x128.h @@ -1,86 +1,11 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER -//#define ST7735_DRIVER #define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation #define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 #define TFT_HEIGHT 128 -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: - -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB - -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation #define TFT_CS PIN_D8 // Chip select control pin D8 @@ -88,77 +13,6 @@ #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode - -// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 -//#define TFT_CS PIN_D3 -//#define TFT_DC PIN_D5 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -169,50 +23,13 @@ //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/Setup9_ST7735_Overlap.h b/User_Setups/Setup9_ST7735_Overlap.h index 57f9019..2237893 100644 --- a/User_Setups/Setup9_ST7735_Overlap.h +++ b/User_Setups/Setup9_ST7735_Overlap.h @@ -1,103 +1,14 @@ -// USER DEFINED SETTINGS -// Set driver type, fonts to be loaded, pins used and SPI control method etc -// -// See the User_Setup_Select.h file if you wish to be able to define multiple -// setups and then easily select which setup file is used by the compiler. -// -// If this file is edited correctly then all the library example sketches should -// run without the need to make any more changes for a particular hardware setup! +// See SetupX_Template.h for all options available -// ################################################################################## -// -// Section 0. Call up the right driver file and any options for it -// -// ################################################################################## - -// Only define one driver, the other ones must be commented out -//#define ILI9341_DRIVER #define ST7735_DRIVER -//#define ILI9163_DRIVER -//#define S6D02A1_DRIVER -//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation #define TFT_WIDTH 128 #define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 -// For ST7735 ONLY, define the type of display, originally this was based on the -// colour of the tab on the screen protector film but this is not always true, so try -// out the different options below if the screen does not display graphics correctly, -// e.g. colours wrong, mirror images, or tray pixels at the edges. -// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this -// this User_Setup file, then rebuild and upload the sketch to the board again: -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display #define ST7735_REDTAB -//#define ST7735_BLACKTAB -// ################################################################################## -// -// Section 1. Define the pins that are used to interface with the display here -// -// ################################################################################## - -// We must use hardware SPI, a minimum of 3 GPIO pins is needed. -// Typical setup for ESP8266 NodeMCU ESP-12 is : -// -// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT) -// Display LED to NodeMCU pin VIN (or 5V, see below) -// Display SCK to NodeMCU pin D5 -// Display SDI/MOSI to NodeMCU pin D7 -// Display DC (RS/AO)to NodeMCU pin D3 -// Display RESET to NodeMCU pin D4 (or RST, see below) -// Display CS to NodeMCU pin D8 (or GND, see below) -// Display GND to NodeMCU pin GND (0V) -// Display VCC to NodeMCU 5V or 3.3V -// -// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin -// -// The DC (Data Command) pin may be labeled AO or RS (Register Select) -// -// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more -// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS -// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin -// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected. -// -// The NodeMCU D0 pin can be used for RST -// -// See Section 2. below if DC or CS is connected to D0 -// -// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin -// If 5V is not available at a pin you can use 3.3V but backlight brightness -// will be lower. - - -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ###### - -// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation -//#define TFT_CS PIN_D8 // Chip select control pin D8 -//#define TFT_DC PIN_D3 // Data Command control pin -//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V - -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only - - -// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ###### - -// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact -// but saves pins for other functions. -// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode // In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 #define TFT_CS PIN_D3 @@ -108,57 +19,6 @@ // In ESP8266 overlap mode the following must be defined #define TFT_SPI_OVERLAP -// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### - -// For ESP32 Dev board (only tested with ILI9341 display) -// The hardware SPI can be mapped to any pins - -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin -//#define TFT_DC 2 // Data Command control pin -//#define TFT_RST 4 // Reset pin (could connect to RST pin) -//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST - -//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen - -//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only - -// For the M5Stack module use these #define lines -//#define TFT_MISO 19 -//#define TFT_MOSI 23 -//#define TFT_SCLK 18 -//#define TFT_CS 14 // Chip select control pin -//#define TFT_DC 27 // Data Command control pin -//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light - -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## - -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test - -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS - -// ################################################################################## -// -// Section 3. Define the fonts that are to be used here -// -// ################################################################################## - -// Comment out the #defines below with // to stop that font being loaded -// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not -// normally necessary. If all fonts are loaded the extra FLASH space required is -// about 17Kbytes. To save FLASH space only enable the fonts you need! #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters @@ -169,50 +29,13 @@ //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts -// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded -// this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - -// ################################################################################## -// -// Section 5. Other options -// -// ################################################################################## - -// Define the SPI clock frequency, this affects the graphics rendering speed. Too -// fast and the TFT driver will not keep up and display corruption appears. -// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails -// With a ST7735 display more than 27MHz may not work (spurious pixels and lines) -// With an ILI9163 display 27 MHz works OK. -// The RPi typically only works at 20MHz maximum. - -// #define SPI_FREQUENCY 1000000 -// #define SPI_FREQUENCY 5000000 -// #define SPI_FREQUENCY 10000000 // #define SPI_FREQUENCY 20000000 -#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 -// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 80000000 +#define SPI_FREQUENCY 27000000 -// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 -// Comment out the following #define if "SPI Transactions" do not need to be -// supported. When commented out the code size will be smaller and sketches will -// run slightly faster, so leave it commented out unless you need it! - -// Transaction support is needed to work with SD library but not needed with TFT_SdFat -// Transaction support is required if other SPI devices are connected. - -// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) -// so changing it here has no effect - // #define SUPPORT_TRANSACTIONS diff --git a/User_Setups/SetupX_Template.h b/User_Setups/SetupX_Template.h index 8b22cbc..534a634 100644 --- a/User_Setups/SetupX_Template.h +++ b/User_Setups/SetupX_Template.h @@ -6,27 +6,53 @@ // // If this file is edited correctly then all the library example sketches should // run without the need to make any more changes for a particular hardware setup! +// Note that some sketches are designed for a particular TFT pixel width/height + // ################################################################################## // -// Section 0. Call up the right driver file and any options for it +// Section 1. Call up the right driver file and any options for it // // ################################################################################## // Only define one driver, the other ones must be commented out #define ILI9341_DRIVER -//#define ST7735_DRIVER -//#define ILI9163_DRIVER +//#define ST7735_DRIVER // Define additional parameters below for this display +//#define ILI9163_DRIVER // Define additional parameters below for this display //#define S6D02A1_DRIVER //#define RPI_ILI9486_DRIVER // 20MHz maximum SPI +//#define HX8357D_DRIVER +//#define ILI9481_DRIVER +//#define ILI9486_DRIVER +//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high) +//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display +//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display +//#define R61581_DRIVER -// For M5Stack ESP32 module with integrated display ONLY, remove // in line below -//#define M5STACK +// Some displays support SPI reads via the MISO pin, other displays have a single +// bi-directional SDA pin and the library will try to read this via the MOSI line. +// To use the SDA line for reading data from the TFT uncomment the following line: -// For ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation -//#define TFT_WIDTH 128 -//#define TFT_HEIGHT 160 -//#define TFT_HEIGHT 128 +// #define TFT_SDA_READ // This option if for ESP32 ONLY, tested with ST7789 display only + +// For ST7789 ONLY, define the colour order IF the blue and red are swapped on your display +// Try ONE option at a time to find the correct colour order for your display + +// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + +// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below + +// #define M5STACK + +// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation +// #define TFT_WIDTH 80 +// #define TFT_WIDTH 128 +// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320 +// #define TFT_HEIGHT 160 +// #define TFT_HEIGHT 128 +// #define TFT_HEIGHT 240 // ST7789 240 x 240 +// #define TFT_HEIGHT 320 // ST7789 240 x 320 // For ST7735 ONLY, define the type of display, originally this was based on the // colour of the tab on the screen protector film but this is not always true, so try @@ -35,17 +61,33 @@ // Comment out ALL BUT ONE of these options for a ST7735 display driver, save this // this User_Setup file, then rebuild and upload the sketch to the board again: -//#define ST7735_INITB -//#define ST7735_GREENTAB -//#define ST7735_GREENTAB2 -//#define ST7735_GREENTAB3 -//#define ST7735_GREENTAB128 // For 128 x 128 display -//#define ST7735_REDTAB -//#define ST7735_BLACKTAB +// #define ST7735_INITB +// #define ST7735_GREENTAB +// #define ST7735_GREENTAB2 +// #define ST7735_GREENTAB3 +// #define ST7735_GREENTAB128 // For 128 x 128 display +// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset) +// #define ST7735_REDTAB +// #define ST7735_BLACKTAB +// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset + +// If colours are inverted (white shows as black) then uncomment one of the next +// 2 lines try both options, one of the options should correct the inversion. + +// #define TFT_INVERSION_ON +// #define TFT_INVERSION_OFF + +// If a backlight control signal is available then define the TFT_BL pin in Section 2 +// below. The backlight will be turned ON when tft.begin() is called, but the library +// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be +// driven with a PWM signal or turned OFF/ON then this must be handled by the user +// sketch. e.g. with digitalWrite(TFT_BL, LOW); + +// #define TFT_BACKLIGHT_ON HIGH // HIGH or LOW are options // ################################################################################## // -// Section 1. Define the pins that are used to interface with the display here +// Section 2. Define the pins that are used to interface with the display here // // ################################################################################## @@ -73,7 +115,6 @@ // // The NodeMCU D0 pin can be used for RST // -// See Section 2. below if DC or CS is connected to D0 // // Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin // If 5V is not available at a pin you can use 3.3V but backlight brightness @@ -86,9 +127,11 @@ #define TFT_CS PIN_D8 // Chip select control pin D8 #define TFT_DC PIN_D3 // Data Command control pin #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) -//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V +//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -//#define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen +//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin) + +//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen //#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only @@ -99,14 +142,15 @@ // but saves pins for other functions. // Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode +// In ESP8266 overlap mode the following must be defined +//#define TFT_SPI_OVERLAP + // In ESP8266 overlap mode the TFT chip select MUST connect to pin D3 //#define TFT_CS PIN_D3 //#define TFT_DC PIN_D5 // Data Command control pin //#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V -// In ESP8266 overlap mode the following must be defined -//#define TFT_SPI_OVERLAP // ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ###### @@ -116,14 +160,16 @@ //#define TFT_MISO 19 //#define TFT_MOSI 23 //#define TFT_SCLK 18 -//#define TFT_CS 15 // Chip select control pin +//#define TFT_CS 15 // Chip select control pin //#define TFT_DC 2 // Data Command control pin //#define TFT_RST 4 // Reset pin (could connect to RST pin) //#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST -//#define TOUCH_CS 22 // Chip select pin (T_CS) of touch screen +//#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin) -//#define TFT_WR 21 // Write strobe for modified Raspberry Pi TFT only +//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen + +//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only // For the M5Stack module use these #define lines //#define TFT_MISO 19 @@ -132,23 +178,37 @@ //#define TFT_CS 14 // Chip select control pin //#define TFT_DC 27 // Data Command control pin //#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin) -//#define TFT_BL 32 // LED back-light +//#define TFT_BL 32 // LED back-light (required for M5Stack) +// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ###### -// ################################################################################## -// -// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only) -// -// ################################################################################## +// The library supports 8 bit parallel TFTs with the ESP32, the pin +// selection below is compatible with ESP32 boards in UNO format. +// Wemos D32 boards need to be modified, see diagram in Tools folder. +// Only ILI9481 and ILI9341 based displays have been tested! -// Normally the library uses direct register access for the DC and CS lines for speed -// If D0 (GPIO16) is used for CS or DC then a different slower method must be used -// Uncomment one line if D0 is used for DC or CS -// DC on D0 = 6% performance penalty at 40MHz SPI running graphics test -// CS on D0 = 2% performance penalty at 40MHz SPI running graphics test +// Parallel bus is only supported on ESP32 +// Uncomment line below to use ESP32 Parallel interface instead of SPI + +//#define ESP32_PARALLEL + +// The ESP32 and TFT the pins used for testing are: +//#define TFT_CS 33 // Chip select control pin (library pulls permanently low +//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31 +//#define TFT_RST 32 // Reset pin, toggles on startup + +//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31 +//#define TFT_RD 2 // Read strobe control pin + +//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus +//#define TFT_D1 13 // so a single register write sets/clears all bits. +//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect +//#define TFT_D3 25 // TFT screen update performance. +//#define TFT_D4 17 +//#define TFT_D5 16 +//#define TFT_D6 27 +//#define TFT_D7 14 -// #define D0_USED_FOR_DC -// #define D0_USED_FOR_CS // ################################################################################## // @@ -165,25 +225,19 @@ #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm -#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. -//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts // Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded // this will save ~20kbytes of FLASH #define SMOOTH_FONT -// ################################################################################## -// -// Section 4. Not used -// -// ################################################################################## - // ################################################################################## // -// Section 5. Other options +// Section 4. Other options // // ################################################################################## @@ -200,12 +254,18 @@ // #define SPI_FREQUENCY 20000000 #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3 // #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS -// #define SPI_FREQUENCY 53400000 // #define SPI_FREQUENCY 80000000 +// Optional reduced SPI frequency for reading TFT +#define SPI_READ_FREQUENCY 20000000 + // The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here: #define SPI_TOUCH_FREQUENCY 2500000 +// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default. +// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam) +// then uncomment the following line to use the HSPI port: +//#define USE_HSPI_PORT // Comment out the following #define if "SPI Transactions" do not need to be // supported. When commented out the code size will be smaller and sketches will diff --git a/User_Setups/User_Custom_Fonts.h b/User_Setups/User_Custom_Fonts.h index ef9e0ae..f2dc3d3 100644 --- a/User_Setups/User_Custom_Fonts.h +++ b/User_Setups/User_Custom_Fonts.h @@ -13,9 +13,10 @@ ^^^^ */ -// When font files are placed in the Custom folder then they must also be #included here: +// When font files are placed in the Custom folder (TFT_eSPI\Fonts\Custom) then they must +// also be #included here: -// The comment added is a shorthand reference but this is not essential +// The CF_OL24 etc are a shorthand reference, but this is not essential to use the fonts #ifdef LOAD_GFXFF diff --git a/examples/160 x 128/Flash_Bitmap2/Alert.h b/examples/160 x 128/Flash_Bitmap2/Alert.h deleted file mode 100644 index 54d013d..0000000 --- a/examples/160 x 128/Flash_Bitmap2/Alert.h +++ /dev/null @@ -1,42 +0,0 @@ -// We need this header file to use FLASH as storage with PROGMEM directive: -#include - -// Icon width and height -const uint16_t alertWidth = 32; -const uint16_t alertHeight = 32; - -// The icon file can be created with the "UTFT ImageConverter 565" bitmap to .c file creation utility, more can be pasted in here -const unsigned short alert[1024] PROGMEM={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0840,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 0, 32 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1080,0xAC66,0xEDE8,0xFE69,0xC4C6,0x2901,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 1, 64 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xBCC6,0xFE68,0xFE68,0xFE6A,0xFE68,0xEDE8,0x18A1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 2, 96 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8344,0xFE48,0xFE8C,0xFFDD,0xFFFF,0xFEF0,0xFE48,0xB466,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 3, 128 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1880,0xEDC7,0xFE48,0xFF99,0xFFBC,0xFF9B,0xFFBD,0xFE6A,0xFE48,0x5A23,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 4, 160 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9BE5,0xFE28,0xFED0,0xFFBC,0xFF7A,0xFF9A,0xFF9B,0xFF35,0xFE28,0xBCA6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 5, 192 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3962,0xFE28,0xFE28,0xFF9A,0xFF79,0xFF9A,0xFF9B,0xFF9A,0xFFBD,0xFE6B,0xFE28,0x72E3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 6, 224 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xB465,0xFE28,0xFEF2,0xFF7A,0xFF79,0xFF7A,0xFF9A,0xFF7A,0xFF7A,0xFF78,0xFE28,0xDD67,0x0860,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 7, 256 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5A22,0xFE07,0xFE29,0xFF9B,0xFF37,0xFF58,0xFF79,0xFF79,0xFF79,0xFF58,0xFF9B,0xFEAE,0xFE07,0x93A4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 8, 288 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xC4A5,0xFE07,0xFF15,0xFF37,0xFF36,0xAD11,0x2965,0x2965,0xCDF4,0xFF37,0xFF37,0xFF79,0xFE07,0xFE07,0x2901,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 9, 320 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7B03,0xFDE7,0xFE4B,0xFF79,0xFEF4,0xFF15,0xB552,0x2945,0x2945,0xDE55,0xFF16,0xFF15,0xFF58,0xFED1,0xFDE7,0xAC25,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 10, 352 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0840,0xDD26,0xFDE7,0xFF57,0xFED3,0xFED2,0xFEF4,0xBD93,0x2124,0x2124,0xDE75,0xFF14,0xFED3,0xFED3,0xFF7A,0xFE08,0xFDE7,0x49A2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 11, 384 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9BA4,0xFDC6,0xFE6E,0xFF36,0xFE90,0xFEB1,0xFED3,0xC592,0x2124,0x2124,0xE675,0xFED3,0xFEB2,0xFEB1,0xFEF3,0xFEF3,0xFDC6,0xBC45,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 12, 416 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3141,0xF5C6,0xF5C7,0xFF58,0xFE90,0xFE6F,0xFE8F,0xFEB1,0xCDB2,0x2104,0x2104,0xF6B4,0xFEB1,0xFE90,0xFE8F,0xFE90,0xFF58,0xFE0A,0xF5C6,0x72A3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 13, 448 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xABE4,0xF5A6,0xFEB1,0xFED3,0xFE4E,0xFE6E,0xFE6F,0xFE90,0xD5F2,0x18E3,0x18E3,0xFED4,0xFE90,0xFE6F,0xFE6F,0xFE6E,0xFE91,0xFF36,0xF5A6,0xCCA5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 14, 480 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x5202,0xF5A6,0xF5C7,0xFF58,0xFE4D,0xFE4D,0xFE4D,0xFE4E,0xFE6F,0xDE11,0x18C3,0x18C3,0xFED3,0xFE6F,0xFE6E,0xFE4E,0xFE4D,0xFE4D,0xFF16,0xFE2C,0xF5A6,0x9363,0x0000,0x0000,0x0000,0x0000,0x0000, // row 15, 512 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0xBC44,0xF585,0xFED3,0xFE6F,0xFE2C,0xFE2C,0xFE2D,0xFE4D,0xFE4E,0xE630,0x10A2,0x2104,0xFED1,0xFE4E,0xFE4D,0xFE4D,0xFE2D,0xFE2C,0xFE4D,0xFF37,0xF586,0xF585,0x28E1,0x0000,0x0000,0x0000,0x0000, // row 16, 544 pixels -0x0000,0x0000,0x0000,0x0000,0x7282,0xF565,0xF5EA,0xFF16,0xFE0B,0xFE0B,0xFE0B,0xFE2C,0xFE2C,0xFE4D,0xF670,0x1082,0x2924,0xFEB0,0xFE2D,0xFE2C,0xFE2C,0xFE2C,0xFE0B,0xFE0B,0xFEB2,0xFE6F,0xF565,0xA383,0x0000,0x0000,0x0000,0x0000, // row 17, 576 pixels -0x0000,0x0000,0x0000,0x0840,0xD4C4,0xF565,0xFEF5,0xFE0C,0xFDE9,0xFDEA,0xFE0A,0xFE0B,0xFE0B,0xFE2C,0xFE8F,0x0861,0x2964,0xFE8F,0xFE2C,0xFE0B,0xFE0B,0xFE0B,0xFE0A,0xFDEA,0xFE0B,0xFF37,0xF586,0xF565,0x4181,0x0000,0x0000,0x0000, // row 18, 608 pixels -0x0000,0x0000,0x0000,0x9343,0xF545,0xF60C,0xFED3,0xFDC8,0xFDC8,0xFDC9,0xFDE9,0xFDEA,0xFDEA,0xFE0B,0xFE8E,0x0861,0x3184,0xFE6D,0xFE0B,0xFE0A,0xFDEA,0xFDEA,0xFDE9,0xFDC9,0xFDC9,0xFE4E,0xFEB2,0xF545,0xB3E3,0x0000,0x0000,0x0000, // row 19, 640 pixels -0x0000,0x0000,0x28E0,0xF544,0xF545,0xFF17,0xFDC8,0xFDA7,0xFDA7,0xFDC8,0xFDC8,0xFDC9,0xFDC9,0xFDE9,0xFE6C,0x10A2,0x39C4,0xFE4C,0xFDEA,0xFDE9,0xFDC9,0xFDC9,0xFDC8,0xFDC8,0xFDA7,0xFDA8,0xFF16,0xF588,0xF544,0x6222,0x0000,0x0000, // row 20, 672 pixels -0x0000,0x0000,0xA383,0xF524,0xF64E,0xFE4E,0xFD86,0xFD86,0xFD87,0xFDA7,0xFDA7,0xFDA8,0xFDC8,0xFDC8,0xFE2A,0xA469,0xB4EA,0xFE2A,0xFDC9,0xFDC8,0xFDC8,0xFDA8,0xFDA7,0xFDA7,0xFD87,0xFD86,0xFDEA,0xFED3,0xF524,0xC443,0x0000,0x0000, // row 21, 704 pixels -0x0000,0x51C1,0xF504,0xF546,0xFF16,0xF565,0xFD65,0xFD65,0xFD86,0xFD86,0xFD86,0xFDA7,0xFDA7,0xFDA7,0xFDE8,0xFE6A,0xFE4A,0xFDE8,0xFDA7,0xFDA7,0xFDA7,0xFDA7,0xFD86,0xFD86,0xFD86,0xFD65,0xFD65,0xFEB2,0xF5CA,0xF504,0x8AE2,0x0000, // row 22, 736 pixels -0x0000,0xB3A2,0xED03,0xFE92,0xFDC9,0xF543,0xF544,0xFD44,0xFD65,0xFD65,0xFD65,0xFD86,0xFD86,0xFD86,0xFDA7,0xFDC7,0xFDC7,0xFDA7,0xFD86,0xFD86,0xFD86,0xFD86,0xFD65,0xFD65,0xFD65,0xFD44,0xF544,0xFD86,0xFEF5,0xED03,0xE4C3,0x1880, // row 23, 768 pixels -0x7241,0xECE3,0xF567,0xFED3,0xF523,0xF523,0xF523,0xF543,0xF544,0xF544,0xFD65,0xFD65,0xFD65,0xFD65,0xD4E6,0x39C5,0x39A5,0xD4E6,0xFD86,0xFD65,0xFD65,0xFD65,0xFD65,0xF544,0xF544,0xF543,0xF523,0xF523,0xFE2E,0xF5EC,0xECE3,0x9B42, // row 24, 800 pixels -0xD443,0xECE3,0xFED4,0xF565,0xF502,0xF502,0xF522,0xF523,0xF523,0xF543,0xF544,0xF544,0xF544,0xFD65,0x8B64,0x18C3,0x18C3,0x8344,0xFD85,0xFD44,0xF544,0xF544,0xF544,0xF543,0xF523,0xF523,0xF522,0xF502,0xF523,0xFEF5,0xED04,0xECE3, // row 25, 832 pixels -0xECC3,0xF5AB,0xFE6F,0xF501,0xF4E1,0xF501,0xF502,0xF502,0xF522,0xF522,0xF523,0xF523,0xF523,0xFD84,0xC504,0x20E1,0x18E1,0xC4E4,0xFD84,0xF543,0xF523,0xF523,0xF523,0xF522,0xF522,0xF502,0xF502,0xF501,0xF501,0xFDC9,0xF62F,0xECC3, // row 26, 864 pixels -0xECC2,0xFE92,0xF523,0xF4E0,0xF4E0,0xF4E1,0xF4E1,0xF501,0xF501,0xF502,0xF502,0xF522,0xF522,0xF543,0xFDE3,0xFEA5,0xF6A4,0xFE04,0xF543,0xF522,0xF522,0xF522,0xF502,0xF502,0xF501,0xF501,0xF4E1,0xF4E1,0xF4E0,0xF4E1,0xFED4,0xECC2, // row 27, 896 pixels -0xECA2,0xF5EC,0xF4E0,0xF4C0,0xF4E0,0xF4E0,0xF4E0,0xF4E1,0xF4E1,0xF501,0xF501,0xF501,0xF502,0xF502,0xF542,0xFDA2,0xFDA2,0xF542,0xF502,0xF502,0xF502,0xF501,0xF501,0xF501,0xF4E1,0xF4E1,0xF4E0,0xF4E0,0xF4E0,0xF4C0,0xF5A9,0xECA2, // row 28, 928 pixels -0xECA2,0xECA2,0xECC2,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4E1,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xECC2,0xECC3,0xECA2, // row 29, 960 pixels -0x8AC1,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0x9B01, // row 30, 992 pixels -0x0000,0x1880,0x51A0,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x61E0,0x28E0,0x0000}; // row 31, 1024 pixels - diff --git a/examples/160 x 128/Flash_Bitmap2/Close.h b/examples/160 x 128/Flash_Bitmap2/Close.h deleted file mode 100644 index ce676c9..0000000 --- a/examples/160 x 128/Flash_Bitmap2/Close.h +++ /dev/null @@ -1,41 +0,0 @@ -// We need this header file to use FLASH as storage with PROGMEM directive: -#include - -// Icon width and height -const uint16_t closeWidth = 32; -const uint16_t closeHeight = 32; - -// The icon file can be created with the "UTFT ImageConverter 565" bitmap to .c file creation utility, more can be pasted in here -const unsigned short closeX[1024] PROGMEM={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x30C3,0x4124,0x61C7,0x61C7,0x4124,0x30E3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 0, 32 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48E3,0xA249,0xEB8E,0xFCB2,0xFD14,0xFD75,0xFD96,0xFD34,0xFCF3,0xEBEF,0xA28A,0x4904,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 1, 64 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58E3,0xC228,0xFC10,0xFD34,0xFE18,0xFE59,0xFE79,0xFE9A,0xFE9A,0xFE9A,0xFE9A,0xFE59,0xFD75,0xFC51,0xC28A,0x5904,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 2, 96 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2041,0x8945,0xF34D,0xFD34,0xFDB6,0xFD75,0xFD55,0xFD55,0xFD96,0xFDD7,0xFDF7,0xFDF7,0xFDB6,0xFDB6,0xFDD7,0xFDF7,0xFD75,0xF38E,0x8965,0x2041,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 3, 128 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x4082,0xE208,0xF410,0xFD34,0xFC92,0xFBEF,0xFBAE,0xFBEF,0xFC71,0xFD14,0xFD75,0xFDB6,0xFD75,0xFD14,0xFC92,0xFC51,0xFC71,0xFCF3,0xFD75,0xFC30,0xEA28,0x40A2,0x0000,0x0000,0x0000,0x0000,0x0000, // row 4, 160 pixels -0x0000,0x0000,0x0000,0x0000,0x3861,0xE1E7,0xF451,0xFC92,0xFB4D,0xFA49,0xFA49,0xFAEB,0xFBAE,0xFC71,0xFD34,0xFDB6,0xFE18,0xFDB6,0xFD34,0xFC71,0xFBAE,0xFB0C,0xFAEB,0xFBAE,0xFCD3,0xFC71,0xE208,0x4082,0x0000,0x0000,0x0000,0x0000, // row 5, 192 pixels -0x0000,0x0000,0x0000,0x1020,0xD986,0xF430,0xFC30,0xFA28,0xF924,0xF965,0xFA8A,0xFB0C,0xFBAE,0xFC51,0xFD14,0xFD75,0xFDB6,0xFD75,0xFD14,0xFC51,0xFC71,0xFBEF,0xFA28,0xF9C7,0xFA8A,0xFC51,0xF430,0xD9A6,0x1020,0x0000,0x0000,0x0000, // row 6, 224 pixels -0x0000,0x0000,0x0000,0x78A2,0xEB6D,0xFC30,0xF9C7,0xF861,0xF8A2,0xFA08,0xFEDB,0xFD55,0xFB4D,0xFC10,0xFC92,0xFD14,0xFD34,0xFD14,0xFC92,0xFCB2,0xFF7D,0xFF7D,0xFB2C,0xF945,0xF8E3,0xF9E7,0xFC30,0xEB8E,0x78C3,0x0000,0x0000,0x0000, // row 7, 256 pixels -0x0000,0x0000,0x3841,0xD9E7,0xF492,0xF208,0xF041,0xF800,0xF945,0xFE9A,0xFFFF,0xFFFF,0xFD75,0xFB8E,0xFC10,0xFC51,0xFC71,0xFC51,0xFCB2,0xFF7D,0xFFFF,0xFFFF,0xFF3C,0xFA8A,0xF882,0xF841,0xFA08,0xFC92,0xDA08,0x3841,0x0000,0x0000, // row 8, 288 pixels -0x0000,0x0000,0x88A2,0xEBCF,0xF2EB,0xF061,0xF000,0xF8E3,0xFE79,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFD75,0xFB4D,0xFBAE,0xFBAE,0xFC71,0xFF7D,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFEFB,0xFA28,0xF800,0xF061,0xF2EB,0xEBEF,0x90C3,0x0000,0x0000, // row 9, 320 pixels -0x0000,0x2820,0xD1C7,0xF410,0xE945,0xE800,0xF000,0xFE9A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFD34,0xFAEB,0xFBCF,0xFF5D,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFF1C,0xF986,0xF000,0xF145,0xF410,0xD1E7,0x2820,0x0000, // row 10, 352 pixels -0x0000,0x6841,0xDB2C,0xEACB,0xE041,0xE800,0xF000,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFD14,0xFF1C,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFBCF,0xF082,0xF000,0xE841,0xEACB,0xE34D,0x7061,0x0000, // row 11, 384 pixels -0x0000,0x9861,0xE3CF,0xE186,0xE000,0xE800,0xE800,0xF145,0xFEDB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB8E,0xF000,0xF000,0xE800,0xE800,0xE986,0xEBCF,0xA082,0x0000, // row 12, 416 pixels -0x0800,0xB8A2,0xE3AE,0xD8A2,0xD800,0xE000,0xE800,0xE800,0xF145,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB8E,0xF000,0xF000,0xE800,0xE800,0xE000,0xE0A2,0xEBAE,0xC0C3,0x0800, // row 13, 448 pixels -0x1800,0xC124,0xE30C,0xD020,0xD800,0xE000,0xE000,0xE800,0xE800,0xF145,0xFEDB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB8E,0xF000,0xF000,0xE800,0xE800,0xE000,0xE000,0xD820,0xE30C,0xC124,0x1800, // row 14, 480 pixels -0x2800,0xC165,0xDAAA,0xC800,0xD000,0xD800,0xE000,0xE000,0xE800,0xE800,0xF124,0xFE79,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB6D,0xF000,0xF000,0xE800,0xE800,0xE000,0xE000,0xD800,0xD000,0xDAAA,0xC165,0x2800, // row 15, 512 pixels -0x2000,0xB924,0xD269,0xC800,0xD000,0xD000,0xD800,0xE000,0xE000,0xE800,0xE924,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xF36D,0xE800,0xE800,0xE800,0xE000,0xE000,0xD800,0xD000,0xD000,0xDA69,0xC145,0x2800, // row 16, 544 pixels -0x1000,0xB0A2,0xD28A,0xC000,0xC800,0xD000,0xD000,0xD800,0xD800,0xE165,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xF3AE,0xE000,0xE000,0xD800,0xD800,0xD000,0xD000,0xC800,0xD28A,0xB8C3,0x1000, // row 17, 576 pixels -0x0000,0xA800,0xD2AA,0xB800,0xC000,0xC800,0xC800,0xD000,0xD965,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xEBAE,0xD800,0xD800,0xD000,0xC800,0xC800,0xC000,0xD2AA,0xB020,0x0000, // row 18, 608 pixels -0x0000,0x8000,0xCA69,0xB841,0xB800,0xC000,0xC800,0xD186,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xEBCF,0xD000,0xC800,0xC800,0xC000,0xC041,0xCA69,0x8000,0x0000, // row 19, 640 pixels -0x0000,0x4800,0xC1C7,0xB8E3,0xB800,0xB800,0xC000,0xF69A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xEBEF,0xFE79,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE410,0xC841,0xC000,0xB800,0xC0E3,0xC1C7,0x4800,0x0000, // row 20, 672 pixels -0x0000,0x1000,0xB061,0xC1E7,0xB000,0xB000,0xB800,0xD269,0xFFBE,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE38E,0xD000,0xD965,0xF69A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xDB0C,0xC020,0xB800,0xB000,0xC1E7,0xB061,0x1000,0x0000, // row 21, 704 pixels -0x0000,0x0000,0x6000,0xB9C7,0xB061,0xB000,0xB000,0xB800,0xCA49,0xFF9E,0xFFFF,0xFFFF,0xFFFF,0xE38E,0xC800,0xC800,0xC800,0xD186,0xF69A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xDB0C,0xB800,0xB800,0xB000,0xB061,0xC1C7,0x6000,0x0000,0x0000, // row 22, 736 pixels -0x0000,0x0000,0x1800,0xB041,0xB986,0xA800,0xA800,0xB000,0xB000,0xCA49,0xFF7D,0xFFFF,0xDB8E,0xC000,0xC000,0xC000,0xC000,0xC000,0xC986,0xF6DB,0xFFFF,0xFFFF,0xD30C,0xB800,0xB000,0xB000,0xA800,0xB986,0xB041,0x1800,0x0000,0x0000, // row 23, 768 pixels -0x0000,0x0000,0x0000,0x5800,0xB0E3,0xA8C3,0xA800,0xA800,0xA800,0xB000,0xCACB,0xD38E,0xB000,0xB800,0xB800,0xB800,0xB800,0xB800,0xB800,0xC145,0xF6DB,0xD34D,0xB000,0xB000,0xA800,0xA800,0xB0C3,0xB0E3,0x5800,0x0000,0x0000,0x0000, // row 24, 800 pixels -0x0000,0x0000,0x0000,0x0000,0x6000,0xB124,0xA882,0xA000,0xA800,0xA800,0xA800,0xA800,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xA800,0xA800,0xA800,0xA800,0xA882,0xB124,0x6000,0x0000,0x0000,0x0000,0x0000, // row 25, 832 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x6000,0xB104,0xA882,0xA000,0xA000,0xA000,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA000,0xA000,0xA882,0xB104,0x6000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 26, 864 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6000,0xB0A2,0xA8C3,0xA020,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA020,0xA8C3,0xB0A2,0x6000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 27, 896 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4800,0xA800,0xB0C3,0xA0A2,0x9800,0x9800,0x9800,0x9800,0xA000,0xA000,0xA000,0x9800,0x9800,0x9800,0xA082,0xB0E3,0xA800,0x4800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 28, 928 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5800,0xA800,0xB0A2,0xA8E3,0xA0A2,0xA041,0x9800,0x9800,0xA041,0xA0A2,0xA8E3,0xB0A2,0xA800,0x5800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 29, 960 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3000,0x6000,0x8800,0xA000,0xA800,0xA800,0xA000,0x8800,0x6000,0x3000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 30, 992 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; // row 31, 1024 pixels diff --git a/examples/160 x 128/Flash_Bitmap2/Flash_Bitmap2.ino b/examples/160 x 128/Flash_Bitmap2/Flash_Bitmap2.ino deleted file mode 100644 index 42099e9..0000000 --- a/examples/160 x 128/Flash_Bitmap2/Flash_Bitmap2.ino +++ /dev/null @@ -1,110 +0,0 @@ -// Code partly derived from ILI9341_Due library example - -// Draws the 3 icons across the middle of the screen and pauses. -// Then draws 300 icons at random locations, clears screen and repeats -// -// This demonstrates drawing icons from FLASH - -// Icons are stored in tabs, e.g. Alert.h etc -// more than one icon can be in a header file. - -// Original sketch header follow: -/* - This sketch demonstrates loading images from arrays stored in program (FLASH) memory. - - This sketch does not use/need any fonts at all... - - Arrays containing FLASH images can be created with UTFT library tool: - (libraries\UTFT\Tools\ImageConverter565.exe) - Convert to .c format then copy into a new tab - - The number and size of icons is limited by available FLASH memory. The icon array will - use width x height x 2 bytes of FLASH, i.e. 32 x 32 icon uses ~2048 bytes - -*/ -#include // Graphics and font library for ST7735 driver chip -#include - -TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h - -// Include the header files that contain the icons -#include "Alert.h" -#include "Close.h" -#include "Info.h" - -long count = 0; // Loop count - -void setup() -{ - Serial.begin(115200); - tft.init(); - tft.setRotation(1); // landscape - - tft.fillScreen(TFT_BLACK); - - // Draw the icons - drawIcon(info, (tft.width() - infoWidth)/2 - 50, (tft.height() - infoHeight)/2, infoWidth, infoHeight); - drawIcon(alert, (tft.width() - alertWidth)/2, (tft.height() - alertHeight)/2, alertWidth, alertHeight); - drawIcon(closeX, (tft.width() - closeWidth)/2 + 50, (tft.height() - closeHeight)/2, closeWidth, closeHeight); - - // Pause here to admire the icons! - delay(4000); - -} - -void loop() -{ - // Loop filling and clearing screen - drawIcon(info, random(tft.width() - infoWidth), random(tft.height() - infoHeight), infoWidth, infoHeight); - drawIcon(alert, random(tft.width() - alertWidth), random(tft.height() - alertHeight), alertWidth, alertHeight); - drawIcon(closeX, random(tft.width() - closeWidth), random(tft.height() - closeHeight), alertWidth, closeHeight); - - // Clear screen after 100 x 3 = 300 icons drawn - if (100 == count++) { - count = 1; - tft.setRotation(2 * random(2)); // Rotate randomly to clear display left>right or right>left to reduce monotony! - tft.fillScreen(TFT_BLACK); - tft.setRotation(1); - Serial.println(millis()); - } -} - - -//==================================================================================== -// This is the function to draw the icon stored as an array in program memory (FLASH) -//==================================================================================== - -// To speed up rendering we use a 64 pixel buffer -#define BUFF_SIZE 64 - -// Draw array "icon" of defined width and height at coordinate x,y -// Maximum icon size is 255x255 pixels to avoid integer overflow - -void drawIcon(const unsigned short* icon, int16_t x, int16_t y, uint16_t width, uint16_t height) { - - uint16_t pix_buffer[BUFF_SIZE]; // Pixel buffer (16 bits per pixel) - - // Set up a window the right size to stream pixels into - tft.setAddrWindow(x, y, x + width - 1, y + height - 1); - - // Work out the number whole buffers to send - uint16_t nb = ((uint16_t)height * width) / BUFF_SIZE; - - // Fill and send "nb" buffers to TFT - for (int i = 0; i < nb; i++) { - for (int j = 0; j < BUFF_SIZE; j++) { - pix_buffer[j] = pgm_read_word(&icon[i * BUFF_SIZE + j]); - } - tft.pushColors(pix_buffer, BUFF_SIZE); - } - - // Work out number of pixels not yet sent - uint16_t np = ((uint16_t)height * width) % BUFF_SIZE; - - // Send any partial buffer left over - if (np) { - for (int i = 0; i < np; i++) pix_buffer[i] = pgm_read_word(&icon[nb * BUFF_SIZE + i]); - tft.pushColors(pix_buffer, np); - } -} - diff --git a/examples/160 x 128/Flash_Bitmap2/Info.h b/examples/160 x 128/Flash_Bitmap2/Info.h deleted file mode 100644 index c4ee633..0000000 --- a/examples/160 x 128/Flash_Bitmap2/Info.h +++ /dev/null @@ -1,41 +0,0 @@ -// We need this header file to use FLASH as storage with PROGMEM directive: -#include - -// Icon width and height -const uint16_t infoWidth = 32; -const uint16_t infoHeight = 32; - -// The icon file can be created with the "UTFT ImageConverter 565" bitmap to .c file creation utility, more can be pasted in here -const unsigned short info[1024] PROGMEM={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 0, 32 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0861,0x4A69,0x8C71,0xA514,0xBDF7,0xBDF7,0xA514,0x8C71,0x4A69,0x0861,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 1, 64 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x39E7,0x9CF3,0xEF7D,0xF79E,0xFFDF,0xFFDF,0xFFDF,0xFFDF,0xFFDF,0xFFDF,0xF79E,0xEF7D,0x9CF3,0x39E7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 2, 96 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2965,0x9492,0xF79E,0xFFDF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFDF,0xF79E,0x9492,0x2965,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 3, 128 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x630C,0xEF7D,0xFFDF,0xFFFF,0xFFFF,0xFFFF,0xD75F,0xB6BF,0x9E5F,0x963F,0x963F,0x9E5F,0xB6BF,0xD75F,0xFFFF,0xFFFF,0xFFFF,0xFFDF,0xEF7D,0x630C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 4, 160 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x73AE,0xEF7D,0xFFDF,0xFFFF,0xFFDF,0xBEDF,0x7DBF,0x7DBF,0x7DDF,0x7DDF,0x7DDF,0x7DDF,0x7DDF,0x7DBF,0x759F,0x7DBE,0xBEBF,0xFFDF,0xFFFF,0xFFDF,0xEF7D,0x73AE,0x0000,0x0000,0x0000,0x0000,0x0000, // row 5, 192 pixels -0x0000,0x0000,0x0000,0x0000,0x630C,0xEF7D,0xFFFF,0xFFFF,0xE77F,0x7DBE,0x759E,0x759F,0x7DBF,0x7DDF,0x7DDF,0x85FF,0x7DDF,0x7DDF,0x7DBF,0x759F,0x759E,0x6D7E,0x7DBE,0xDF7F,0xFFFF,0xFFFF,0xEF7D,0x630C,0x0000,0x0000,0x0000,0x0000, // row 6, 224 pixels -0x0000,0x0000,0x0000,0x31A6,0xEF5D,0xFFDF,0xFFFF,0xCF1E,0x6D7E,0x6D7E,0x759E,0x759F,0x7DBF,0x7DDF,0x8E1F,0xBEDF,0xC6FF,0x8DFF,0x75BF,0x759F,0x759E,0x6D7E,0x655E,0x655D,0xCF1E,0xFFFF,0xFFDF,0xEF5D,0x31A6,0x0000,0x0000,0x0000, // row 7, 256 pixels -0x0000,0x0000,0x0000,0x94B2,0xF7BE,0xFFFF,0xDF5E,0x655D,0x655D,0x6D7E,0x6D7E,0x759E,0x75BF,0x759F,0xEFBF,0xFFFF,0xFFFF,0xEFBF,0x759F,0x759E,0x6D7E,0x6D7E,0x655D,0x653D,0x653D,0xDF5E,0xFFFF,0xF7BE,0x94B2,0x0000,0x0000,0x0000, // row 8, 288 pixels -0x0000,0x0000,0x4228,0xEF7D,0xFFFF,0xF7BF,0x6D5D,0x653D,0x655D,0x6D5E,0x6D7E,0x759E,0x759E,0x85DF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8DFE,0x6D7E,0x6D7E,0x6D5E,0x655D,0x653D,0x5D1D,0x6D5D,0xF7BF,0xFFFF,0xEF7D,0x4228,0x0000,0x0000, // row 9, 320 pixels -0x0000,0x0000,0xA534,0xFFDF,0xFFDF,0xA65D,0x5D1D,0x5D1D,0x653D,0x655E,0x6D7E,0x6D7E,0x6D7E,0x651E,0xE77F,0xFFFF,0xFFFF,0xF7BF,0x5CFE,0x6D7E,0x6D7E,0x655E,0x653D,0x5D1D,0x5D1D,0x54FC,0xA65D,0xFFDF,0xFFDF,0xA534,0x0000,0x0000, // row 10, 352 pixels -0x0000,0x18E3,0xEF5D,0xFFFF,0xEF9E,0x5CFC,0x54FC,0x5D1D,0x5D3D,0x653D,0x655E,0x6D7E,0x6D7E,0x653E,0x6D3E,0xB67E,0xBEBE,0x755E,0x5D1E,0x6D5E,0x655E,0x653D,0x5D3D,0x5D1D,0x54FC,0x54DC,0x54FC,0xEF9E,0xFFFF,0xEF5D,0x18E3,0x0000, // row 11, 384 pixels -0x0000,0x630C,0xEF7D,0xFFDF,0xB69D,0x54DC,0x54FC,0x5CFC,0x5D1D,0x653D,0x653D,0x655E,0x6D5E,0x655E,0x5CFE,0x4C9D,0x4C7D,0x54DD,0x653E,0x655E,0x653D,0x653D,0x5D1D,0x5CFC,0x54FC,0x54DC,0x4CBC,0xB69D,0xFFDF,0xEF7D,0x630C,0x0000, // row 12, 416 pixels -0x0000,0x94B2,0xF7BE,0xFFDF,0x85BC,0x4CBC,0x54DC,0x54FC,0x5CFD,0x5D1D,0x5D3D,0x653D,0x655D,0x653D,0x85DE,0xC6FE,0xC6FE,0x85BE,0x653D,0x653D,0x5D3D,0x5D1D,0x5CFD,0x54FC,0x54DC,0x4CBC,0x4CBB,0x85BC,0xFFDF,0xF7BE,0x94B2,0x0000, // row 13, 448 pixels -0x0000,0xB5B6,0xFFDF,0xF7BE,0x651C,0x4CBB,0x4CBC,0x54DC,0x54FC,0x5CFC,0x5D1D,0x5D1D,0x653D,0x5D1D,0xE77E,0xFFDF,0xFFDF,0xEF9E,0x5CFD,0x5D1D,0x5D1D,0x5CFC,0x54FC,0x54DC,0x4CBC,0x4CBB,0x449B,0x651B,0xF7BE,0xFFDF,0xB5B6,0x0000, // row 14, 480 pixels -0x0000,0xC638,0xFFDF,0xF7BE,0x54DB,0x449B,0x4CBB,0x4CBC,0x54DC,0x54FC,0x54FC,0x5D1D,0x5D1D,0x7D7D,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0x7D7D,0x5CFD,0x54FC,0x54FC,0x54DC,0x4CBC,0x4CBB,0x449B,0x447B,0x54BB,0xF7BE,0xFFDF,0xC638,0x0000, // row 15, 512 pixels -0x0000,0xC638,0xFFDF,0xF79E,0x4CBB,0x449B,0x449B,0x4CBB,0x4CBC,0x54DC,0x54DC,0x54FC,0x54DC,0x753C,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0x753C,0x54DC,0x54DC,0x54DC,0x4CBC,0x4CBB,0x449B,0x449B,0x3C7B,0x4C9B,0xF79E,0xFFDF,0xC638,0x0000, // row 16, 544 pixels -0x0000,0xB5B6,0xFFDF,0xF7BE,0x5CFB,0x3C7B,0x447B,0x449B,0x4CBB,0x4CBC,0x4CBC,0x4CDC,0x4CBC,0x6D1C,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0x6CFC,0x4CBC,0x4CBC,0x4CBC,0x4CBB,0x449B,0x447B,0x3C7B,0x3C5A,0x54DB,0xF7BE,0xFFDF,0xB5B6,0x0000, // row 17, 576 pixels -0x0000,0x94B2,0xF7BE,0xF7BE,0x755B,0x3C5A,0x3C7B,0x447B,0x449B,0x449B,0x4CBB,0x4CBB,0x4C9B,0x6CFB,0xF79E,0xF79E,0xF79E,0xF79E,0x64FB,0x449B,0x4CBB,0x449B,0x449B,0x447B,0x3C7B,0x3C5A,0x3C5A,0x753B,0xF7BE,0xF7BE,0x9CD3,0x0000, // row 18, 608 pixels -0x0000,0x6B4D,0xEF7D,0xF7BE,0xA61C,0x3C5A,0x3C5A,0x3C7B,0x447B,0x447B,0x449B,0x449B,0x447B,0x64DB,0xF79E,0xF79E,0xF79E,0xF79E,0x64DB,0x447B,0x449B,0x447B,0x447B,0x3C7B,0x3C5A,0x3C5A,0x343A,0xA61C,0xF7BE,0xEF7D,0x6B4D,0x0000, // row 19, 640 pixels -0x0000,0x2124,0xE71C,0xFFDF,0xDF3D,0x3C5A,0x343A,0x3C5A,0x3C5A,0x3C7B,0x3C7B,0x447B,0x3C5B,0x64BA,0xF79E,0xF79E,0xF79E,0xF79E,0x64BA,0x3C5B,0x3C7B,0x3C7B,0x3C5A,0x3C5A,0x343A,0x343A,0x343A,0xDF3D,0xFFDF,0xE71C,0x2124,0x0000, // row 20, 672 pixels -0x0000,0x0000,0xAD75,0xF7BE,0xF79E,0x859B,0x343A,0x343A,0x345A,0x3C5A,0x3C5A,0x3C5A,0x3C5A,0x5C9A,0xEF7D,0xEF7D,0xEF7D,0xEF7D,0x5C9A,0x3C3A,0x3C5A,0x3C5A,0x345A,0x343A,0x343A,0x341A,0x859B,0xF79E,0xF7BE,0xAD75,0x0000,0x0000, // row 21, 704 pixels -0x0000,0x0000,0x528A,0xE71C,0xFFDF,0xDF3D,0x3C5A,0x343A,0x343A,0x343A,0x343A,0x3C5A,0x343A,0x4C5A,0xEF7D,0xEF7D,0xEF7D,0xEF7D,0x4C59,0x343A,0x343A,0x343A,0x343A,0x343A,0x341A,0x3C5A,0xDF3D,0xFFDF,0xE71C,0x528A,0x0000,0x0000, // row 22, 736 pixels -0x0000,0x0000,0x0000,0x9CD3,0xF79E,0xF7BE,0xBE7C,0x3419,0x341A,0x341A,0x343A,0x343A,0x341A,0x2B99,0xC69C,0xEF7D,0xEF7D,0xD6DC,0x2398,0x341A,0x343A,0x341A,0x341A,0x2C19,0x2C19,0xBE7C,0xF7BE,0xF79E,0x9CD3,0x0000,0x0000,0x0000, // row 23, 768 pixels -0x0000,0x0000,0x0000,0x39E7,0xDEDB,0xFFDF,0xF79E,0x9DFB,0x2C19,0x2C19,0x2C1A,0x341A,0x341A,0x2BB9,0x2B57,0x6459,0x74B9,0x2337,0x2BB9,0x341A,0x2C1A,0x2C19,0x2C19,0x2C19,0x9DFB,0xF79E,0xFFDF,0xDEDB,0x39E7,0x0000,0x0000,0x0000, // row 24, 800 pixels -0x0000,0x0000,0x0000,0x0000,0x632C,0xDEFB,0xFFDF,0xEF7D,0xB65C,0x3C39,0x2BF9,0x2C19,0x2C19,0x2BF9,0x2398,0x1B58,0x1B37,0x2398,0x2BF9,0x2C19,0x2BF9,0x2BF9,0x3439,0xB65C,0xEF7D,0xFFDF,0xDEFB,0x632C,0x0000,0x0000,0x0000,0x0000, // row 25, 832 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x73AE,0xDEFB,0xF7BE,0xF79E,0xDF1C,0x7D5A,0x2BF9,0x2BF9,0x2BF9,0x2BF9,0x23D9,0x23D9,0x2BF9,0x2BF9,0x2BF9,0x2BF9,0x7D5A,0xDF1C,0xF79E,0xF7BE,0xDEFB,0x73AE,0x0000,0x0000,0x0000,0x0000,0x0000, // row 26, 864 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x632C,0xDEDB,0xF79E,0xFFDF,0xEF7D,0xD6FC,0x9DFB,0x5CDA,0x4C9A,0x3419,0x3419,0x4C9A,0x5CDA,0x9DFB,0xD6FC,0xEF7D,0xFFDF,0xF79E,0xDEDB,0x632C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 27, 896 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4208,0x94B2,0xDEFB,0xF7BE,0xFFDF,0xF7BE,0xF79E,0xEF7D,0xEF5D,0xEF5D,0xEF7D,0xF79E,0xF7BE,0xFFDF,0xF7BE,0xDEFB,0x94B2,0x4208,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 28, 928 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x528A,0xA534,0xDEDB,0xE73C,0xF79E,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0xF79E,0xE73C,0xDEDB,0xA534,0x528A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 29, 960 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x18C3,0x5AEB,0x8C71,0xAD55,0xBDD7,0xBDD7,0xAD55,0x8C71,0x5AEB,0x18C3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 30, 992 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; // row 31, 1024 pixels diff --git a/examples/160 x 128/Pong_v3/Pong_v3.ino b/examples/160 x 128/Pong_v3/Pong_v3.ino index 7c51299..318c851 100644 --- a/examples/160 x 128/Pong_v3/Pong_v3.ino +++ b/examples/160 x 128/Pong_v3/Pong_v3.ino @@ -107,13 +107,17 @@ void midline() { // If the ball is not on the line then don't redraw the line if ((ball_x dashline_x+dashline_w)) return; + tft.startWrite(); + // Quick way to draw a dashed line - tft.setAddrWindow(dashline_x,0,dashline_x+dashline_w-1,h); + tft.setAddrWindow(dashline_x, 0, dashline_w, h); for(int16_t i = 0; i < dashline_n; i+=2) { tft.pushColor(WHITE, dashline_w*dashline_h); // push dash pixels tft.pushColor(BLACK, dashline_w*dashline_h); // push gap pixels } + + tft.endWrite(); } void lpaddle() { diff --git a/examples/160 x 128/TFT_graphicstest_PDQ3/TFT_graphicstest_PDQ3.ino b/examples/160 x 128/TFT_graphicstest_PDQ3/TFT_graphicstest_PDQ3.ino index 325b9a4..1cb0515 100644 --- a/examples/160 x 128/TFT_graphicstest_PDQ3/TFT_graphicstest_PDQ3.ino +++ b/examples/160 x 128/TFT_graphicstest_PDQ3/TFT_graphicstest_PDQ3.ino @@ -308,21 +308,23 @@ uint32_t testHaD() 0x0a, 0x2b, 0x0b, 0x41, 0x0a, 0x29, 0x0b, 0x43, 0x0a, 0x27, 0x0a, 0x46, 0x0a, 0x25, 0x0a, 0x49, 0x09, 0x23, 0x08, 0x4e, 0x08, 0x96, 0x12 }; - + tft.fillScreen(TFT_BLACK); uint32_t start = micros_start(); - + + tft.startWrite(); + for (int i = 0; i < 0x10; i++) { - tft.setAddrWindow(0, 0, tft.width()-1, tft.height()-1); + tft.setAddrWindow(0, 0, tft.width(), tft.height()); uint16_t cnt = 0; uint16_t color = tft.color565((i << 4) | i, (i << 4) | i, (i << 4) | i); 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++); @@ -333,8 +335,11 @@ uint32_t testHaD() curcolor ^= color; } + tft.endWrite(); } + tft.endWrite(); + uint32_t t = micros() - start; tft.setTextColor(TFT_YELLOW); @@ -405,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++) @@ -413,7 +418,7 @@ uint32_t testPixels() tft.drawPixel(x, y, tft.color565(x<<3, y<<3, x*y)); } } - + tft.endWrite(); return micros() - start; } diff --git a/examples/320 x 240/TFT_Flash_Bitmap/TFT_Flash_Bitmap.ino b/examples/320 x 240/TFT_Flash_Bitmap/TFT_Flash_Bitmap.ino deleted file mode 100644 index 82e09eb..0000000 --- a/examples/320 x 240/TFT_Flash_Bitmap/TFT_Flash_Bitmap.ino +++ /dev/null @@ -1,106 +0,0 @@ -// Icons are stored in tabs ^ e.g. Alert.h etc above this line -// more than one icon can be in a header file - -/* - This sketch demonstrates loading images from arrays stored in program (FLASH) memory. - - Works with TFT_eSPI library here: - https://github.com/Bodmer/TFT_eSPI - - This sketch does not use/need any fonts at all... - - Code derived from ILI9341_due example - - Make sure all the display driver and pin comnenctions are correct by - editting the User_Setup.h file in the TFT_eSPI library folder. - - ######################################################################### - ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ###### - ######################################################################### -*/ - -#include // Hardware-specific library - -TFT_eSPI tft = TFT_eSPI(); // Invoke custom library - -// Include the header files that contain the icons -#include "Alert.h" -#include "Close.h" -#include "Info.h" - -long count = 0; // Loop count - -void setup() -{ - Serial.begin(115200); - tft.begin(); - tft.setRotation(1); // landscape - - tft.fillScreen(TFT_BLACK); - - // Draw the icons - drawIcon(info, 100, 100, infoWidth, infoHeight); - drawIcon(alert, 140, 100, alertWidth, alertHeight); - drawIcon(closeX, 180, 100, closeWidth, closeHeight); - - // Pause here to admire the icons! - delay(2000); - -} - -void loop() -{ - // Loop filling and clearing screen - drawIcon(info, random(tft.width() - infoWidth), random(tft.height() - infoHeight), infoWidth, infoHeight); - drawIcon(alert, random(tft.width() - alertWidth), random(tft.height() - alertHeight), alertWidth, alertHeight); - drawIcon(closeX, random(tft.width() - closeWidth), random(tft.height() - closeHeight), alertWidth, closeHeight); - - // Clear screen after 100 x 3 = 300 icons drawn - if (100 == count++) { - count = 1; - tft.setRotation(2 * random(2)); // Rotate randomly to clear display left>right or right>left to reduce monotony! - tft.fillScreen(TFT_BLACK); - tft.setRotation(1); - //Serial.println(millis()); - } -} - - -//==================================================================================== -// This is the function to draw the icon stored as an array in program memory (FLASH) -//==================================================================================== - -// To speed up rendering we use a 64 pixel buffer -#define BUFF_SIZE 64 - -// Draw array "icon" of defined width and height at coordinate x,y -// Maximum icon size is 255x255 pixels to avoid integer overflow - -void drawIcon(const unsigned short* icon, int16_t x, int16_t y, uint16_t width, uint16_t height) { - - uint16_t pix_buffer[BUFF_SIZE]; // Pixel buffer (16 bits per pixel) - - // Set up a window the right size to stream pixels into - tft.setWindow(x, y, x + width - 1, y + height - 1); - - // Work out the number whole buffers to send - uint16_t nb = ((uint16_t)height * width) / BUFF_SIZE; - - // Fill and send "nb" buffers to TFT - for (int i = 0; i < nb; i++) { - for (int j = 0; j < BUFF_SIZE; j++) { - pix_buffer[j] = pgm_read_word(&icon[i * BUFF_SIZE + j]); - } - tft.pushColors(pix_buffer, BUFF_SIZE); - } - - // Work out number of pixels not yet sent - uint16_t np = ((uint16_t)height * width) % BUFF_SIZE; - - // Send any partial buffer left over - if (np) { - for (int i = 0; i < np; i++) pix_buffer[i] = pgm_read_word(&icon[nb * BUFF_SIZE + i]); - tft.pushColors(pix_buffer, np); - } -} - diff --git a/examples/320 x 240/TFT_Mandlebrot/TFT_Mandlebrot.ino b/examples/320 x 240/TFT_Mandlebrot/TFT_Mandlebrot.ino index 73e0afc..2a04556 100644 --- a/examples/320 x 240/TFT_Mandlebrot/TFT_Mandlebrot.ino +++ b/examples/320 x 240/TFT_Mandlebrot/TFT_Mandlebrot.ino @@ -7,7 +7,7 @@ TFT_eSPI tft = TFT_eSPI(); // Invoke custom library -#define ILI9341_GREY 0x7BEF +#define TFT_GREY 0x7BEF unsigned long runTime = 0; @@ -16,8 +16,9 @@ uint16_t x0 = 0, x1 = 0, yy0 = 0, yy1 = 0; void setup() { + Serial.begin(250000); //randomSeed(analogRead(A0)); - + Serial.println(); // Setup the LCD tft.init(); tft.setRotation(3); @@ -27,7 +28,8 @@ void loop() { runTime = millis(); - tft.fillScreen(ILI9341_BLACK); + tft.fillScreen(TFT_BLACK); + tft.startWrite(); for (int px = 1; px < 320; px++) { for (int py = 0; py < 240; py++) @@ -49,6 +51,9 @@ void loop() yield();tft.drawPixel(px, py, color); } } + tft.endWrite(); + + Serial.println(millis()-runTime); while(1) yield(); } diff --git a/examples/320 x 240/TFT_Pong/TFT_Pong.ino b/examples/320 x 240/TFT_Pong/TFT_Pong.ino index 6cf91f2..5bcd880 100644 --- a/examples/320 x 240/TFT_Pong/TFT_Pong.ino +++ b/examples/320 x 240/TFT_Pong/TFT_Pong.ino @@ -108,13 +108,17 @@ void midline() { // If the ball is not on the line then don't redraw the line if ((ball_x dashline_x+dashline_w)) return; + tft.startWrite(); + // Quick way to draw a dashed line - tft.setWindow(dashline_x,0,dashline_x+dashline_w-1,h); + tft.setAddrWindow(dashline_x, 0, dashline_w, h); for(int16_t i = 0; i < dashline_n; i+=2) { tft.pushColor(WHITE, dashline_w*dashline_h); // push dash pixels tft.pushColor(BLACK, dashline_w*dashline_h); // push gap pixels } + + tft.endWrite(); } void lpaddle() { diff --git a/examples/320 x 240/TFT_Screen_Capture/TFT_Screen_Capture.ino b/examples/320 x 240/TFT_Screen_Capture/TFT_Screen_Capture.ino deleted file mode 100644 index d791b0f..0000000 --- a/examples/320 x 240/TFT_Screen_Capture/TFT_Screen_Capture.ino +++ /dev/null @@ -1,188 +0,0 @@ -/* - This sketch has been written to test the Processing screenshot client. - - It has been created to work with the TFT_eSPI library here: - https://github.com/Bodmer/TFT_eSPI - - It sends screenshots to a PC running a Processing client sketch. - - The Processing IDE that will run the client sketch can be downloaded - here: https://processing.org/ - - The Processing sketch needed is contained within a tab attached to this - Arduino sketch. Cut and copy that tab into the Processing IDE and run. - - This sketch uses the GLCD, 2, 4, 6 fonts only. - - Make sure all the display driver and pin comnenctions are correct by - editting the User_Setup.h file in the TFT_eSPI library folder. - - Maximum recommended SPI clock rate is 27MHz when reading pixels, 40MHz - seems to be OK with ILI9341 displays but this is above the manufacturers - specifed maximum clock rate. - - ######################################################################### - ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ###### - ######################################################################### -*/ - -// Created by: Bodmer 5/3/17 -// Updated by: Bodmer 10/3/17 -// Version: 0.06 - -// MIT licence applies, all text above must be included in derivative works - -#include // Hardware-specific library -#include - -TFT_eSPI tft = TFT_eSPI(); // Invoke custom library with default width and height - -unsigned long targetTime = 0; -byte red = 31; -byte green = 0; -byte blue = 0; -byte state = 0; -unsigned int colour = red << 11; // Colour order is RGB 5+6+5 bits each - -void setup(void) { - Serial.begin(921600); - - tft.init(); - tft.setRotation(0); - tft.fillScreen(TFT_BLACK); - - randomSeed(analogRead(A0)); - - targetTime = millis() + 1000; -} - -void loop() { - - if (targetTime < millis()) { - targetTime = millis() + 1500; // Wait a minimum of 1.5s - - tft.setRotation(random(4)); - rainbow_fill(); // Fill the screen with rainbow colours - - tft.setTextColor(TFT_BLACK); // Text background is not defined so it is transparent - tft.setTextDatum(TC_DATUM); // Top Centre datum - int xpos = tft.width()/2; // Centre of screen - - tft.setTextFont(0); // Select font 0 which is the Adafruit font - tft.drawString("Original Adafruit font!", xpos, 5); - - // The new larger fonts do not need to use the .setCursor call, coords are embedded - tft.setTextColor(TFT_BLACK); // Do not plot the background colour - - // Overlay the black text on top of the rainbow plot (the advantage of not drawing the backgorund colour!) - tft.drawString("Font size 2", xpos, 14, 2); // Draw text centre at position xpos, 14 using font 2 - tft.drawString("Font size 4", xpos, 30, 4); // Draw text centre at position xpos, 30 using font 4 - tft.drawString("12.34", xpos, 54, 6); // Draw text centre at position xpos, 54 using font 6 - - tft.drawString("12.34 is in font size 6", xpos, 92, 2); // Draw text centre at position xpos, 92 using font 2 - // Note the x position is the top of the font! - - // draw a floating point number - float pi = 3.1415926; // Value to print - int precision = 3; // Number of digits after decimal point - - int ypos = 110; // y position - - tft.setTextDatum(TR_DATUM); // Top Right datum so text butts neatly to xpos (right justified) - - tft.drawFloat(pi, precision, xpos, ypos, 2); // Draw rounded number and return new xpos delta for next print position - - tft.setTextDatum(TL_DATUM); // Top Left datum so text butts neatly to xpos (left justified) - - tft.drawString(" is pi", xpos, ypos, 2); - - tft.setTextSize(1); // We are using a font size multiplier of 1 - tft.setTextDatum(TC_DATUM); // Top Centre datum - tft.setTextColor(TFT_BLACK); // Set text colour to black, no background (so transparent) - - tft.drawString("Transparent...", xpos, 125, 4); // Font 4 - - tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set text colour to white and background to black - tft.drawString("White on black", xpos, 150, 4); // Font 4 - - tft.setTextColor(TFT_GREEN, TFT_BLACK); // This time we will use green text on a black background - - tft.setTextFont(2); // Select font 2, now we do not need to specify the font in drawString() - - // An easier way to position text and blank old text is to set the datum and use width padding - tft.setTextDatum(BC_DATUM); // Bottom centre for text datum - tft.setTextPadding(tft.width() + 1); // Pad text to full screen width + 1 spare for +/-1 position rounding - - tft.drawString("Ode to a Small Lump of Green Putty", xpos, 230 - 32); - tft.drawString("I Found in My Armpit One Midsummer", xpos, 230 - 16); - tft.drawString("Morning", xpos, 230); - - tft.setTextDatum(TL_DATUM); // Reset to top left for text datum - tft.setTextPadding(0); // Reset text padding to 0 pixels - - // Now call the screen server to send a copy of the TFT screen to the PC running the Processing client sketch - screenServer(); - } -} - -// Fill screen with a rainbow pattern -void rainbow_fill() -{ - // The colours and state are not initialised so the start colour changes each time the funtion is called - int rotation = tft.getRotation(); - tft.setRotation(random(4)); - for (int i = tft.height() - 1; i >= 0; i--) { - // This is a "state machine" that ramps up/down the colour brightnesses in sequence - switch (state) { - case 0: - green ++; - if (green == 64) { - green = 63; - state = 1; - } - break; - case 1: - red--; - if (red == 255) { - red = 0; - state = 2; - } - break; - case 2: - blue ++; - if (blue == 32) { - blue = 31; - state = 3; - } - break; - case 3: - green --; - if (green == 255) { - green = 0; - state = 4; - } - break; - case 4: - red ++; - if (red == 32) { - red = 31; - state = 5; - } - break; - case 5: - blue --; - if (blue == 255) { - blue = 0; - state = 0; - } - break; - } - colour = red << 11 | green << 5 | blue; - // Draw a line 1 pixel wide in the selected colour - tft.drawFastHLine(0, i, tft.width(), colour); // in this example tft.width() returns the pixel width of the display - } - tft.setRotation(rotation); -} - - - diff --git a/examples/320 x 240/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino b/examples/320 x 240/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino index 7db002e..ee76936 100644 --- a/examples/320 x 240/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino +++ b/examples/320 x 240/TFT_graphicstest_PDQ/TFT_graphicstest_PDQ.ino @@ -336,10 +336,10 @@ uint32_t testHaD() tft.fillScreen(TFT_BLACK); uint32_t start = micros_start(); - + for (int i = 0; i < 0x10; i++) { - tft.setWindow(0, 0, 240-1, 320-1); + tft.setAddrWindow(0, 0, 240, 320); uint16_t cnt = 0; uint16_t color = tft.color565((i << 4) | i, (i << 4) | i, (i << 4) | i); @@ -347,6 +347,7 @@ uint32_t testHaD() const uint8_t *cmp = &HaD_240x320[0]; + tft.startWrite(); while (cmp < &HaD_240x320[sizeof(HaD_240x320)]) { cnt = pgm_read_byte(cmp++); @@ -354,6 +355,7 @@ uint32_t testHaD() tft.pushColor(curcolor, cnt); // PDQ_GFX has count curcolor ^= color; } + tft.endWrite(); } uint32_t t = micros() - start; @@ -432,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++) @@ -440,7 +442,7 @@ uint32_t testPixels() tft.drawPixel(x, y, tft.color565(x<<3, y<<3, x*y)); } } - + tft.endWrite(); return micros() - start; } diff --git a/examples/320 x 240/weather-station/ArialRoundedMTBold_14.h b/examples/320 x 240/weather-station/ArialRoundedMTBold_14.h deleted file mode 100644 index b08d84f..0000000 --- a/examples/320 x 240/weather-station/ArialRoundedMTBold_14.h +++ /dev/null @@ -1,224 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -See more at http://blog.squix.ch -*/ - -// Created by http://oleddisplay.squix.ch/ Consider a donation -// In case of problems make sure that you are using the font file with the correct version! - -// Bodmer fix: End character is 0x7D not 0x7E, so bug in last line of the file corrected -// this avoids screen corruption if ~ is printer - -const uint8_t ArialRoundedMTBold_14Bitmaps[] PROGMEM = { - - // Bitmap Data: - 0x00, // ' ' - 0xFF,0xF8,0xF0, // '!' - 0xDE,0xF6, // '"' - 0x12,0x32,0x36,0xFF,0xFF,0x24,0xFF,0xFF,0x4C,0x48, // '#' - 0x10,0x61,0xF6,0xAD,0x7A,0x1E,0x0E,0xD7,0xAF,0x5B,0xE1,0x02,0x04,0x00, // '$' - 0x60,0x92,0x22,0x44,0x49,0x07,0x60,0x0B,0x82,0x48,0xC9,0x11,0x24,0x18, // '%' - 0x3C,0x19,0x82,0x60,0xF0,0x39,0x33,0x6C,0x73,0x1C,0xFF,0x8E,0x30, // '&' - 0xFC, // ''' - 0x32,0x64,0xCC,0xCC,0xC4,0x62,0x30, // '(' - 0xC4,0x62,0x33,0x33,0x32,0x64,0xC0, // ')' - 0x21,0x2A,0xE5,0x28, // '*' - 0x18,0x18,0x18,0xFF,0xFF,0x18,0x18, // '+' - 0xF6, // ',' - 0xFF, // '-' - 0xF0, // '.' - 0x33,0x32,0x66,0x4C,0xCC, // '/' - 0x38,0xFB,0x9E,0x3C,0x78,0xF1,0xF6,0x7C,0x70, // '0' - 0x19,0xDF,0xB1,0x8C,0x63,0x18,0xC0, // '1' - 0x38,0xFF,0x1E,0x30,0xC3,0x0C,0x30,0xFF,0xFC, // '2' - 0x79,0x9B,0x10,0x63,0xC7,0x81,0xC3,0xC6,0xF0, // '3' - 0x06,0x0E,0x1E,0x16,0x26,0x46,0xFF,0xFF,0x06,0x06, // '4' - 0x7E,0xFD,0x06,0x0F,0xD8,0xC1,0xC3,0xCC,0xF0, // '5' - 0x38,0xDB,0x1E,0x0F,0xD8,0xF1,0xE3,0x66,0x78, // '6' - 0xFF,0xFC,0x30,0x41,0x82,0x0C,0x18,0x30,0xC0, // '7' - 0x38,0xDB,0x1F,0x63,0x98,0xF1,0xE3,0xC6,0xF8, // '8' - 0x3C,0x66,0xC3,0xC3,0xE7,0x3F,0x03,0xC3,0x66,0x3C, // '9' - 0xF0,0x3C, // ':' - 0xF0,0x3D,0x80, // ';' - 0x02,0x1D,0xF7,0x0E,0x0F,0x83,0x81, // '<' - 0xFF,0xFC,0x07,0xFF,0xE0, // '=' - 0x81,0xC1,0xF0,0x70,0xEF,0xB8,0x40, // '>' - 0x3C,0xFF,0x1E,0x30,0xC7,0x0C,0x00,0x30,0x60, // '?' - 0x0F,0x83,0x06,0x60,0x24,0xED,0x99,0x9B,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,0x33,0x7C,0x7F,0x83,0xD8,0x01,0x80, // 'Q' - 0xFE,0xFF,0xC3,0xC3,0xFE,0xFC,0xCE,0xC6,0xC3,0xC3, // 'R' - 0x7C,0xFE,0xC7,0xC2,0x7C,0x0F,0xC3,0xC3,0x7E,0x3C, // 'S' - 0xFF,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, // 'T' - 0xC1,0xE0,0xF0,0x78,0x3C,0x1E,0x0F,0x07,0xC7,0x7F,0x1F,0x00, // 'U' - 0xC1,0xE0,0xD8,0xCC,0x66,0x31,0xB0,0xD8,0x6C,0x1C,0x0E,0x00, // 'V' - 0xC7,0x1E,0x38,0xF1,0x46,0xDB,0x66,0xDB,0x36,0xD9,0xA2,0xC7,0x1C,0x38,0xE1,0x83,0x00, // 'W' - 0xC3,0x66,0x7E,0x3C,0x18,0x3C,0x7E,0x66,0xC3,0xC3, // 'X' - 0xC3,0xC3,0x66,0x3E,0x3C,0x18,0x18,0x18,0x18,0x18, // 'Y' - 0x7F,0x3F,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFF,0xFF,0xC0, // 'Z' - 0xFF,0xCC,0xCC,0xCC,0xCC,0xCF,0xF0, // '[' - 0xCC,0x44,0x66,0x22,0x33, // '\' - 0xFF,0x33,0x33,0x33,0x33,0x3F,0xF0, // ']' - 0x30,0xE7,0x9A,0xCF,0x30, // '^' - 0xFE, // '_' - 0xD0, // '`' - 0x7D,0x8C,0x7F,0x3C,0x79,0xDD,0x80, // 'a' - 0xC1,0x83,0x06,0xEF,0xF8,0xF1,0xE3,0xFF,0xB8, // 'b' - 0x3C,0xFF,0x1E,0x0C,0x6F,0xCF,0x00, // 'c' - 0x06,0x0C,0x1B,0xBF,0xF8,0xF1,0xE3,0xFE,0xEC, // 'd' - 0x3C,0xCF,0x1F,0xFC,0x0C,0xCF,0x00, // 'e' - 0x3B,0x19,0xF6,0x31,0x8C,0x63,0x00, // 'f' - 0x77,0xFF,0x1E,0x3C,0x7F,0xDD,0xE3,0xC6,0xF8, // 'g' - 0xC1,0x83,0x06,0xEF,0xF8,0xF1,0xE3,0xC7,0x8C, // 'h' - 0xF3,0xFF,0xF0, // 'i' - 0x33,0x03,0x33,0x33,0x33,0x3F,0xE0, // 'j' - 0xC1,0x83,0x06,0x6D,0x9E,0x3E,0x66,0xCD,0x8C, // 'k' - 0xFF,0xFF,0xF0, // 'l' - 0xD9,0xDF,0xFF,0x31,0xE6,0x3C,0xC7,0x98,0xF3,0x18, // 'm' - 0xDD,0xFF,0x1E,0x3C,0x78,0xF1,0x80, // 'n' - 0x38,0xFB,0x1E,0x3C,0x6F,0x8E,0x00, // 'o' - 0xDD,0xFF,0x1E,0x3C,0x7F,0xF7,0x60,0xC1,0x80, // 'p' - 0x77,0xFF,0x1E,0x3C,0x7F,0xDD,0x83,0x06,0x0C, // 'q' - 0xDF,0xF1,0x8C,0x63,0x00, // 'r' - 0x7B,0x3E,0x1E,0x0F,0x37,0x80, // 's' - 0x63,0x19,0xF6,0x31,0x8C,0x79,0xC0, // 't' - 0xC7,0x8F,0x1E,0x3C,0x7F,0xDD,0x80, // 'u' - 0xC7,0x8D,0x93,0x62,0x87,0x04,0x00, // 'v' - 0xC4,0x79,0xCD,0x29,0x35,0x67,0xBC,0x63,0x0C,0x60, // 'w' - 0xC6,0xD9,0xF1,0xC7,0xCD,0xB1,0x80, // 'x' - 0xC7,0x8D,0x93,0x62,0xC7,0x06,0x18,0xF1,0xC0, // 'y' - 0xFE,0x18,0x61,0x86,0x1F,0xFF,0x80, // 'z' - 0x19,0xCC,0x63,0x3B,0x8E,0x31,0x8C,0x71,0x80, // '{' - 0xFF,0xFF,0xFF,0xC0, // '|' - 0xC7,0x18,0xC6,0x38,0xEE,0x63,0x19,0xCC,0x00 // '}' -}; -const GFXglyph ArialRoundedMTBold_14Glyphs[] PROGMEM = { -// bitmapOffset, width, height, xAdvance, xOffset, yOffset - { 0, 1, 1, 5, 0, 0 }, // ' ' - { 1, 2, 10, 6, 1, -10 }, // '!' - { 4, 5, 3, 8, 1, -10 }, // '"' - { 6, 8, 10, 9, 0, -10 }, // '#' - { 16, 7, 15, 9, 1, -12 }, // '$' - { 30, 11, 10, 13, 0, -10 }, // '%' - { 44, 10, 10, 12, 1, -10 }, // '&' - { 57, 2, 3, 4, 1, -10 }, // ''' - { 58, 4, 13, 6, 1, -10 }, // '(' - { 65, 4, 13, 6, 0, -10 }, // ')' - { 72, 5, 6, 7, 1, -11 }, // '*' - { 76, 8, 7, 9, 0, -9 }, // '+' - { 83, 2, 4, 5, 1, -2 }, // ',' - { 84, 4, 2, 6, 0, -5 }, // '-' - { 85, 2, 2, 5, 1, -2 }, // '.' - { 86, 4, 10, 5, 0, -10 }, // '/' - { 91, 7, 10, 9, 1, -10 }, // '0' - { 100, 5, 10, 9, 1, -10 }, // '1' - { 107, 7, 10, 9, 1, -10 }, // '2' - { 116, 7, 10, 9, 1, -10 }, // '3' - { 125, 8, 10, 9, 0, -10 }, // '4' - { 135, 7, 10, 9, 1, -10 }, // '5' - { 144, 7, 10, 9, 1, -10 }, // '6' - { 153, 7, 10, 9, 1, -10 }, // '7' - { 162, 7, 10, 9, 1, -10 }, // '8' - { 171, 8, 10, 9, 0, -10 }, // '9' - { 181, 2, 7, 5, 1, -7 }, // ':' - { 183, 2, 9, 5, 1, -7 }, // ';' - { 186, 7, 8, 9, 1, -9 }, // '<' - { 193, 7, 5, 9, 1, -7 }, // '=' - { 198, 7, 8, 9, 1, -9 }, // '>' - { 205, 7, 10, 9, 1, -10 }, // '?' - { 214, 12, 13, 15, 1, -10 }, // '@' - { 234, 9, 10, 11, 1, -10 }, // 'A' - { 246, 8, 10, 11, 1, -10 }, // 'B' - { 256, 9, 10, 11, 1, -10 }, // 'C' - { 268, 9, 10, 11, 1, -10 }, // 'D' - { 280, 8, 10, 10, 1, -10 }, // 'E' - { 290, 7, 10, 9, 1, -10 }, // 'F' - { 299, 9, 10, 12, 1, -10 }, // 'G' - { 311, 9, 10, 12, 1, -10 }, // 'H' - { 323, 2, 10, 5, 1, -10 }, // 'I' - { 326, 7, 10, 9, 0, -10 }, // 'J' - { 335, 9, 10, 11, 1, -10 }, // 'K' - { 347, 7, 10, 9, 1, -10 }, // 'L' - { 356, 10, 10, 13, 1, -10 }, // 'M' - { 369, 9, 10, 12, 1, -10 }, // 'N' - { 381, 10, 10, 12, 1, -10 }, // 'O' - { 394, 8, 10, 10, 1, -10 }, // 'P' - { 404, 11, 11, 12, 1, -10 }, // 'Q' - { 420, 8, 10, 11, 1, -10 }, // 'R' - { 430, 8, 10, 10, 1, -10 }, // 'S' - { 440, 8, 10, 10, 0, -10 }, // 'T' - { 450, 9, 10, 12, 1, -10 }, // 'U' - { 462, 9, 10, 11, 0, -10 }, // 'V' - { 474, 13, 10, 14, 0, -10 }, // 'W' - { 491, 8, 10, 9, 0, -10 }, // 'X' - { 501, 8, 10, 10, 0, -10 }, // 'Y' - { 511, 9, 10, 10, 0, -10 }, // 'Z' - { 523, 4, 13, 6, 1, -10 }, // '[' - { 530, 4, 10, 5, 0, -10 }, // '\' - { 535, 4, 13, 6, 0, -10 }, // ']' - { 542, 6, 6, 9, 1, -10 }, // '^' - { 547, 7, 1, 8, 0, 1 }, // '_' - { 548, 2, 2, 6, 1, -10 }, // '`' - { 549, 7, 7, 9, 1, -7 }, // 'a' - { 556, 7, 10, 10, 1, -10 }, // 'b' - { 565, 7, 7, 9, 1, -7 }, // 'c' - { 572, 7, 10, 10, 1, -10 }, // 'd' - { 581, 7, 7, 9, 1, -7 }, // 'e' - { 588, 5, 10, 6, 0, -10 }, // 'f' - { 595, 7, 10, 10, 1, -7 }, // 'g' - { 604, 7, 10, 9, 1, -10 }, // 'h' - { 613, 2, 10, 5, 1, -10 }, // 'i' - { 616, 4, 13, 5, -1, -10 }, // 'j' - { 623, 7, 10, 9, 1, -10 }, // 'k' - { 632, 2, 10, 5, 1, -10 }, // 'l' - { 635, 11, 7, 13, 1, -7 }, // 'm' - { 645, 7, 7, 9, 1, -7 }, // 'n' - { 652, 7, 7, 9, 1, -7 }, // 'o' - { 659, 7, 10, 10, 1, -7 }, // 'p' - { 668, 7, 10, 10, 1, -7 }, // 'q' - { 677, 5, 7, 7, 1, -7 }, // 'r' - { 682, 6, 7, 9, 1, -7 }, // 's' - { 688, 5, 10, 6, 0, -10 }, // 't' - { 695, 7, 7, 9, 1, -7 }, // 'u' - { 702, 7, 7, 9, 0, -7 }, // 'v' - { 709, 11, 7, 12, 0, -7 }, // 'w' - { 719, 7, 7, 8, 0, -7 }, // 'x' - { 726, 7, 10, 9, 0, -7 }, // 'y' - { 735, 7, 7, 8, 0, -7 }, // 'z' - { 742, 5, 13, 6, 0, -10 }, // '{' - { 751, 2, 13, 5, 1, -10 }, // '|' - { 755, 5, 13, 6, 1, -10 } // '}' character 0x7D -}; -const GFXfont ArialRoundedMTBold_14 PROGMEM = { // Last character bug fixed 0x7E to 0x7D -(uint8_t *)ArialRoundedMTBold_14Bitmaps,(GFXglyph *)ArialRoundedMTBold_14Glyphs,0x20, 0x7D, 17}; - diff --git a/examples/320 x 240/weather-station/ArialRoundedMTBold_36.h b/examples/320 x 240/weather-station/ArialRoundedMTBold_36.h deleted file mode 100644 index a171dbe..0000000 --- a/examples/320 x 240/weather-station/ArialRoundedMTBold_36.h +++ /dev/null @@ -1,226 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -See more at http://blog.squix.ch -*/ - -// Created by http://oleddisplay.squix.ch/ Consider a donation -// In case of problems make sure that you are using the font file with the correct version! - -// Bodmer fix: End character is 0x7D not 0x7E, so bug in last line of the file corrected -// this avoids screen corruption if ~ is printed - -// Bodmer change: '`' changed to tiny degree symbol (typically this character is on top left key of a QWERTY keyboard) - -const uint8_t ArialRoundedMTBold_36Bitmaps[] PROGMEM = { - - // Bitmap Data: - 0x00, // ' ' - 0x77,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0x39,0xCE,0x73,0x00,0x00,0x3B,0xFF,0xFB,0x80, // '!' - 0xFC,0xFF,0xF3,0xFF,0xCF,0xFF,0x3F,0xFC,0xFF,0xF3,0xFF,0xCF,0xDE,0x1E,0x78,0x78, // '"' - 0x01,0x83,0x80,0x78,0x70,0x0F,0x0E,0x01,0xC3,0xC0,0x78,0x78,0x0F,0x0F,0x01,0xE1,0xE3,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0x07,0x87,0x80,0xF0,0xE0,0x1E,0x3C,0x07,0x87,0x80,0xF0,0xF0,0x7F,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xE3,0xC3,0xC0,0x78,0x78,0x0F,0x0E,0x01,0xC3,0xC0,0x78,0x78,0x07,0x06,0x00, // '#' - 0x00,0x60,0x00,0x0C,0x00,0x01,0x80,0x00,0x30,0x00,0x7F,0xE0,0x3F,0xFE,0x0F,0xFF,0xE1,0xF3,0x7E,0x7C,0x67,0xCF,0x0C,0x79,0xE1,0x8F,0x3C,0x30,0xC7,0xC6,0x00,0xFE,0xC0,0x0F,0xF8,0x00,0xFF,0xE0,0x0F,0xFF,0x00,0x7F,0xF0,0x01,0xFF,0x00,0x37,0xE0,0x06,0x3E,0xE0,0xC3,0xFC,0x18,0x7F,0xC3,0x0F,0xF8,0x61,0xEF,0x8C,0x79,0xFD,0x9F,0x1F,0xFF,0xC1,0xFF,0xF0,0x0F,0xFC,0x00,0x38,0x00,0x03,0x00,0x00,0x60,0x00,0x0C,0x00,0x01,0x80,0x00,0x30,0x00,0x06,0x00, // '$' - 0x1F,0x00,0x06,0x03,0xFC,0x00,0x70,0x1C,0x70,0x03,0x01,0xC1,0x80,0x38,0x0E,0x0E,0x03,0x80,0x70,0x70,0x1C,0x03,0x83,0x81,0xC0,0x1C,0x1C,0x0C,0x00,0xE0,0xE0,0xE0,0x07,0x07,0x0E,0x00,0x1C,0x70,0x70,0x00,0xFF,0x87,0x00,0x03,0xF8,0x30,0x00,0x00,0x03,0x87,0xF0,0x00,0x38,0x7F,0xC0,0x01,0xC3,0x8E,0x00,0x1C,0x38,0x38,0x00,0xC1,0xC1,0xC0,0x0E,0x0E,0x0E,0x00,0xE0,0x70,0x70,0x07,0x03,0x83,0x80,0x70,0x1C,0x1C,0x07,0x00,0xE0,0xE0,0x38,0x03,0x8E,0x03,0x80,0x0F,0xE0,0x1C,0x00,0x3E,0x00,0xC0,0x00,0x00, // '%' - 0x00,0xFC,0x00,0x01,0xFF,0x80,0x01,0xFF,0xE0,0x01,0xF0,0xF0,0x00,0xF0,0x3C,0x00,0x78,0x1E,0x00,0x3C,0x0F,0x00,0x1F,0x0F,0x80,0x0F,0xDF,0x80,0x03,0xFF,0x80,0x00,0xFF,0x80,0x00,0xFF,0x00,0x00,0xFF,0xC1,0x81,0xFF,0xF0,0xE1,0xF9,0xF8,0xF8,0xF8,0x7E,0x78,0xF8,0x1F,0xFC,0x7C,0x07,0xFC,0x3E,0x01,0xFE,0x1F,0x00,0x7F,0x0F,0xC0,0x3F,0xC3,0xF0,0x7F,0xF1,0xFF,0xFF,0xFC,0x7F,0xFF,0x3F,0x0F,0xFE,0x0F,0x01,0xFC,0x03,0x80, // '&' - 0xFF,0xFF,0xFF,0xFF,0xFF,0xDE,0x78, // ''' - 0x03,0x81,0xC1,0xC1,0xE0,0xF0,0xF0,0xF8,0x78,0x3C,0x3E,0x1F,0x0F,0x0F,0x87,0xC3,0xE1,0xF0,0xF8,0x7C,0x3E,0x1F,0x0F,0x83,0xC1,0xF0,0xF8,0x3C,0x1E,0x0F,0x83,0xC0,0xF0,0x78,0x1C,0x07,0x01,0x80, // '(' - 0xE0,0x70,0x1C,0x0F,0x03,0x81,0xE0,0xF8,0x3C,0x1E,0x0F,0x87,0xC1,0xE0,0xF8,0x7C,0x3E,0x1F,0x0F,0x87,0xC3,0xE1,0xF0,0xF8,0x78,0x7C,0x3E,0x1E,0x0F,0x0F,0x87,0x83,0x83,0xC1,0xC1,0xC0,0xE0,0x00, // ')' - 0x03,0x80,0x07,0x00,0x0E,0x00,0x1C,0x0E,0x38,0xFF,0x77,0xDF,0xFF,0x07,0xF0,0x07,0xC0,0x1D,0xC0,0x3B,0xC0,0xE3,0x83,0xC7,0x83,0x06,0x00, // '*' - 0x01,0xF0,0x00,0x3E,0x00,0x07,0xC0,0x00,0xF8,0x00,0x1F,0x00,0x03,0xE0,0x00,0x7C,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x1F,0x00,0x03,0xE0,0x00,0x7C,0x00,0x0F,0x80,0x01,0xF0,0x00,0x3E,0x00, // '+' - 0x7B,0xEF,0xFF,0x7C,0x71,0xCE,0x7B,0xCE,0x00, // ',' - 0x7F,0xDF,0xFF,0xFF,0xBF,0xE0, // '-' - 0x77,0xFF,0xF7,0x00, // '.' - 0x03,0x81,0xC1,0xE0,0xF0,0x70,0x78,0x3C,0x1E,0x0E,0x07,0x07,0x83,0xC1,0xC0,0xE0,0xF0,0x78,0x38,0x1C,0x1E,0x0F,0x07,0x03,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F,0xE0,0x03,0xFE,0x00,0x7F,0xF0,0x07,0xFF,0x00,0x7F,0xF8,0x03,0xFF,0x00,0x3F,0xC0,0x03,0xF0,0x00,0x1C,0x00,0x01, // '<' - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0, // '=' - 0x80,0x00,0x38,0x00,0x0F,0xC0,0x03,0xFC,0x00,0xFF,0xC0,0x1F,0xFE,0x00,0xFF,0xE0,0x0F,0xFE,0x00,0x7F,0xC0,0x07,0xF0,0x01,0xFC,0x01,0xFF,0x03,0xFF,0x83,0xFF,0x87,0xFF,0x83,0xFF,0x00,0xFF,0x00,0x3F,0x00,0x0E,0x00,0x02,0x00,0x00, // '>' - 0x03,0xF8,0x03,0xFF,0x83,0xFF,0xF0,0xFF,0xFE,0x7E,0x1F,0xBF,0x03,0xFF,0x80,0x7F,0xE0,0x1F,0x70,0x07,0xC8,0x03,0xE0,0x01,0xF8,0x00,0xFC,0x00,0x7E,0x00,0x3F,0x00,0x0F,0x80,0x03,0xC0,0x01,0xF0,0x00,0x78,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x1F,0x00,0x07,0xC0,0x01,0xF0,0x00,0x38,0x00, // '?' - 0x00,0x07,0xFE,0x00,0x00,0x0F,0xFF,0xF0,0x00,0x0F,0xFF,0xFE,0x00,0x07,0xE0,0x0F,0xE0,0x07,0xC0,0x00,0x7C,0x03,0xE0,0x00,0x0F,0x00,0xE0,0x00,0x01,0xE0,0x70,0x1F,0x9F,0x3C,0x3C,0x1F,0xF7,0xC7,0x0E,0x0F,0xFF,0xE1,0xC7,0x07,0xE3,0xF8,0x39,0xC3,0xE0,0x7E,0x0E,0x70,0xF8,0x0F,0x83,0xB8,0x7C,0x03,0xE0,0xEE,0x1F,0x00,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,0x83,0xE0,0xF8,0x3F,0xFF,0xFF,0xFF,0x7F,0xC0, // '[' - 0x70,0x3C,0x07,0x01,0xE0,0x78,0x1E,0x03,0x80,0xF0,0x3C,0x0F,0x01,0xC0,0x78,0x1E,0x07,0x80,0xE0,0x3C,0x0F,0x03,0xC0,0x70,0x1E,0x07,0x81,0xE0,0x38,0x0F,0x03,0xC0,0x60, // '\' - 0xFF,0xBF,0xFF,0xFF,0xFF,0x07,0xC1,0xF0,0x7C,0x1F,0x07,0xC1,0xF0,0x7C,0x1F,0x07,0xC1,0xF0,0x7C,0x1F,0x07,0xC1,0xF0,0x7C,0x1F,0x07,0xC1,0xF0,0x7C,0x1F,0x07,0xC1,0xF0,0x7C,0x1F,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0x80, // ']' - 0x03,0xE0,0x01,0xF0,0x01,0xFC,0x00,0xFE,0x00,0x7F,0x80,0x7B,0xC0,0x3D,0xF0,0x3E,0xF8,0x1E,0x3C,0x1F,0x1F,0x0F,0x07,0x8F,0x83,0xE7,0xC1,0xF7,0xC0,0x7C, // '^' - 0xFF,0xFF,0xFF,0xFF,0xF0, // '_' - 0x0E,0x1B,0x11,0x1B,0x0E, // '`' Changed into a degree symbol - 0x03,0xFC,0x03,0xFF,0xE0,0xFF,0xFE,0x3F,0x07,0xC7,0xC0,0x7C,0xF0,0x0F,0x9C,0x01,0xF0,0x00,0xFE,0x01,0xFF,0xC3,0xFF,0xF8,0xFF,0x9F,0x3F,0x03,0xEF,0x80,0x7D,0xF0,0x0F,0xBE,0x03,0xF7,0xE1,0xFE,0x7F,0xFF,0xE7,0xFE,0x7C,0x3E,0x07,0x00, // 'a' - 0x70,0x00,0x1F,0x00,0x03,0xE0,0x00,0x7C,0x00,0x0F,0x80,0x01,0xF0,0x00,0x3E,0x00,0x07,0xC7,0xE0,0xF9,0xFF,0x1F,0x7F,0xF3,0xFF,0xFF,0x7F,0x87,0xEF,0xE0,0x7D,0xF8,0x0F,0xFF,0x00,0xFF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,0x00,0xFC,0x03,0xE0,0x1F,0xC0,0x7F,0x00,0xF8,0x1F,0xC1,0xFC,0x0F,0x80,0xFC,0x07,0xC0,0x3E,0x01,0xF0,0x0F,0x80,0x7C,0x03,0xE0,0x1F,0x01,0xF8,0x3F,0xC3,0xFC,0x1F,0xC0,0x7C,0x00 // '}' -}; -const GFXglyph ArialRoundedMTBold_36Glyphs[] PROGMEM = { -// bitmapOffset, width, height, xAdvance, xOffset, yOffset - { 0, 1, 1, 10, 0, 0 }, // ' ' - { 1, 5, 26, 13, 4, -26 }, // '!' - { 18, 14, 9, 18, 2, -26 }, // '"' - { 34, 19, 26, 21, 0, -26 }, // '#' - { 96, 19, 37, 22, 1, -30 }, // '$' - { 184, 29, 27, 32, 1, -26 }, // '%' - { 282, 25, 26, 28, 2, -26 }, // '&' - { 364, 6, 9, 10, 1, -26 }, // ''' - { 371, 9, 33, 14, 2, -26 }, // '(' - { 409, 9, 33, 14, 2, -26 }, // ')' - { 447, 15, 14, 17, 0, -28 }, // '*' - { 474, 19, 18, 22, 1, -22 }, // '+' - { 517, 6, 11, 12, 3, -5 }, // ',' - { 526, 11, 4, 13, 1, -11 }, // '-' - { 532, 5, 5, 12, 3, -5 }, // '.' - { 536, 9, 26, 11, 1, -26 }, // '/' - { 566, 18, 26, 22, 2, -26 }, // '0' - { 625, 13, 26, 22, 2, -26 }, // '1' - { 668, 18, 26, 22, 2, -26 }, // '2' - { 727, 18, 26, 22, 2, -26 }, // '3' - { 786, 21, 26, 22, 0, -26 }, // '4' - { 855, 18, 26, 22, 2, -26 }, // '5' - { 914, 18, 26, 22, 2, -26 }, // '6' - { 973, 18, 26, 22, 3, -26 }, // '7' - { 1032, 19, 26, 22, 1, -26 }, // '8' - { 1094, 18, 26, 22, 1, -26 }, // '9' - { 1153, 5, 19, 12, 3, -19 }, // ':' - { 1165, 5, 25, 12, 3, -19 }, // ';' - { 1181, 18, 20, 22, 1, -23 }, // '<' - { 1226, 18, 13, 22, 2, -19 }, // '=' - { 1256, 18, 20, 22, 1, -23 }, // '>' - { 1301, 18, 26, 22, 1, -26 }, // '?' - { 1360, 34, 33, 36, 1, -26 }, // '@' - { 1501, 24, 26, 27, 1, -26 }, // 'A' - { 1579, 21, 26, 27, 3, -26 }, // 'B' - { 1648, 23, 26, 28, 2, -26 }, // 'C' - { 1723, 22, 26, 28, 3, -26 }, // 'D' - { 1795, 20, 26, 25, 3, -26 }, // 'E' - { 1860, 18, 26, 23, 3, -26 }, // 'F' - { 1919, 24, 26, 30, 2, -26 }, // 'G' - { 1997, 21, 26, 28, 3, -26 }, // 'H' - { 2066, 5, 26, 12, 3, -26 }, // 'I' - { 2083, 17, 26, 22, 1, -26 }, // 'J' - { 2139, 22, 26, 28, 3, -26 }, // 'K' - { 2211, 18, 26, 23, 3, -26 }, // 'L' - { 2270, 25, 26, 31, 3, -26 }, // 'M' - { 2352, 22, 26, 28, 3, -26 }, // 'N' - { 2424, 25, 26, 30, 2, -26 }, // 'O' - { 2506, 19, 26, 25, 3, -26 }, // 'P' - { 2568, 26, 28, 30, 2, -26 }, // 'Q' - { 2659, 21, 26, 27, 3, -26 }, // 'R' - { 2728, 20, 26, 25, 2, -26 }, // 'S' - { 2793, 21, 26, 24, 1, -26 }, // 'T' - { 2862, 21, 26, 28, 3, -26 }, // 'U' - { 2931, 23, 26, 26, 1, -26 }, // 'V' - { 3006, 32, 26, 35, 1, -26 }, // 'W' - { 3110, 21, 26, 23, 0, -26 }, // 'X' - { 3179, 21, 26, 24, 1, -26 }, // 'Y' - { 3248, 23, 26, 24, 0, -26 }, // 'Z' - { 3323, 10, 33, 14, 2, -26 }, // '[' - { 3365, 10, 26, 11, 0, -26 }, // '\' - { 3398, 10, 33, 14, 0, -26 }, // ']' - { 3440, 17, 14, 22, 2, -26 }, // '^' - { 3470, 18, 2, 19, 0, 3 }, // '_' - { 3475, 8, 5, 10, 0, -26 }, // '`' Changed to degree symbol - { 3480, 19, 19, 22, 1, -19 }, // 'a' - { 3526, 19, 26, 24, 2, -26 }, // 'b' - { 3588, 18, 19, 22, 1, -19 }, // 'c' - { 3631, 19, 26, 24, 1, -26 }, // 'd' - { 3693, 18, 19, 22, 2, -19 }, // 'e' - { 3736, 15, 26, 13, -1, -26 }, // 'f' - { 3785, 19, 26, 24, 1, -19 }, // 'g' - { 3847, 18, 26, 23, 2, -26 }, // 'h' - { 3906, 5, 26, 11, 2, -26 }, // 'i' - { 3923, 10, 33, 11, -3, -26 }, // 'j' - { 3965, 17, 26, 22, 3, -26 }, // 'k' - { 4021, 5, 26, 11, 2, -26 }, // 'l' - { 4038, 28, 19, 33, 2, -19 }, // 'm' - { 4105, 18, 19, 23, 2, -19 }, // 'n' - { 4148, 20, 19, 23, 1, -19 }, // 'o' - { 4196, 19, 26, 24, 2, -19 }, // 'p' - { 4258, 19, 26, 24, 1, -19 }, // 'q' - { 4320, 13, 19, 17, 2, -19 }, // 'r' - { 4351, 17, 19, 21, 1, -19 }, // 's' - { 4392, 13, 26, 14, 0, -26 }, // 't' - { 4435, 18, 19, 23, 2, -19 }, // 'u' - { 4478, 18, 19, 21, 1, -19 }, // 'v' - { 4521, 28, 19, 30, 1, -19 }, // 'w' - { 4588, 17, 19, 20, 1, -19 }, // 'x' - { 4629, 19, 26, 21, 0, -19 }, // 'y' - { 4691, 18, 19, 20, 1, -19 }, // 'z' - { 4734, 13, 33, 15, 1, -26 }, // '{' - { 4788, 4, 33, 11, 3, -26 }, // '|' - { 4805, 13, 33, 15, 0, -26 } // '}' character 0x7D -}; -const GFXfont ArialRoundedMTBold_36 PROGMEM = { // Last character bug fixed 0x7E to 0x7D -(uint8_t *)ArialRoundedMTBold_36Bitmaps,(GFXglyph *)ArialRoundedMTBold_36Glyphs,0x20, 0x7D, 43}; - diff --git a/examples/320 x 240/weather-station/GfxUi.cpp b/examples/320 x 240/weather-station/GfxUi.cpp deleted file mode 100644 index c425abb..0000000 --- a/examples/320 x 240/weather-station/GfxUi.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -See more at http://blog.squix.ch - -Adapted by Bodmer to use the faster TFT_eSPI library: -https://github.com/Bodmer/TFT_eSPI - -Bodmer: Functions no longer needed weeded out, Jpeg decoder functions added -Bodmer: drawBMP() updated to buffer in and out pixels and use screen CGRAM rotation for faster bottom up drawing (now ~2x faster) -*/ - -#include "GfxUi.h" - -GfxUi::GfxUi(TFT_eSPI *tft) { - _tft = tft; -} - -void GfxUi::drawProgressBar(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, uint8_t percentage, uint16_t frameColor, uint16_t barColor) { - if (percentage == 0) { - _tft->fillRoundRect(x0, y0, w, h, 3, TFT_BLACK); - } - uint8_t margin = 2; - uint16_t barHeight = h - 2 * margin; - uint16_t barWidth = w - 2 * margin; - _tft->drawRoundRect(x0, y0, w, h, 3, frameColor); - _tft->fillRect(x0 + margin, y0 + margin, barWidth * percentage / 100.0, barHeight, barColor); -} - -// This drawBMP function contains code from: -// https://github.com/adafruit/Adafruit_ILI9341/blob/master/examples/spitftbitmap/spitftbitmap.ino -// Here is Bodmer's version: this uses the ILI9341 CGRAM coordinate rotation features inside the display and -// buffers both file and TFT pixel blocks, it typically runs about 2x faster for bottom up encoded BMP images - -//void GfxUi::drawBMP(String filename, uint8_t x, uint16_t y, boolean flip) { // Alernative for caller control of flip -void GfxUi::drawBmp(String filename, uint8_t x, uint16_t y) { - // Flips the TFT internal SGRAM coords to draw bottom up BMP images faster, in this application it can be fixed - boolean flip = 1; - - if ((x >= _tft->width()) || (y >= _tft->height())) return; - - fs::File bmpFile; - int16_t bmpWidth, bmpHeight; // Image W+H in pixels - uint32_t bmpImageoffset; // Start address of image data in file - uint32_t rowSize; // Not always = bmpWidth; may have padding - uint8_t sdbuffer[3 * BUFFPIXEL]; // file read pixel buffer (8 bits each R+G+B per pixel) - uint16_t tftbuffer[BUFFPIXEL]; // TFT pixel out buffer (16-bit per pixel) - uint8_t rgb_ptr = sizeof(sdbuffer); // read 24 bit RGB pixel data buffer pointer (8 bit so BUFF_SIZE must be less than 86) - boolean goodBmp = false; // Flag set to true on valid header parse - int16_t w, h, row, col; // to store width, height, row and column - uint8_t rotation; // to restore rotation - uint8_t tft_ptr = 0; // TFT 16 bit 565 format pixel data buffer pointer - - // Check file exists and open it - Serial.println(filename); - if ( !(bmpFile = SPIFFS.open(filename, "r")) ) { - Serial.println(F(" File not found")); // Can comment out if not needed - return; - } - - // Parse BMP header to get the information we need - if (read16(bmpFile) == 0x4D42) { // BMP file start signature check - read32(bmpFile); // Dummy read to throw away and move on - read32(bmpFile); // Read & ignore creator bytes - bmpImageoffset = read32(bmpFile); // Start of image data - read32(bmpFile); // Dummy read to throw away and move on - bmpWidth = read32(bmpFile); // Image width - bmpHeight = read32(bmpFile); // Image height - - // Only proceed if we pass a bitmap file check - // Number of image planes -- must be '1', depth 24 and 0 (uncompressed format) - if ((read16(bmpFile) == 1) && (read16(bmpFile) == 24) && (read32(bmpFile) == 0)) { - goodBmp = true; // Supported BMP format - // BMP rows are padded (if needed) to 4-byte boundary - rowSize = (bmpWidth * 3 + 3) & ~3; - // Crop area to be loaded - w = bmpWidth; - h = bmpHeight; - - // We might need to alter rotation to avoid tedious file pointer manipulation - // Save the current value so we can restore it later - rotation = _tft->getRotation(); - // Use TFT SGRAM coord rotation if flip is set for 25% faster rendering (new rotations 4-7 supported by library) - if (flip) _tft->setRotation((rotation + (flip<<2)) % 8); // Value 0-3 mapped to 4-7 - - // Calculate new y plot coordinate if we are flipping - switch (rotation) { - case 0: - if (flip) y = _tft->height() - y - h; break; - case 1: - y = _tft->height() - y - h; break; - break; - case 2: - if (flip) y = _tft->height() - y - h; break; - break; - case 3: - y = _tft->height() - y - h; break; - break; - } - - // Set TFT address window to image bounds - // Currently, image will not draw or will be corrputed if it does not fit - // TODO -> efficient clipping, but I don't need it to be idiot proof ;-) - _tft->setAddrWindow(x, y, x + w - 1, y + h - 1); - - // Finally we are ready to send rows of pixels, writing like this avoids slow 32 bit multiply in 8 bit processors - for (uint32_t pos = bmpImageoffset; pos < bmpImageoffset + h * rowSize ; pos += rowSize) { - // Seek if we need to on boundaries and arrange to dump buffer and start again - if (bmpFile.position() != pos) { - bmpFile.seek(pos, fs::SeekSet); - rgb_ptr = sizeof(sdbuffer); - //Serial.println("Seeking in file >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); - } - - // Fill the pixel buffer and plot - for (col = 0; col < w; col++) { // For each column... - // Time to read more pixel data? - if (rgb_ptr >= sizeof(sdbuffer)) { - // Push tft buffer to the display - if (tft_ptr) { - // Here we are sending a uint16_t array to the function - _tft->pushColors(tftbuffer, tft_ptr); - tft_ptr = 0; // tft_ptr and rgb_ptr are not always in sync... - } - // Finally reading bytes from SD Card - bmpFile.read(sdbuffer, sizeof(sdbuffer)); - rgb_ptr = 0; // Set buffer index to start - } - // Convert pixel from BMP 8+8+8 format to TFT compatible 16 bit word - // Blue 5 bits, green 6 bits and red 5 bits (16 bits total) - // Is is a long line but it is faster than calling a library fn for this - tftbuffer[tft_ptr] = (sdbuffer[rgb_ptr++] >> 3) ; - tftbuffer[tft_ptr] |= ((sdbuffer[rgb_ptr++] & 0xFC) << 3); - tftbuffer[tft_ptr] |= ((sdbuffer[rgb_ptr++] & 0xF8) << 8); - tft_ptr++; - } // Next row - } // All rows done - - // Write any partially full buffer to TFT - if (tft_ptr) _tft->pushColors(tftbuffer, tft_ptr); - - } // End of bitmap access - } // End of bitmap file check - - bmpFile.close(); - - if(!goodBmp) { - Serial.print(F("BMP format not recognised. File:")); - Serial.println(filename); - } - else - _tft->setRotation(rotation); // Put back original rotation -} - -// These read 16- and 32-bit types from the SD card file. -// BMP data is stored little-endian, Arduino is little-endian too. -// May need to reverse subscript order if porting elsewhere. - -uint16_t GfxUi::read16(fs::File &f) { - uint16_t result; - ((uint8_t *)&result)[0] = f.read(); // LSB - ((uint8_t *)&result)[1] = f.read(); // MSB - return result; -} - -uint32_t GfxUi::read32(fs::File &f) { - uint32_t result; - ((uint8_t *)&result)[0] = f.read(); // LSB - ((uint8_t *)&result)[1] = f.read(); - ((uint8_t *)&result)[2] = f.read(); - ((uint8_t *)&result)[3] = f.read(); // MSB - return result; -} - -/*==================================================================================== - This sketch support functions to render the Jpeg images. - - Created by Bodmer 15th Jan 2017 - ==================================================================================*/ - -// Return the minimum of two values a and b -#define minimum(a,b) (((a) < (b)) ? (a) : (b)) - -#define USE_SPI_BUFFER // Comment out to use slower 16 bit pushColor() - -//==================================================================================== -// Opens the image file and prime the Jpeg decoder -//==================================================================================== -void GfxUi::drawJpeg(const char *filename, int xpos, int ypos) { - - Serial.println("==========================="); - Serial.print("Drawing file: "); Serial.println(filename); - Serial.println("==========================="); - - // Open the named file (the Jpeg decoder library will close it after rendering image) - fs::File jpegFile = SPIFFS.open( filename, "r"); // File handle reference for SPIFFS - // File jpegFile = SD.open( filename, FILE_READ); // or, file handle reference for SD library - - if ( !jpegFile ) { - Serial.print("ERROR: File \""); Serial.print(filename); Serial.println ("\" not found!"); - return; - } - - // Use one of the three following methods to initialise the decoder: - //boolean decoded = JpegDec.decodeFsFile(jpegFile); // Pass a SPIFFS file handle to the decoder, - //boolean decoded = JpegDec.decodeSdFile(jpegFile); // or pass the SD file handle to the decoder, - boolean decoded = JpegDec.decodeFsFile(filename); // or pass the filename (leading / distinguishes SPIFFS files) - // Note: the filename can be a String or character array type - if (decoded) { - // print information about the image to the serial port - jpegInfo(); - - // render the image onto the screen at given coordinates - jpegRender(xpos, ypos); - } - else { - Serial.println("Jpeg file format not supported!"); - } -} - -//==================================================================================== -// Decode and render the Jpeg image onto the TFT screen -//==================================================================================== -void GfxUi::jpegRender(int xpos, int ypos) { - - // retrieve infomration about the image - uint16_t *pImg; - uint16_t mcu_w = JpegDec.MCUWidth; - uint16_t mcu_h = JpegDec.MCUHeight; - uint32_t max_x = JpegDec.width; - uint32_t max_y = JpegDec.height; - - // Jpeg images are draw as a set of image block (tiles) called Minimum Coding Units (MCUs) - // Typically these MCUs are 16x16 pixel blocks - // Determine the width and height of the right and bottom edge image blocks - uint32_t min_w = minimum(mcu_w, max_x % mcu_w); - uint32_t min_h = minimum(mcu_h, max_y % mcu_h); - - // save the current image block size - uint32_t win_w = mcu_w; - uint32_t win_h = mcu_h; - - // record the current time so we can measure how long it takes to draw an image - uint32_t drawTime = millis(); - - // save the coordinate of the right and bottom edges to assist image cropping - // to the screen size - max_x += xpos; - max_y += ypos; - - // read each MCU block until there are no more -#ifdef USE_SPI_BUFFER - while( JpegDec.readSwappedBytes()){ // Swap byte order so the SPI buffer can be used -#else - while ( JpegDec.read()) { // Normal byte order read -#endif - // save a pointer to the image block - pImg = JpegDec.pImage; - - // calculate where the image block should be drawn on the screen - int mcu_x = JpegDec.MCUx * mcu_w + xpos; - int mcu_y = JpegDec.MCUy * mcu_h + ypos; - - // check if the image block size needs to be changed for the right edge - if (mcu_x + mcu_w <= max_x) win_w = mcu_w; - else win_w = min_w; - - // check if the image block size needs to be changed for the bottom edge - if (mcu_y + mcu_h <= max_y) win_h = mcu_h; - else win_h = min_h; - - // copy pixels into a contiguous block - if (win_w != mcu_w) - { - uint16_t *cImg; - int p = 0; - cImg = pImg + win_w; - for (int h = 1; h < win_h; h++) - { - p += mcu_w; - for (int w = 0; w < win_w; w++) - { - *cImg = *(pImg + w + p); - cImg++; - } - } - } - - // draw image MCU block only if it will fit on the screen - if ( ( mcu_x + win_w) <= _tft->width() && ( mcu_y + win_h) <= _tft->height()) - { - _tft->pushImage(mcu_x, mcu_y, win_w, win_h, pImg); - } - - else if ( ( mcu_y + win_h) >= _tft->height()) JpegDec.abort(); - - } - - // calculate how long it took to draw the image - drawTime = millis() - drawTime; // Calculate the time it took - - // print the results to the serial port - Serial.print ("Total render time was : "); Serial.print(drawTime); Serial.println(" ms"); - Serial.println("====================================="); - -} - -//==================================================================================== -// Print information decoded from the Jpeg image -//==================================================================================== -void GfxUi::jpegInfo() { - - Serial.println("==============="); - Serial.println("JPEG image info"); - Serial.println("==============="); - Serial.print ("Width :"); Serial.println(JpegDec.width); - Serial.print ("Height :"); Serial.println(JpegDec.height); - Serial.print ("Components :"); Serial.println(JpegDec.comps); - Serial.print ("MCU / row :"); Serial.println(JpegDec.MCUSPerRow); - Serial.print ("MCU / col :"); Serial.println(JpegDec.MCUSPerCol); - Serial.print ("Scan type :"); Serial.println(JpegDec.scanType); - Serial.print ("MCU width :"); Serial.println(JpegDec.MCUWidth); - Serial.print ("MCU height :"); Serial.println(JpegDec.MCUHeight); - Serial.println("==============="); - Serial.println(""); - -} -//==================================================================================== diff --git a/examples/320 x 240/weather-station/GfxUi.h b/examples/320 x 240/weather-station/GfxUi.h deleted file mode 100644 index f381129..0000000 --- a/examples/320 x 240/weather-station/GfxUi.h +++ /dev/null @@ -1,60 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -See more at http://blog.squix.ch - -Adapted by Bodmer to use the faster TFT_eSPI library: -https://github.com/Bodmer/TFT_eSPI - -*/ - - -#include // Hardware-specific library - -#define FS_NO_GLOBALS // Avoid conflict with SD library File type definition -#include - -// JPEG decoder library -#include - -#ifndef _GFX_UI_H -#define _GFX_UI_H - -// Maximum of 85 for BUFFPIXEL as 3 x this value is stored in an 8 bit variable! -// 32 is an efficient size for SPIFFS due to SPI hardware pipeline buffer size -// A larger value of 80 is better for SD cards -#define BUFFPIXEL 32 - -class GfxUi { - public: - GfxUi(TFT_eSPI * tft); - void drawBmp(String filename, uint8_t x, uint16_t y); - void drawProgressBar(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t percentage, uint16_t frameColor, uint16_t barColor); - void jpegInfo(); - void drawJpeg(const char *filename, int xpos, int ypos); - void jpegRender(int xpos, int ypos); - - private: - TFT_eSPI * _tft; - uint16_t read16(fs::File &f); - uint32_t read32(fs::File &f); - -}; - -#endif - diff --git a/examples/320 x 240/weather-station/SPIFFS_Support.ino b/examples/320 x 240/weather-station/SPIFFS_Support.ino deleted file mode 100644 index 37eefe1..0000000 --- a/examples/320 x 240/weather-station/SPIFFS_Support.ino +++ /dev/null @@ -1,42 +0,0 @@ -/*==================================================================================== - This sketch contains support functions for the ESP6266 SPIFFS filing system - - Created by Bodmer 15th Jan 2017 - ==================================================================================*/ - -//==================================================================================== -// Print a SPIFFS directory list (root directory) -//==================================================================================== - -void listFiles(void) { - Serial.println(); - Serial.println("SPIFFS files found:"); - - fs::Dir dir = SPIFFS.openDir("/"); // Root directory - String line = "====================================="; - uint32_t totalBytes = 0; - - Serial.println(line); - Serial.println(" File name Size"); - Serial.println(line); - - while (dir.next()) { - String fileName = dir.fileName(); - Serial.print(fileName); - int spaces = 25 - fileName.length(); // Tabulate nicely - while (spaces--) Serial.print(" "); - fs::File f = dir.openFile("r"); - Serial.print(f.size()); Serial.println(" bytes"); - totalBytes += f.size(); - } - Serial.println(); Serial.print("Total = "); - int spaces = 25 - 8; // Tabulate nicely - while (spaces--) Serial.print(" "); - Serial.print(totalBytes); Serial.println(" bytes"); - - Serial.println(line); - Serial.println(); - delay(1000); -} -//==================================================================================== - diff --git a/examples/320 x 240/weather-station/WebResource.cpp b/examples/320 x 240/weather-station/WebResource.cpp deleted file mode 100644 index 2020fd1..0000000 --- a/examples/320 x 240/weather-station/WebResource.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -See more at http://blog.squix.ch -*/ - -#include "WebResource.h" - -WebResource::WebResource(){ - -} - -void WebResource::downloadFile(String url, String filename) { - downloadFile(url, filename, nullptr); -} - -void WebResource::downloadFile(String url, String filename, ProgressCallback progressCallback) { - - if (SPIFFS.exists(filename) == true) { - Serial.println("Found " + filename); - return; - } - else Serial.println("Downloading " + filename + " from " + url); - - // wait for WiFi connection - if((_wifiMulti.run() == WL_CONNECTED)) { - HTTPClient http; - - Serial.print("[HTTP] begin...\n"); - - // configure server and url - http.begin(url); - - Serial.print("[HTTP] GET...\n"); - // start connection and send HTTP header - int httpCode = http.GET(); - if(httpCode > 0) { - //SPIFFS.remove(filename); - fs::File f = SPIFFS.open(filename, "w+"); - if (!f) { - Serial.println("file open failed"); - return; - } - // HTTP header has been send and Server response header has been handled - Serial.printf("[HTTP] GET... code: %d\n", httpCode); - - // file found at server - if(httpCode == HTTP_CODE_OK) { - - // get length of document (is -1 when Server sends no Content-Length header) - int total = http.getSize(); - int len = total; - progressCallback(filename, 0,total); - // create buffer for read - uint8_t buff[128] = { 0 }; - - // get tcp stream - WiFiClient * stream = http.getStreamPtr(); - - // read all data from server - while(http.connected() && (len > 0 || len == -1)) { - // get available data size - size_t size = stream->available(); - - if(size) { - // read up to 128 byte - int c = stream->readBytes(buff, ((size > sizeof(buff)) ? sizeof(buff) : size)); - - // write it to Serial - f.write(buff, c); - - if(len > 0) { - len -= c; - } - progressCallback(filename, total - len,total); - } - delay(1); - } - - Serial.println(); - Serial.print("[HTTP] connection closed or file end.\n"); - - } - f.close(); - } else { - Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str()); - } - - http.end(); - } -} diff --git a/examples/320 x 240/weather-station/WebResource.h b/examples/320 x 240/weather-station/WebResource.h deleted file mode 100644 index acff084..0000000 --- a/examples/320 x 240/weather-station/WebResource.h +++ /dev/null @@ -1,46 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -See more at http://blog.squix.ch -*/ - -#define FS_NO_GLOBALS // Avoid conflict with SD library File type definition -#include -#include -#include -#include -#include - -#ifndef _WEBRESOURCE_H -#define _WEBRESOURCE_H - -typedef void (*ProgressCallback)(String fileName, int16_t bytesDownloaded, int16_t bytesTotal); - -class WebResource { - public: - WebResource(); - void downloadFile(String url, String filename, ProgressCallback progressCallback); - void downloadFile(String url, String filename); - - - private: - ESP8266WiFiMulti _wifiMulti; - -}; - -#endif - diff --git a/examples/320 x 240/weather-station/settings.h b/examples/320 x 240/weather-station/settings.h deleted file mode 100644 index d4d97c2..0000000 --- a/examples/320 x 240/weather-station/settings.h +++ /dev/null @@ -1,72 +0,0 @@ -/**The MIT License (MIT) -Copyright (c) 2015 by Daniel Eichhorn -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -See more at http://blog.squix.ch - -Adapted by Bodmer to use the faster TFT_ILI9341_ESP library: -https://github.com/Bodmer/TFT_eSPI - -Version 9 -*/ - -// *************************************************************************************** -// WARNING - READ THIS -// -// 3M Flash Size MUST be allocated to SPIFFS using the IDE Tools menu option or else the -// ESP8266 may crash or do strange things (due to lack of error checks in SPIFFS library?) -// *************************************************************************************** -// -// Setup -const int UPDATE_INTERVAL_SECS = 10 * 60; // Update every 10 minutes - -// Pins for the TFT interface are defined in the User_Config.h file inside the TFT_eSPI library - -// TimeClient settings -const float UTC_OFFSET = 1; - -// Wunderground Settings, EDIT to suit your Wunderground key and location -const boolean IS_METRIC = true; // Temperature only? Wind speed units appear to stay in mph. To do: investigate <<<<<<<<<<<<<<<<<<<<<<<<< -//const String WUNDERGRROUND_API_KEY = "WUNDERGROUND KEY HERE"; - const String WUNDERGRROUND_API_KEY = "1c265fajf48s0a82"; // Random key example showing how the above line should look - -// For language codes see https://www.wunderground.com/weather/api/d/docs?d=language-support&_ga=1.55148395.1951311424.1484425551 -const String WUNDERGRROUND_LANGUAGE = "EN"; // Language EN = English - -// For a list of countries, states and cities see https://www.wunderground.com/about/faq/international_cities.asp -const String WUNDERGROUND_COUNTRY = "Peru"; // UK, US etc -const String WUNDERGROUND_CITY = "Base_Naval"; // City, "London", "FL/Boca_Raton" for Boca Raton in Florida (State/City) etc. Use underscore_for spaces) - -// Windspeed conversion, use 1 pair of #defines. To do: investigate a more convenient method <<<<<<<<<<<<<<<<<<<<< -//#define WIND_SPEED_SCALING 1.0 // mph -//#define WIND_SPEED_UNITS " mph" - -//#define WIND_SPEED_SCALING 0.868976 // mph to knots -//#define WIND_SPEED_UNITS " kn" - -#define WIND_SPEED_SCALING 1.60934 // mph to kph -#define WIND_SPEED_UNITS " kph" - -//Thingspeak Settings - not used, no need to populate this at the moment -const String THINGSPEAK_CHANNEL_ID = "CHANNEL_ID_HERE"; -const String THINGSPEAK_API_READ_KEY = "API_READ_KEY_HERE"; - -// List, so that the downloader knows what to fetch -String wundergroundIcons [] = {"chanceflurries","chancerain","chancesleet","chancesnow","clear","cloudy","flurries","fog","hazy","mostlycloudy","mostlysunny","partlycloudy","partlysunny","rain","sleet","snow","sunny","tstorms","unknown"}; - -/*************************** - * End Settings - **************************/ diff --git a/examples/320 x 240/weather-station/weather-station.ino b/examples/320 x 240/weather-station/weather-station.ino deleted file mode 100644 index ab3cfad..0000000 --- a/examples/320 x 240/weather-station/weather-station.ino +++ /dev/null @@ -1,595 +0,0 @@ -/**The MIT License (MIT) - Copyright (c) 2015 by Daniel Eichhorn - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYBR_DATUM HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - See more at http://blog.squix.ch - - Adapted by Bodmer to use the faster TFT_eSPI library: - https://github.com/Bodmer/TFT_eSPI - - Plus: - Minor changes to text placement and auto-blanking out old text with background colour padding - Moon phase text added - Forecast text lines are automatically split onto two lines at a central space (some are long!) - Time is printed with colons aligned to tidy display - Min and max forecast temperatures spaced out - The ` character has been changed to a degree symbol in the 36 point font - New smart WU splash startup screen and updated progress messages - Display does not need to be blanked between updates - Icons nudged about slightly to add wind direction + speed - Barometric pressure added -*/ - -#define SERIAL_MESSAGES - -#include - -#include -#include // Hardware-specific library - -// Additional UI functions -#include "GfxUi.h" - -// Fonts created by http://oleddisplay.squix.ch/ -#include "ArialRoundedMTBold_14.h" -#include "ArialRoundedMTBold_36.h" - -// Download helper -#include "WebResource.h" - -#include -#include -#include -#include -#include - -// Helps with connecting to internet -#include - -// check settings.h for adapting to your needs -#include "settings.h" -#include -#include -#include "TimeClient.h" - -// HOSTNAME for OTA update -#define HOSTNAME "ESP8266-OTA-" - -/***************************** - Important: see settings.h to configure your settings!!! - * ***************************/ - -TFT_eSPI tft = TFT_eSPI(); // Invoke custom library - -boolean booted = true; - -GfxUi ui = GfxUi(&tft); - -WebResource webResource; -TimeClient timeClient(UTC_OFFSET); - -// Set to false, if you prefere imperial/inches, Fahrenheit -WundergroundClient wunderground(IS_METRIC); - -//declaring prototypes -void configModeCallback (WiFiManager *myWiFiManager); -void downloadCallback(String filename, int16_t bytesDownloaded, int16_t bytesTotal); -ProgressCallback _downloadCallback = downloadCallback; -void downloadResources(); -void updateData(); -void drawProgress(uint8_t percentage, String text); -void drawTime(); -void drawCurrentWeather(); -void drawForecast(); -void drawForecastDetail(uint16_t x, uint16_t y, uint8_t dayIndex); -String getMeteoconIcon(String iconText); -void drawAstronomy(); -void drawSeparator(uint16_t y); - -long lastDownloadUpdate = millis(); - -void setup() { -#ifdef SERIAL_MESSAGES - Serial.begin(250000); -#endif - tft.begin(); - tft.fillScreen(TFT_BLACK); - - tft.setFreeFont(&ArialRoundedMTBold_14); - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_DARKGREY, TFT_BLACK); - tft.drawString("Original by: blog.squix.org", 120, 240); - tft.drawString("Adapted by: Bodmer", 120, 260); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - - SPIFFS.begin(); - //listFiles(); - //Uncomment if you want to erase SPIFFS and update all internet resources, this takes some time! - //tft.drawString("Formatting SPIFFS, so wait!", 120, 200); SPIFFS.format(); - - if (SPIFFS.exists("/WU.jpg") == true) ui.drawJpeg("/WU.jpg", 0, 10); - if (SPIFFS.exists("/Earth.jpg") == true) ui.drawJpeg("/Earth.jpg", 0, 320-56); // Image is 56 pixels high - delay(1000); - tft.drawString("Connecting to WiFi", 120, 200); - tft.setTextPadding(240); // Pad next drawString() text to full width to over-write old text - - //WiFiManager - //Local intialization. Once its business is done, there is no need to keep it around - WiFiManager wifiManager; - // Uncomment for testing wifi manager - //wifiManager.resetSettings(); - wifiManager.setAPCallback(configModeCallback); - - //or use this for auto generated name ESP + ChipID - wifiManager.autoConnect(); - - //Manual Wifi - //WiFi.begin(WIFI_SSID, WIFI_PWD); - - // OTA Setup - String hostname(HOSTNAME); - hostname += String(ESP.getChipId(), HEX); - WiFi.hostname(hostname); - ArduinoOTA.setHostname((const char *)hostname.c_str()); - ArduinoOTA.begin(); - - // download images from the net. If images already exist don't download - tft.drawString("Downloading to SPIFFS...", 120, 200); - tft.drawString(" ", 120, 240); // Clear line - tft.drawString(" ", 120, 260); // Clear line - downloadResources(); - //listFiles(); - tft.setTextDatum(BC_DATUM); - tft.setTextPadding(240); // Pad next drawString() text to full width to over-write old text - tft.drawString(" ", 120, 200); // Clear line above using set padding width - tft.drawString("Fetching weather data...", 120, 200); - //delay(500); - - // load the weather information - updateData(); -} - -long lastDrew = 0; -void loop() { - // Handle OTA update requests - ArduinoOTA.handle(); - - // Check if we should update the clock - if (millis() - lastDrew > 30000 && wunderground.getSeconds() == "00") { - drawTime(); - lastDrew = millis(); - } - - // Check if we should update weather information - if (millis() - lastDownloadUpdate > 1000 * UPDATE_INTERVAL_SECS) { - updateData(); - lastDownloadUpdate = millis(); - } -} - -// Called if WiFi has not been configured yet -void configModeCallback (WiFiManager *myWiFiManager) { - tft.setTextDatum(BC_DATUM); - tft.setFreeFont(&ArialRoundedMTBold_14); - tft.setTextColor(TFT_ORANGE); - tft.drawString("Wifi Manager", 120, 28); - tft.drawString("Please connect to AP", 120, 42); - tft.setTextColor(TFT_WHITE); - tft.drawString(myWiFiManager->getConfigPortalSSID(), 120, 56); - tft.setTextColor(TFT_ORANGE); - tft.drawString("To setup Wifi Configuration", 120, 70); -} - -// callback called during download of files. Updates progress bar -void downloadCallback(String filename, int16_t bytesDownloaded, int16_t bytesTotal) { - Serial.println(String(bytesDownloaded) + " / " + String(bytesTotal)); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - tft.setTextPadding(240); - - int percentage = 100 * bytesDownloaded / bytesTotal; - if (percentage == 0) { - tft.drawString(filename, 120, 220); - } - if (percentage % 5 == 0) { - tft.setTextDatum(TC_DATUM); - tft.setTextPadding(tft.textWidth(" 888% ")); - tft.drawString(String(percentage) + "%", 120, 245); - ui.drawProgressBar(10, 225, 240 - 20, 15, percentage, TFT_WHITE, TFT_BLUE); - } - -} - -// Download the bitmaps -void downloadResources() { - // tft.fillScreen(TFT_BLACK); - tft.setFreeFont(&ArialRoundedMTBold_14); - char id[5]; - - // Download WU graphic jpeg first and display it, then the Earth view - webResource.downloadFile((String)"http://i.imgur.com/njl1pMj.jpg", (String)"/WU.jpg", _downloadCallback); - if (SPIFFS.exists("/WU.jpg") == true) ui.drawJpeg("/WU.jpg", 0, 10); - - webResource.downloadFile((String)"http://i.imgur.com/v4eTLCC.jpg", (String)"/Earth.jpg", _downloadCallback); - if (SPIFFS.exists("/Earth.jpg") == true) ui.drawJpeg("/Earth.jpg", 0, 320-56); - - //webResource.downloadFile((String)"http://i.imgur.com/IY57GSv.jpg", (String)"/Horizon.jpg", _downloadCallback); - //if (SPIFFS.exists("/Horizon.jpg") == true) ui.drawJpeg("/Horizon.jpg", 0, 320-160); - - //webResource.downloadFile((String)"http://i.imgur.com/jZptbtY.jpg", (String)"/Rainbow.jpg", _downloadCallback); - //if (SPIFFS.exists("/Rainbow.jpg") == true) ui.drawJpeg("/Rainbow.jpg", 0, 0); - - for (int i = 0; i < 19; i++) { - sprintf(id, "%02d", i); - webResource.downloadFile("http://www.squix.org/blog/wunderground/" + wundergroundIcons[i] + ".bmp", wundergroundIcons[i] + ".bmp", _downloadCallback); - } - for (int i = 0; i < 19; i++) { - sprintf(id, "%02d", i); - webResource.downloadFile("http://www.squix.org/blog/wunderground/mini/" + wundergroundIcons[i] + ".bmp", "/mini/" + wundergroundIcons[i] + ".bmp", _downloadCallback); - } - for (int i = 0; i < 24; i++) { - webResource.downloadFile("http://www.squix.org/blog/moonphase_L" + String(i) + ".bmp", "/moon" + String(i) + ".bmp", _downloadCallback); - } -} - -// Update the internet based information and update screen -void updateData() { - // booted = true; // Test only - // booted = false; // Test only - - if (booted) ui.drawJpeg("/WU.jpg", 0, 10); // May have already drawn this but it does not take long - else tft.drawCircle(22, 22, 18, TFT_DARKGREY); // Outer ring - optional - - if (booted) drawProgress(20, "Updating time..."); - else fillSegment(22, 22, 0, (int) (20 * 3.6), 16, TFT_NAVY); - - timeClient.updateTime(); - if (booted) drawProgress(50, "Updating conditions..."); - else fillSegment(22, 22, 0, (int) (50 * 3.6), 16, TFT_NAVY); - - wunderground.updateConditions(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY); - if (booted) drawProgress(70, "Updating forecasts..."); - else fillSegment(22, 22, 0, (int) (70 * 3.6), 16, TFT_NAVY); - - wunderground.updateForecast(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY); - if (booted) drawProgress(90, "Updating astronomy..."); - else fillSegment(22, 22, 0, (int) (90 * 3.6), 16, TFT_NAVY); - - wunderground.updateAstronomy(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY); - // lastUpdate = timeClient.getFormattedTime(); - // readyForWeatherUpdate = false; - if (booted) drawProgress(100, "Done..."); - else fillSegment(22, 22, 0, 360, 16, TFT_NAVY); - - if (booted) delay(2000); - - if (booted) tft.fillScreen(TFT_BLACK); - else fillSegment(22, 22, 0, 360, 22, TFT_BLACK); - - //tft.fillScreen(TFT_CYAN); // For text padding and update graphics over-write checking only - drawTime(); - drawCurrentWeather(); - drawForecast(); - drawAstronomy(); - booted = false; -} - -// Progress bar helper -void drawProgress(uint8_t percentage, String text) { - tft.setFreeFont(&ArialRoundedMTBold_14); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - tft.setTextPadding(240); - tft.drawString(text, 120, 220); - - ui.drawProgressBar(10, 225, 240 - 20, 15, percentage, TFT_WHITE, TFT_BLUE); - - tft.setTextPadding(0); -} - -// draws the clock -void drawTime() { - - tft.setFreeFont(&ArialRoundedMTBold_36); - - String timeNow = timeClient.getHours() + ":" + timeClient.getMinutes(); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_YELLOW, TFT_BLACK); - tft.setTextPadding(tft.textWidth(" 44:44 ")); // String width + margin - tft.drawString(timeNow, 120, 53); - - tft.setFreeFont(&ArialRoundedMTBold_14); - - String date = wunderground.getDate(); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_WHITE, TFT_BLACK); - tft.setTextPadding(tft.textWidth(" Ddd, 44 Mmm 4444 ")); // String width + margin - tft.drawString(date, 120, 16); - - drawSeparator(54); - - tft.setTextPadding(0); -} - -// draws current weather information -void drawCurrentWeather() { - // Weather Icon - String weatherIcon = getMeteoconIcon(wunderground.getTodayIcon()); - //uint32_t dt = millis(); - ui.drawBmp(weatherIcon + ".bmp", 0, 59); - //Serial.print("Icon draw time = "); Serial.println(millis()-dt); - - // Weather Text - - String weatherText = wunderground.getWeatherText(); - //weatherText = "Heavy Thunderstorms with Small Hail"; // Test line splitting with longest(?) string - - tft.setFreeFont(&ArialRoundedMTBold_14); - - tft.setTextDatum(BR_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - - int splitPoint = 0; - int xpos = 230; - splitPoint = splitIndex(weatherText); - if (splitPoint > 16) xpos = 235; - - tft.setTextPadding(tft.textWidth("Heavy Thunderstorms")); // Max anticipated string width - if (splitPoint) tft.drawString(weatherText.substring(0, splitPoint), xpos, 72); - tft.setTextPadding(tft.textWidth(" with Small Hail")); // Max anticipated string width + margin - tft.drawString(weatherText.substring(splitPoint), xpos, 87); - - tft.setFreeFont(&ArialRoundedMTBold_36); - - tft.setTextDatum(TR_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - - // Font ASCII code 96 (0x60) modified to make "`" a degree symbol - tft.setTextPadding(tft.textWidth("-88`")); // Max width of vales - - weatherText = wunderground.getCurrentTemp(); - if (weatherText.indexOf(".")) weatherText = weatherText.substring(0, weatherText.indexOf(".")); // Make it integer temperature - if (weatherText == "") weatherText = "?"; // Handle null return - tft.drawString(weatherText + "`", 221, 100); - - tft.setFreeFont(&ArialRoundedMTBold_14); - - tft.setTextDatum(TL_DATUM); - tft.setTextPadding(0); - if (IS_METRIC) tft.drawString("C ", 221, 100); - else tft.drawString("F ", 221, 100); - - //tft.drawString(wunderground.getPressure(), 180, 30); - - weatherText = ""; //wunderground.getWindDir() + " "; - weatherText += String((int)(wunderground.getWindSpeed().toInt() * WIND_SPEED_SCALING)) + WIND_SPEED_UNITS; - - tft.setTextDatum(TC_DATUM); - tft.setTextPadding(tft.textWidth(" 888 mph")); // Max string length? - tft.drawString(weatherText, 128, 136); - - weatherText = wunderground.getPressure(); - - tft.setTextDatum(TR_DATUM); - tft.setTextPadding(tft.textWidth(" 8888mb")); // Max string length? - tft.drawString(weatherText, 230, 136); - - weatherText = wunderground.getWindDir(); - - int windAngle = 0; - String compassCardinal = ""; - switch (weatherText.length()) { - case 1: - compassCardinal = "N E S W "; // Not used, see default below - windAngle = 90 * compassCardinal.indexOf(weatherText) / 2; - break; - case 2: - compassCardinal = "NE SE SW NW"; - windAngle = 45 + 90 * compassCardinal.indexOf(weatherText) / 3; - break; - case 3: - compassCardinal = "NNE ENE ESE SSE SSW WSW WNW NNW"; - windAngle = 22 + 45 * compassCardinal.indexOf(weatherText) / 4; // 22 should be 22.5 but accuracy is not needed! - break; - default: - if (weatherText == "Variable") windAngle = -1; - else { - // v23456v23456v23456v23456 character ruler - compassCardinal = "North East South West"; // Possible strings - windAngle = 90 * compassCardinal.indexOf(weatherText) / 6; - } - break; - } - - tft.fillCircle(128, 110, 23, TFT_BLACK); // Erase old plot, radius + 1 to delete stray pixels - tft.drawCircle(128, 110, 22, TFT_DARKGREY); // Outer ring - optional - if ( windAngle >= 0 ) fillSegment(128, 110, windAngle - 15, 30, 22, TFT_GREEN); // Might replace this with a bigger rotating arrow - tft.drawCircle(128, 110, 6, TFT_RED); - - drawSeparator(153); - - tft.setTextDatum(TL_DATUM); // Reset datum to normal - tft.setTextPadding(0); // Reset padding width to none -} - -// draws the three forecast columns -void drawForecast() { - drawForecastDetail(10, 171, 0); - drawForecastDetail(95, 171, 2); - drawForecastDetail(180, 171, 4); - drawSeparator(171 + 69); -} - -// helper for the forecast columns -void drawForecastDetail(uint16_t x, uint16_t y, uint8_t dayIndex) { - tft.setFreeFont(&ArialRoundedMTBold_14); - - String day = wunderground.getForecastTitle(dayIndex).substring(0, 3); - day.toUpperCase(); - - tft.setTextDatum(BC_DATUM); - - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - tft.setTextPadding(tft.textWidth("WWW")); - tft.drawString(day, x + 25, y); - - tft.setTextColor(TFT_WHITE, TFT_BLACK); - tft.setTextPadding(tft.textWidth("-88 -88")); - tft.drawString(wunderground.getForecastHighTemp(dayIndex) + " " + wunderground.getForecastLowTemp(dayIndex), x + 25, y + 14); - - String weatherIcon = getMeteoconIcon(wunderground.getForecastIcon(dayIndex)); - ui.drawBmp("/mini/" + weatherIcon + ".bmp", x, y + 15); - - tft.setTextPadding(0); // Reset padding width to none -} - -// draw moonphase and sunrise/set and moonrise/set -void drawAstronomy() { - tft.setFreeFont(&ArialRoundedMTBold_14); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - tft.setTextPadding(tft.textWidth(" Waxing Crescent ")); - tft.drawString(wunderground.getMoonPhase(), 120, 260 - 2); - - int moonAgeImage = 24 * wunderground.getMoonAge().toInt() / 30.0; - ui.drawBmp("/moon" + String(moonAgeImage) + ".bmp", 120 - 30, 260); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - tft.setTextPadding(0); // Reset padding width to none - tft.drawString("Sun", 40, 280); - - tft.setTextDatum(BR_DATUM); - tft.setTextColor(TFT_WHITE, TFT_BLACK); - tft.setTextPadding(tft.textWidth(" 88:88 ")); - int dt = rightOffset(wunderground.getSunriseTime(), ":"); // Draw relative to colon to them aligned - tft.drawString(wunderground.getSunriseTime(), 40 + dt, 300); - - dt = rightOffset(wunderground.getSunsetTime(), ":"); - tft.drawString(wunderground.getSunsetTime(), 40 + dt, 315); - - tft.setTextDatum(BC_DATUM); - tft.setTextColor(TFT_ORANGE, TFT_BLACK); - tft.setTextPadding(0); // Reset padding width to none - tft.drawString("Moon", 200, 280); - - tft.setTextDatum(BR_DATUM); - tft.setTextColor(TFT_WHITE, TFT_BLACK); - tft.setTextPadding(tft.textWidth(" 88:88 ")); - dt = rightOffset(wunderground.getMoonriseTime(), ":"); // Draw relative to colon to them aligned - tft.drawString(wunderground.getMoonriseTime(), 200 + dt, 300); - - dt = rightOffset(wunderground.getMoonsetTime(), ":"); - tft.drawString(wunderground.getMoonsetTime(), 200 + dt, 315); - - tft.setTextPadding(0); // Reset padding width to none -} - -// Helper function, should be part of the weather station library and should disappear soon -String getMeteoconIcon(String iconText) { - if (iconText == "F") return "chanceflurries"; - if (iconText == "Q") return "chancerain"; - if (iconText == "W") return "chancesleet"; - if (iconText == "V") return "chancesnow"; - if (iconText == "S") return "chancetstorms"; - if (iconText == "B") return "clear"; - if (iconText == "Y") return "cloudy"; - if (iconText == "F") return "flurries"; - if (iconText == "M") return "fog"; - if (iconText == "E") return "hazy"; - if (iconText == "Y") return "mostlycloudy"; - if (iconText == "H") return "mostlysunny"; - if (iconText == "H") return "partlycloudy"; - if (iconText == "J") return "partlysunny"; - if (iconText == "W") return "sleet"; - if (iconText == "R") return "rain"; - if (iconText == "W") return "snow"; - if (iconText == "B") return "sunny"; - if (iconText == "0") return "tstorms"; - - - return "unknown"; -} - -// if you want separators, uncomment the tft-line -void drawSeparator(uint16_t y) { - tft.drawFastHLine(10, y, 240 - 2 * 10, 0x4228); -} - -// determine the "space" split point in a long string -int splitIndex(String text) -{ - int index = 0; - while ( (text.indexOf(' ', index) >= 0) && ( index <= text.length() / 2 ) ) { - index = text.indexOf(' ', index) + 1; - } - if (index) index--; - return index; -} - -// Calculate coord delta from start of text String to start of sub String contained within that text -// Can be used to vertically right align text so for example a colon ":" in the time value is always -// plotted at same point on the screen irrespective of different proportional character widths, -// could also be used to align decimal points for neat formatting -int rightOffset(String text, String sub) -{ - int index = text.indexOf(sub); - return tft.textWidth(text.substring(index)); -} - -// Calculate coord delta from start of text String to start of sub String contained within that text -// Can be used to vertically left align text so for example a colon ":" in the time value is always -// plotted at same point on the screen irrespective of different proportional character widths, -// could also be used to align decimal points for neat formatting -int leftOffset(String text, String sub) -{ - int index = text.indexOf(sub); - return tft.textWidth(text.substring(0, index)); -} - -// Draw a segment of a circle, centred on x,y with defined start_angle and subtended sub_angle -// Angles are defined in a clockwise direction with 0 at top -// Segment has radius r and it is plotted in defined colour -// Can be used for pie charts etc, in this sketch it is used for wind direction -#define DEG2RAD 0.0174532925 // Degrees to Radians conversion factor -#define INC 2 // Minimum segment subtended angle and plotting angle increment (in degrees) -void fillSegment(int x, int y, int start_angle, int sub_angle, int r, unsigned int colour) -{ - // Calculate first pair of coordinates for segment start - float sx = cos((start_angle - 90) * DEG2RAD); - float sy = sin((start_angle - 90) * DEG2RAD); - uint16_t x1 = sx * r + x; - uint16_t y1 = sy * r + y; - - // Draw colour blocks every INC degrees - for (int i = start_angle; i < start_angle + sub_angle; i += INC) { - - // Calculate pair of coordinates for segment end - int x2 = cos((i + 1 - 90) * DEG2RAD) * r + x; - int y2 = sin((i + 1 - 90) * DEG2RAD) * r + y; - - tft.fillTriangle(x1, y1, x2, y2, x, y, colour); - - // Copy segment end to sgement start for next segment - x1 = x2; - y1 = y2; - } -} diff --git a/examples/480 x 320/Flash_Bitmap/Alert.h b/examples/480 x 320/Flash_Bitmap/Alert.h deleted file mode 100644 index 54d013d..0000000 --- a/examples/480 x 320/Flash_Bitmap/Alert.h +++ /dev/null @@ -1,42 +0,0 @@ -// We need this header file to use FLASH as storage with PROGMEM directive: -#include - -// Icon width and height -const uint16_t alertWidth = 32; -const uint16_t alertHeight = 32; - -// The icon file can be created with the "UTFT ImageConverter 565" bitmap to .c file creation utility, more can be pasted in here -const unsigned short alert[1024] PROGMEM={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0840,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 0, 32 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1080,0xAC66,0xEDE8,0xFE69,0xC4C6,0x2901,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 1, 64 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xBCC6,0xFE68,0xFE68,0xFE6A,0xFE68,0xEDE8,0x18A1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 2, 96 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8344,0xFE48,0xFE8C,0xFFDD,0xFFFF,0xFEF0,0xFE48,0xB466,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 3, 128 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1880,0xEDC7,0xFE48,0xFF99,0xFFBC,0xFF9B,0xFFBD,0xFE6A,0xFE48,0x5A23,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 4, 160 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9BE5,0xFE28,0xFED0,0xFFBC,0xFF7A,0xFF9A,0xFF9B,0xFF35,0xFE28,0xBCA6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 5, 192 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3962,0xFE28,0xFE28,0xFF9A,0xFF79,0xFF9A,0xFF9B,0xFF9A,0xFFBD,0xFE6B,0xFE28,0x72E3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 6, 224 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xB465,0xFE28,0xFEF2,0xFF7A,0xFF79,0xFF7A,0xFF9A,0xFF7A,0xFF7A,0xFF78,0xFE28,0xDD67,0x0860,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 7, 256 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5A22,0xFE07,0xFE29,0xFF9B,0xFF37,0xFF58,0xFF79,0xFF79,0xFF79,0xFF58,0xFF9B,0xFEAE,0xFE07,0x93A4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 8, 288 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xC4A5,0xFE07,0xFF15,0xFF37,0xFF36,0xAD11,0x2965,0x2965,0xCDF4,0xFF37,0xFF37,0xFF79,0xFE07,0xFE07,0x2901,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 9, 320 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x7B03,0xFDE7,0xFE4B,0xFF79,0xFEF4,0xFF15,0xB552,0x2945,0x2945,0xDE55,0xFF16,0xFF15,0xFF58,0xFED1,0xFDE7,0xAC25,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 10, 352 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0840,0xDD26,0xFDE7,0xFF57,0xFED3,0xFED2,0xFEF4,0xBD93,0x2124,0x2124,0xDE75,0xFF14,0xFED3,0xFED3,0xFF7A,0xFE08,0xFDE7,0x49A2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 11, 384 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x9BA4,0xFDC6,0xFE6E,0xFF36,0xFE90,0xFEB1,0xFED3,0xC592,0x2124,0x2124,0xE675,0xFED3,0xFEB2,0xFEB1,0xFEF3,0xFEF3,0xFDC6,0xBC45,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 12, 416 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3141,0xF5C6,0xF5C7,0xFF58,0xFE90,0xFE6F,0xFE8F,0xFEB1,0xCDB2,0x2104,0x2104,0xF6B4,0xFEB1,0xFE90,0xFE8F,0xFE90,0xFF58,0xFE0A,0xF5C6,0x72A3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 13, 448 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xABE4,0xF5A6,0xFEB1,0xFED3,0xFE4E,0xFE6E,0xFE6F,0xFE90,0xD5F2,0x18E3,0x18E3,0xFED4,0xFE90,0xFE6F,0xFE6F,0xFE6E,0xFE91,0xFF36,0xF5A6,0xCCA5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 14, 480 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x5202,0xF5A6,0xF5C7,0xFF58,0xFE4D,0xFE4D,0xFE4D,0xFE4E,0xFE6F,0xDE11,0x18C3,0x18C3,0xFED3,0xFE6F,0xFE6E,0xFE4E,0xFE4D,0xFE4D,0xFF16,0xFE2C,0xF5A6,0x9363,0x0000,0x0000,0x0000,0x0000,0x0000, // row 15, 512 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0xBC44,0xF585,0xFED3,0xFE6F,0xFE2C,0xFE2C,0xFE2D,0xFE4D,0xFE4E,0xE630,0x10A2,0x2104,0xFED1,0xFE4E,0xFE4D,0xFE4D,0xFE2D,0xFE2C,0xFE4D,0xFF37,0xF586,0xF585,0x28E1,0x0000,0x0000,0x0000,0x0000, // row 16, 544 pixels -0x0000,0x0000,0x0000,0x0000,0x7282,0xF565,0xF5EA,0xFF16,0xFE0B,0xFE0B,0xFE0B,0xFE2C,0xFE2C,0xFE4D,0xF670,0x1082,0x2924,0xFEB0,0xFE2D,0xFE2C,0xFE2C,0xFE2C,0xFE0B,0xFE0B,0xFEB2,0xFE6F,0xF565,0xA383,0x0000,0x0000,0x0000,0x0000, // row 17, 576 pixels -0x0000,0x0000,0x0000,0x0840,0xD4C4,0xF565,0xFEF5,0xFE0C,0xFDE9,0xFDEA,0xFE0A,0xFE0B,0xFE0B,0xFE2C,0xFE8F,0x0861,0x2964,0xFE8F,0xFE2C,0xFE0B,0xFE0B,0xFE0B,0xFE0A,0xFDEA,0xFE0B,0xFF37,0xF586,0xF565,0x4181,0x0000,0x0000,0x0000, // row 18, 608 pixels -0x0000,0x0000,0x0000,0x9343,0xF545,0xF60C,0xFED3,0xFDC8,0xFDC8,0xFDC9,0xFDE9,0xFDEA,0xFDEA,0xFE0B,0xFE8E,0x0861,0x3184,0xFE6D,0xFE0B,0xFE0A,0xFDEA,0xFDEA,0xFDE9,0xFDC9,0xFDC9,0xFE4E,0xFEB2,0xF545,0xB3E3,0x0000,0x0000,0x0000, // row 19, 640 pixels -0x0000,0x0000,0x28E0,0xF544,0xF545,0xFF17,0xFDC8,0xFDA7,0xFDA7,0xFDC8,0xFDC8,0xFDC9,0xFDC9,0xFDE9,0xFE6C,0x10A2,0x39C4,0xFE4C,0xFDEA,0xFDE9,0xFDC9,0xFDC9,0xFDC8,0xFDC8,0xFDA7,0xFDA8,0xFF16,0xF588,0xF544,0x6222,0x0000,0x0000, // row 20, 672 pixels -0x0000,0x0000,0xA383,0xF524,0xF64E,0xFE4E,0xFD86,0xFD86,0xFD87,0xFDA7,0xFDA7,0xFDA8,0xFDC8,0xFDC8,0xFE2A,0xA469,0xB4EA,0xFE2A,0xFDC9,0xFDC8,0xFDC8,0xFDA8,0xFDA7,0xFDA7,0xFD87,0xFD86,0xFDEA,0xFED3,0xF524,0xC443,0x0000,0x0000, // row 21, 704 pixels -0x0000,0x51C1,0xF504,0xF546,0xFF16,0xF565,0xFD65,0xFD65,0xFD86,0xFD86,0xFD86,0xFDA7,0xFDA7,0xFDA7,0xFDE8,0xFE6A,0xFE4A,0xFDE8,0xFDA7,0xFDA7,0xFDA7,0xFDA7,0xFD86,0xFD86,0xFD86,0xFD65,0xFD65,0xFEB2,0xF5CA,0xF504,0x8AE2,0x0000, // row 22, 736 pixels -0x0000,0xB3A2,0xED03,0xFE92,0xFDC9,0xF543,0xF544,0xFD44,0xFD65,0xFD65,0xFD65,0xFD86,0xFD86,0xFD86,0xFDA7,0xFDC7,0xFDC7,0xFDA7,0xFD86,0xFD86,0xFD86,0xFD86,0xFD65,0xFD65,0xFD65,0xFD44,0xF544,0xFD86,0xFEF5,0xED03,0xE4C3,0x1880, // row 23, 768 pixels -0x7241,0xECE3,0xF567,0xFED3,0xF523,0xF523,0xF523,0xF543,0xF544,0xF544,0xFD65,0xFD65,0xFD65,0xFD65,0xD4E6,0x39C5,0x39A5,0xD4E6,0xFD86,0xFD65,0xFD65,0xFD65,0xFD65,0xF544,0xF544,0xF543,0xF523,0xF523,0xFE2E,0xF5EC,0xECE3,0x9B42, // row 24, 800 pixels -0xD443,0xECE3,0xFED4,0xF565,0xF502,0xF502,0xF522,0xF523,0xF523,0xF543,0xF544,0xF544,0xF544,0xFD65,0x8B64,0x18C3,0x18C3,0x8344,0xFD85,0xFD44,0xF544,0xF544,0xF544,0xF543,0xF523,0xF523,0xF522,0xF502,0xF523,0xFEF5,0xED04,0xECE3, // row 25, 832 pixels -0xECC3,0xF5AB,0xFE6F,0xF501,0xF4E1,0xF501,0xF502,0xF502,0xF522,0xF522,0xF523,0xF523,0xF523,0xFD84,0xC504,0x20E1,0x18E1,0xC4E4,0xFD84,0xF543,0xF523,0xF523,0xF523,0xF522,0xF522,0xF502,0xF502,0xF501,0xF501,0xFDC9,0xF62F,0xECC3, // row 26, 864 pixels -0xECC2,0xFE92,0xF523,0xF4E0,0xF4E0,0xF4E1,0xF4E1,0xF501,0xF501,0xF502,0xF502,0xF522,0xF522,0xF543,0xFDE3,0xFEA5,0xF6A4,0xFE04,0xF543,0xF522,0xF522,0xF522,0xF502,0xF502,0xF501,0xF501,0xF4E1,0xF4E1,0xF4E0,0xF4E1,0xFED4,0xECC2, // row 27, 896 pixels -0xECA2,0xF5EC,0xF4E0,0xF4C0,0xF4E0,0xF4E0,0xF4E0,0xF4E1,0xF4E1,0xF501,0xF501,0xF501,0xF502,0xF502,0xF542,0xFDA2,0xFDA2,0xF542,0xF502,0xF502,0xF502,0xF501,0xF501,0xF501,0xF4E1,0xF4E1,0xF4E0,0xF4E0,0xF4E0,0xF4C0,0xF5A9,0xECA2, // row 28, 928 pixels -0xECA2,0xECA2,0xECC2,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4E1,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xECC2,0xECC3,0xECA2, // row 29, 960 pixels -0x8AC1,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0x9B01, // row 30, 992 pixels -0x0000,0x1880,0x51A0,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x61E0,0x28E0,0x0000}; // row 31, 1024 pixels - diff --git a/examples/480 x 320/Flash_Bitmap/Close.h b/examples/480 x 320/Flash_Bitmap/Close.h deleted file mode 100644 index ce676c9..0000000 --- a/examples/480 x 320/Flash_Bitmap/Close.h +++ /dev/null @@ -1,41 +0,0 @@ -// We need this header file to use FLASH as storage with PROGMEM directive: -#include - -// Icon width and height -const uint16_t closeWidth = 32; -const uint16_t closeHeight = 32; - -// The icon file can be created with the "UTFT ImageConverter 565" bitmap to .c file creation utility, more can be pasted in here -const unsigned short closeX[1024] PROGMEM={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x30C3,0x4124,0x61C7,0x61C7,0x4124,0x30E3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 0, 32 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48E3,0xA249,0xEB8E,0xFCB2,0xFD14,0xFD75,0xFD96,0xFD34,0xFCF3,0xEBEF,0xA28A,0x4904,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 1, 64 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58E3,0xC228,0xFC10,0xFD34,0xFE18,0xFE59,0xFE79,0xFE9A,0xFE9A,0xFE9A,0xFE9A,0xFE59,0xFD75,0xFC51,0xC28A,0x5904,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 2, 96 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2041,0x8945,0xF34D,0xFD34,0xFDB6,0xFD75,0xFD55,0xFD55,0xFD96,0xFDD7,0xFDF7,0xFDF7,0xFDB6,0xFDB6,0xFDD7,0xFDF7,0xFD75,0xF38E,0x8965,0x2041,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 3, 128 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x4082,0xE208,0xF410,0xFD34,0xFC92,0xFBEF,0xFBAE,0xFBEF,0xFC71,0xFD14,0xFD75,0xFDB6,0xFD75,0xFD14,0xFC92,0xFC51,0xFC71,0xFCF3,0xFD75,0xFC30,0xEA28,0x40A2,0x0000,0x0000,0x0000,0x0000,0x0000, // row 4, 160 pixels -0x0000,0x0000,0x0000,0x0000,0x3861,0xE1E7,0xF451,0xFC92,0xFB4D,0xFA49,0xFA49,0xFAEB,0xFBAE,0xFC71,0xFD34,0xFDB6,0xFE18,0xFDB6,0xFD34,0xFC71,0xFBAE,0xFB0C,0xFAEB,0xFBAE,0xFCD3,0xFC71,0xE208,0x4082,0x0000,0x0000,0x0000,0x0000, // row 5, 192 pixels -0x0000,0x0000,0x0000,0x1020,0xD986,0xF430,0xFC30,0xFA28,0xF924,0xF965,0xFA8A,0xFB0C,0xFBAE,0xFC51,0xFD14,0xFD75,0xFDB6,0xFD75,0xFD14,0xFC51,0xFC71,0xFBEF,0xFA28,0xF9C7,0xFA8A,0xFC51,0xF430,0xD9A6,0x1020,0x0000,0x0000,0x0000, // row 6, 224 pixels -0x0000,0x0000,0x0000,0x78A2,0xEB6D,0xFC30,0xF9C7,0xF861,0xF8A2,0xFA08,0xFEDB,0xFD55,0xFB4D,0xFC10,0xFC92,0xFD14,0xFD34,0xFD14,0xFC92,0xFCB2,0xFF7D,0xFF7D,0xFB2C,0xF945,0xF8E3,0xF9E7,0xFC30,0xEB8E,0x78C3,0x0000,0x0000,0x0000, // row 7, 256 pixels -0x0000,0x0000,0x3841,0xD9E7,0xF492,0xF208,0xF041,0xF800,0xF945,0xFE9A,0xFFFF,0xFFFF,0xFD75,0xFB8E,0xFC10,0xFC51,0xFC71,0xFC51,0xFCB2,0xFF7D,0xFFFF,0xFFFF,0xFF3C,0xFA8A,0xF882,0xF841,0xFA08,0xFC92,0xDA08,0x3841,0x0000,0x0000, // row 8, 288 pixels -0x0000,0x0000,0x88A2,0xEBCF,0xF2EB,0xF061,0xF000,0xF8E3,0xFE79,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFD75,0xFB4D,0xFBAE,0xFBAE,0xFC71,0xFF7D,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFEFB,0xFA28,0xF800,0xF061,0xF2EB,0xEBEF,0x90C3,0x0000,0x0000, // row 9, 320 pixels -0x0000,0x2820,0xD1C7,0xF410,0xE945,0xE800,0xF000,0xFE9A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFD34,0xFAEB,0xFBCF,0xFF5D,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFF1C,0xF986,0xF000,0xF145,0xF410,0xD1E7,0x2820,0x0000, // row 10, 352 pixels -0x0000,0x6841,0xDB2C,0xEACB,0xE041,0xE800,0xF000,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFD14,0xFF1C,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFBCF,0xF082,0xF000,0xE841,0xEACB,0xE34D,0x7061,0x0000, // row 11, 384 pixels -0x0000,0x9861,0xE3CF,0xE186,0xE000,0xE800,0xE800,0xF145,0xFEDB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB8E,0xF000,0xF000,0xE800,0xE800,0xE986,0xEBCF,0xA082,0x0000, // row 12, 416 pixels -0x0800,0xB8A2,0xE3AE,0xD8A2,0xD800,0xE000,0xE800,0xE800,0xF145,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB8E,0xF000,0xF000,0xE800,0xE800,0xE000,0xE0A2,0xEBAE,0xC0C3,0x0800, // row 13, 448 pixels -0x1800,0xC124,0xE30C,0xD020,0xD800,0xE000,0xE000,0xE800,0xE800,0xF145,0xFEDB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB8E,0xF000,0xF000,0xE800,0xE800,0xE000,0xE000,0xD820,0xE30C,0xC124,0x1800, // row 14, 480 pixels -0x2800,0xC165,0xDAAA,0xC800,0xD000,0xD800,0xE000,0xE000,0xE800,0xE800,0xF124,0xFE79,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFB6D,0xF000,0xF000,0xE800,0xE800,0xE000,0xE000,0xD800,0xD000,0xDAAA,0xC165,0x2800, // row 15, 512 pixels -0x2000,0xB924,0xD269,0xC800,0xD000,0xD000,0xD800,0xE000,0xE000,0xE800,0xE924,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xF36D,0xE800,0xE800,0xE800,0xE000,0xE000,0xD800,0xD000,0xD000,0xDA69,0xC145,0x2800, // row 16, 544 pixels -0x1000,0xB0A2,0xD28A,0xC000,0xC800,0xD000,0xD000,0xD800,0xD800,0xE165,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xF3AE,0xE000,0xE000,0xD800,0xD800,0xD000,0xD000,0xC800,0xD28A,0xB8C3,0x1000, // row 17, 576 pixels -0x0000,0xA800,0xD2AA,0xB800,0xC000,0xC800,0xC800,0xD000,0xD965,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xEBAE,0xD800,0xD800,0xD000,0xC800,0xC800,0xC000,0xD2AA,0xB020,0x0000, // row 18, 608 pixels -0x0000,0x8000,0xCA69,0xB841,0xB800,0xC000,0xC800,0xD186,0xFEFB,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xEBCF,0xD000,0xC800,0xC800,0xC000,0xC041,0xCA69,0x8000,0x0000, // row 19, 640 pixels -0x0000,0x4800,0xC1C7,0xB8E3,0xB800,0xB800,0xC000,0xF69A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xEBEF,0xFE79,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE410,0xC841,0xC000,0xB800,0xC0E3,0xC1C7,0x4800,0x0000, // row 20, 672 pixels -0x0000,0x1000,0xB061,0xC1E7,0xB000,0xB000,0xB800,0xD269,0xFFBE,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xE38E,0xD000,0xD965,0xF69A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xDB0C,0xC020,0xB800,0xB000,0xC1E7,0xB061,0x1000,0x0000, // row 21, 704 pixels -0x0000,0x0000,0x6000,0xB9C7,0xB061,0xB000,0xB000,0xB800,0xCA49,0xFF9E,0xFFFF,0xFFFF,0xFFFF,0xE38E,0xC800,0xC800,0xC800,0xD186,0xF69A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xDB0C,0xB800,0xB800,0xB000,0xB061,0xC1C7,0x6000,0x0000,0x0000, // row 22, 736 pixels -0x0000,0x0000,0x1800,0xB041,0xB986,0xA800,0xA800,0xB000,0xB000,0xCA49,0xFF7D,0xFFFF,0xDB8E,0xC000,0xC000,0xC000,0xC000,0xC000,0xC986,0xF6DB,0xFFFF,0xFFFF,0xD30C,0xB800,0xB000,0xB000,0xA800,0xB986,0xB041,0x1800,0x0000,0x0000, // row 23, 768 pixels -0x0000,0x0000,0x0000,0x5800,0xB0E3,0xA8C3,0xA800,0xA800,0xA800,0xB000,0xCACB,0xD38E,0xB000,0xB800,0xB800,0xB800,0xB800,0xB800,0xB800,0xC145,0xF6DB,0xD34D,0xB000,0xB000,0xA800,0xA800,0xB0C3,0xB0E3,0x5800,0x0000,0x0000,0x0000, // row 24, 800 pixels -0x0000,0x0000,0x0000,0x0000,0x6000,0xB124,0xA882,0xA000,0xA800,0xA800,0xA800,0xA800,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xB000,0xA800,0xA800,0xA800,0xA800,0xA882,0xB124,0x6000,0x0000,0x0000,0x0000,0x0000, // row 25, 832 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x6000,0xB104,0xA882,0xA000,0xA000,0xA000,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA800,0xA000,0xA000,0xA882,0xB104,0x6000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 26, 864 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6000,0xB0A2,0xA8C3,0xA020,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA000,0xA020,0xA8C3,0xB0A2,0x6000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 27, 896 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4800,0xA800,0xB0C3,0xA0A2,0x9800,0x9800,0x9800,0x9800,0xA000,0xA000,0xA000,0x9800,0x9800,0x9800,0xA082,0xB0E3,0xA800,0x4800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 28, 928 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5800,0xA800,0xB0A2,0xA8E3,0xA0A2,0xA041,0x9800,0x9800,0xA041,0xA0A2,0xA8E3,0xB0A2,0xA800,0x5800,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 29, 960 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x3000,0x6000,0x8800,0xA000,0xA800,0xA800,0xA000,0x8800,0x6000,0x3000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 30, 992 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; // row 31, 1024 pixels diff --git a/examples/480 x 320/Flash_Bitmap/Flash_Bitmap.ino b/examples/480 x 320/Flash_Bitmap/Flash_Bitmap.ino deleted file mode 100644 index d3ca697..0000000 --- a/examples/480 x 320/Flash_Bitmap/Flash_Bitmap.ino +++ /dev/null @@ -1,113 +0,0 @@ -// Code partly derived from ILI9341_due library example - -// Draws the 3 icons across the middle of the screen and pauses. -// Then draws 300 icons at random locations, clears screen and repeats -// -// This demonstrates drawing icons from FLASH - -// Icons are stored in tabs, e.g. Alert.h etc -// more than one icon can be in a header file. - -/* - This sketch demonstrates loading images from arrays stored in program (FLASH) memory. - - Works with TFT_eSPI library here: - https://github.com/Bodmer/TFT_eSPI - - This sketch does not use/need any fonts at all... - - Arrays containing FLASH images can be created with UTFT library tool: - (libraries\UTFT\Tools\ImageConverter565.exe) - Convert to .c format then copy into a new tab - - The number and size of icons is limited by available FLASH memory. The icon array will - use width x height x 2 bytes of FLASH, i.e. 32 x 32 icon uses ~2048 bytes - -*/ - -#include // Hardware-specific library -#include - -TFT_eSPI tft = TFT_eSPI(); // Invoke custom library with default width and height - -// Include the header files that contain the icons -#include "Alert.h" -#include "Close.h" -#include "Info.h" - -long count = 0; // Loop count - -void setup() -{ - Serial.begin(115200); - tft.begin(); - tft.setRotation(1); // landscape - - tft.fillScreen(TFT_BLACK); - - // Draw the icons - drawIcon(info, (tft.width() - infoWidth)/2 - 50, (tft.height() - infoHeight)/2, infoWidth, infoHeight); - drawIcon(alert, (tft.width() - alertWidth)/2, (tft.height() - alertHeight)/2, alertWidth, alertHeight); - drawIcon(closeX, (tft.width() - closeWidth)/2 + 50, (tft.height() - closeHeight)/2, closeWidth, closeHeight); - - // Pause here to admire the icons! - delay(4000); - -} - -void loop() -{ - // Loop filling and clearing screen - drawIcon(info, random(tft.width() - infoWidth), random(tft.height() - infoHeight), infoWidth, infoHeight); - drawIcon(alert, random(tft.width() - alertWidth), random(tft.height() - alertHeight), alertWidth, alertHeight); - drawIcon(closeX, random(tft.width() - closeWidth), random(tft.height() - closeHeight), alertWidth, closeHeight); - - // Clear screen after 100 x 3 = 300 icons drawn - if (100 == count++) { - count = 1; - tft.setRotation(2 * random(2)); // Rotate randomly to clear display left>right or right>left to reduce monotony! - tft.fillScreen(TFT_BLACK); - tft.setRotation(1); - Serial.println(millis()); - } -} - - -//==================================================================================== -// This is the function to draw the icon stored as an array in program memory (FLASH) -//==================================================================================== - -// To speed up rendering we use a 64 pixel buffer -#define BUFF_SIZE 64 - -// Draw array "icon" of defined width and height at coordinate x,y -// Maximum icon size is 255x255 pixels to avoid integer overflow - -void drawIcon(const unsigned short* icon, int16_t x, int16_t y, uint16_t width, uint16_t height) { - - uint16_t pix_buffer[BUFF_SIZE]; // Pixel buffer (16 bits per pixel) - - // Set up a window the right size to stream pixels into - tft.setWindow(x, y, x + width - 1, y + height - 1); - - // Work out the number whole buffers to send - uint16_t nb = ((uint16_t)height * width) / BUFF_SIZE; - - // Fill and send "nb" buffers to TFT - for (int i = 0; i < nb; i++) { - for (int j = 0; j < BUFF_SIZE; j++) { - pix_buffer[j] = pgm_read_word(&icon[i * BUFF_SIZE + j]); - } - tft.pushColors(pix_buffer, BUFF_SIZE); - } - - // Work out number of pixels not yet sent - uint16_t np = ((uint16_t)height * width) % BUFF_SIZE; - - // Send any partial buffer left over - if (np) { - for (int i = 0; i < np; i++) pix_buffer[i] = pgm_read_word(&icon[nb * BUFF_SIZE + i]); - tft.pushColors(pix_buffer, np); - } -} - diff --git a/examples/480 x 320/Flash_Bitmap/Info.h b/examples/480 x 320/Flash_Bitmap/Info.h deleted file mode 100644 index c4ee633..0000000 --- a/examples/480 x 320/Flash_Bitmap/Info.h +++ /dev/null @@ -1,41 +0,0 @@ -// We need this header file to use FLASH as storage with PROGMEM directive: -#include - -// Icon width and height -const uint16_t infoWidth = 32; -const uint16_t infoHeight = 32; - -// The icon file can be created with the "UTFT ImageConverter 565" bitmap to .c file creation utility, more can be pasted in here -const unsigned short info[1024] PROGMEM={ -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 0, 32 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0861,0x4A69,0x8C71,0xA514,0xBDF7,0xBDF7,0xA514,0x8C71,0x4A69,0x0861,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 1, 64 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x39E7,0x9CF3,0xEF7D,0xF79E,0xFFDF,0xFFDF,0xFFDF,0xFFDF,0xFFDF,0xFFDF,0xF79E,0xEF7D,0x9CF3,0x39E7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 2, 96 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2965,0x9492,0xF79E,0xFFDF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFDF,0xF79E,0x9492,0x2965,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 3, 128 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x630C,0xEF7D,0xFFDF,0xFFFF,0xFFFF,0xFFFF,0xD75F,0xB6BF,0x9E5F,0x963F,0x963F,0x9E5F,0xB6BF,0xD75F,0xFFFF,0xFFFF,0xFFFF,0xFFDF,0xEF7D,0x630C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 4, 160 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x73AE,0xEF7D,0xFFDF,0xFFFF,0xFFDF,0xBEDF,0x7DBF,0x7DBF,0x7DDF,0x7DDF,0x7DDF,0x7DDF,0x7DDF,0x7DBF,0x759F,0x7DBE,0xBEBF,0xFFDF,0xFFFF,0xFFDF,0xEF7D,0x73AE,0x0000,0x0000,0x0000,0x0000,0x0000, // row 5, 192 pixels -0x0000,0x0000,0x0000,0x0000,0x630C,0xEF7D,0xFFFF,0xFFFF,0xE77F,0x7DBE,0x759E,0x759F,0x7DBF,0x7DDF,0x7DDF,0x85FF,0x7DDF,0x7DDF,0x7DBF,0x759F,0x759E,0x6D7E,0x7DBE,0xDF7F,0xFFFF,0xFFFF,0xEF7D,0x630C,0x0000,0x0000,0x0000,0x0000, // row 6, 224 pixels -0x0000,0x0000,0x0000,0x31A6,0xEF5D,0xFFDF,0xFFFF,0xCF1E,0x6D7E,0x6D7E,0x759E,0x759F,0x7DBF,0x7DDF,0x8E1F,0xBEDF,0xC6FF,0x8DFF,0x75BF,0x759F,0x759E,0x6D7E,0x655E,0x655D,0xCF1E,0xFFFF,0xFFDF,0xEF5D,0x31A6,0x0000,0x0000,0x0000, // row 7, 256 pixels -0x0000,0x0000,0x0000,0x94B2,0xF7BE,0xFFFF,0xDF5E,0x655D,0x655D,0x6D7E,0x6D7E,0x759E,0x75BF,0x759F,0xEFBF,0xFFFF,0xFFFF,0xEFBF,0x759F,0x759E,0x6D7E,0x6D7E,0x655D,0x653D,0x653D,0xDF5E,0xFFFF,0xF7BE,0x94B2,0x0000,0x0000,0x0000, // row 8, 288 pixels -0x0000,0x0000,0x4228,0xEF7D,0xFFFF,0xF7BF,0x6D5D,0x653D,0x655D,0x6D5E,0x6D7E,0x759E,0x759E,0x85DF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8DFE,0x6D7E,0x6D7E,0x6D5E,0x655D,0x653D,0x5D1D,0x6D5D,0xF7BF,0xFFFF,0xEF7D,0x4228,0x0000,0x0000, // row 9, 320 pixels -0x0000,0x0000,0xA534,0xFFDF,0xFFDF,0xA65D,0x5D1D,0x5D1D,0x653D,0x655E,0x6D7E,0x6D7E,0x6D7E,0x651E,0xE77F,0xFFFF,0xFFFF,0xF7BF,0x5CFE,0x6D7E,0x6D7E,0x655E,0x653D,0x5D1D,0x5D1D,0x54FC,0xA65D,0xFFDF,0xFFDF,0xA534,0x0000,0x0000, // row 10, 352 pixels -0x0000,0x18E3,0xEF5D,0xFFFF,0xEF9E,0x5CFC,0x54FC,0x5D1D,0x5D3D,0x653D,0x655E,0x6D7E,0x6D7E,0x653E,0x6D3E,0xB67E,0xBEBE,0x755E,0x5D1E,0x6D5E,0x655E,0x653D,0x5D3D,0x5D1D,0x54FC,0x54DC,0x54FC,0xEF9E,0xFFFF,0xEF5D,0x18E3,0x0000, // row 11, 384 pixels -0x0000,0x630C,0xEF7D,0xFFDF,0xB69D,0x54DC,0x54FC,0x5CFC,0x5D1D,0x653D,0x653D,0x655E,0x6D5E,0x655E,0x5CFE,0x4C9D,0x4C7D,0x54DD,0x653E,0x655E,0x653D,0x653D,0x5D1D,0x5CFC,0x54FC,0x54DC,0x4CBC,0xB69D,0xFFDF,0xEF7D,0x630C,0x0000, // row 12, 416 pixels -0x0000,0x94B2,0xF7BE,0xFFDF,0x85BC,0x4CBC,0x54DC,0x54FC,0x5CFD,0x5D1D,0x5D3D,0x653D,0x655D,0x653D,0x85DE,0xC6FE,0xC6FE,0x85BE,0x653D,0x653D,0x5D3D,0x5D1D,0x5CFD,0x54FC,0x54DC,0x4CBC,0x4CBB,0x85BC,0xFFDF,0xF7BE,0x94B2,0x0000, // row 13, 448 pixels -0x0000,0xB5B6,0xFFDF,0xF7BE,0x651C,0x4CBB,0x4CBC,0x54DC,0x54FC,0x5CFC,0x5D1D,0x5D1D,0x653D,0x5D1D,0xE77E,0xFFDF,0xFFDF,0xEF9E,0x5CFD,0x5D1D,0x5D1D,0x5CFC,0x54FC,0x54DC,0x4CBC,0x4CBB,0x449B,0x651B,0xF7BE,0xFFDF,0xB5B6,0x0000, // row 14, 480 pixels -0x0000,0xC638,0xFFDF,0xF7BE,0x54DB,0x449B,0x4CBB,0x4CBC,0x54DC,0x54FC,0x54FC,0x5D1D,0x5D1D,0x7D7D,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0x7D7D,0x5CFD,0x54FC,0x54FC,0x54DC,0x4CBC,0x4CBB,0x449B,0x447B,0x54BB,0xF7BE,0xFFDF,0xC638,0x0000, // row 15, 512 pixels -0x0000,0xC638,0xFFDF,0xF79E,0x4CBB,0x449B,0x449B,0x4CBB,0x4CBC,0x54DC,0x54DC,0x54FC,0x54DC,0x753C,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0x753C,0x54DC,0x54DC,0x54DC,0x4CBC,0x4CBB,0x449B,0x449B,0x3C7B,0x4C9B,0xF79E,0xFFDF,0xC638,0x0000, // row 16, 544 pixels -0x0000,0xB5B6,0xFFDF,0xF7BE,0x5CFB,0x3C7B,0x447B,0x449B,0x4CBB,0x4CBC,0x4CBC,0x4CDC,0x4CBC,0x6D1C,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0x6CFC,0x4CBC,0x4CBC,0x4CBC,0x4CBB,0x449B,0x447B,0x3C7B,0x3C5A,0x54DB,0xF7BE,0xFFDF,0xB5B6,0x0000, // row 17, 576 pixels -0x0000,0x94B2,0xF7BE,0xF7BE,0x755B,0x3C5A,0x3C7B,0x447B,0x449B,0x449B,0x4CBB,0x4CBB,0x4C9B,0x6CFB,0xF79E,0xF79E,0xF79E,0xF79E,0x64FB,0x449B,0x4CBB,0x449B,0x449B,0x447B,0x3C7B,0x3C5A,0x3C5A,0x753B,0xF7BE,0xF7BE,0x9CD3,0x0000, // row 18, 608 pixels -0x0000,0x6B4D,0xEF7D,0xF7BE,0xA61C,0x3C5A,0x3C5A,0x3C7B,0x447B,0x447B,0x449B,0x449B,0x447B,0x64DB,0xF79E,0xF79E,0xF79E,0xF79E,0x64DB,0x447B,0x449B,0x447B,0x447B,0x3C7B,0x3C5A,0x3C5A,0x343A,0xA61C,0xF7BE,0xEF7D,0x6B4D,0x0000, // row 19, 640 pixels -0x0000,0x2124,0xE71C,0xFFDF,0xDF3D,0x3C5A,0x343A,0x3C5A,0x3C5A,0x3C7B,0x3C7B,0x447B,0x3C5B,0x64BA,0xF79E,0xF79E,0xF79E,0xF79E,0x64BA,0x3C5B,0x3C7B,0x3C7B,0x3C5A,0x3C5A,0x343A,0x343A,0x343A,0xDF3D,0xFFDF,0xE71C,0x2124,0x0000, // row 20, 672 pixels -0x0000,0x0000,0xAD75,0xF7BE,0xF79E,0x859B,0x343A,0x343A,0x345A,0x3C5A,0x3C5A,0x3C5A,0x3C5A,0x5C9A,0xEF7D,0xEF7D,0xEF7D,0xEF7D,0x5C9A,0x3C3A,0x3C5A,0x3C5A,0x345A,0x343A,0x343A,0x341A,0x859B,0xF79E,0xF7BE,0xAD75,0x0000,0x0000, // row 21, 704 pixels -0x0000,0x0000,0x528A,0xE71C,0xFFDF,0xDF3D,0x3C5A,0x343A,0x343A,0x343A,0x343A,0x3C5A,0x343A,0x4C5A,0xEF7D,0xEF7D,0xEF7D,0xEF7D,0x4C59,0x343A,0x343A,0x343A,0x343A,0x343A,0x341A,0x3C5A,0xDF3D,0xFFDF,0xE71C,0x528A,0x0000,0x0000, // row 22, 736 pixels -0x0000,0x0000,0x0000,0x9CD3,0xF79E,0xF7BE,0xBE7C,0x3419,0x341A,0x341A,0x343A,0x343A,0x341A,0x2B99,0xC69C,0xEF7D,0xEF7D,0xD6DC,0x2398,0x341A,0x343A,0x341A,0x341A,0x2C19,0x2C19,0xBE7C,0xF7BE,0xF79E,0x9CD3,0x0000,0x0000,0x0000, // row 23, 768 pixels -0x0000,0x0000,0x0000,0x39E7,0xDEDB,0xFFDF,0xF79E,0x9DFB,0x2C19,0x2C19,0x2C1A,0x341A,0x341A,0x2BB9,0x2B57,0x6459,0x74B9,0x2337,0x2BB9,0x341A,0x2C1A,0x2C19,0x2C19,0x2C19,0x9DFB,0xF79E,0xFFDF,0xDEDB,0x39E7,0x0000,0x0000,0x0000, // row 24, 800 pixels -0x0000,0x0000,0x0000,0x0000,0x632C,0xDEFB,0xFFDF,0xEF7D,0xB65C,0x3C39,0x2BF9,0x2C19,0x2C19,0x2BF9,0x2398,0x1B58,0x1B37,0x2398,0x2BF9,0x2C19,0x2BF9,0x2BF9,0x3439,0xB65C,0xEF7D,0xFFDF,0xDEFB,0x632C,0x0000,0x0000,0x0000,0x0000, // row 25, 832 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x73AE,0xDEFB,0xF7BE,0xF79E,0xDF1C,0x7D5A,0x2BF9,0x2BF9,0x2BF9,0x2BF9,0x23D9,0x23D9,0x2BF9,0x2BF9,0x2BF9,0x2BF9,0x7D5A,0xDF1C,0xF79E,0xF7BE,0xDEFB,0x73AE,0x0000,0x0000,0x0000,0x0000,0x0000, // row 26, 864 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x632C,0xDEDB,0xF79E,0xFFDF,0xEF7D,0xD6FC,0x9DFB,0x5CDA,0x4C9A,0x3419,0x3419,0x4C9A,0x5CDA,0x9DFB,0xD6FC,0xEF7D,0xFFDF,0xF79E,0xDEDB,0x632C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 27, 896 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4208,0x94B2,0xDEFB,0xF7BE,0xFFDF,0xF7BE,0xF79E,0xEF7D,0xEF5D,0xEF5D,0xEF7D,0xF79E,0xF7BE,0xFFDF,0xF7BE,0xDEFB,0x94B2,0x4208,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 28, 928 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x528A,0xA534,0xDEDB,0xE73C,0xF79E,0xF7BE,0xF7BE,0xF7BE,0xF7BE,0xF79E,0xE73C,0xDEDB,0xA534,0x528A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 29, 960 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x18C3,0x5AEB,0x8C71,0xAD55,0xBDD7,0xBDD7,0xAD55,0x8C71,0x5AEB,0x18C3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // row 30, 992 pixels -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; // row 31, 1024 pixels diff --git a/examples/480 x 320/TFT_flash_jpg/TFT_flash_jpg.ino b/examples/480 x 320/TFT_flash_jpg/TFT_flash_jpg.ino index 5af0f13..f8ebcb1 100644 --- a/examples/480 x 320/TFT_flash_jpg/TFT_flash_jpg.ino +++ b/examples/480 x 320/TFT_flash_jpg/TFT_flash_jpg.ino @@ -171,11 +171,14 @@ void renderJPEG(int xpos, int ypos) { // calculate how many pixels must be drawn uint32_t mcu_pixels = win_w * win_h; + tft.startWrite(); + // draw image MCU block only if it will fit on the screen if (( mcu_x + win_w ) <= tft.width() && ( mcu_y + win_h ) <= tft.height()) { + // Now set a MCU bounding window on the TFT to push pixels into (x, y, x + width - 1, y + height - 1) - tft.setWindow(mcu_x, mcu_y, mcu_x + win_w - 1, mcu_y + win_h - 1); + tft.setAddrWindow(mcu_x, mcu_y, win_w, win_h); // Write all MCU pixels to the TFT window while (mcu_pixels--) { @@ -185,6 +188,8 @@ void renderJPEG(int xpos, int ypos) { } else if ( (mcu_y + win_h) >= tft.height()) JpegDec.abort(); // Image has run off bottom of screen so abort decoding + + tft.endWrite(); } // calculate how long it took to draw the image diff --git a/examples/480 x 320/TFT_ring_meter/TFT_ring_meter.ino b/examples/480 x 320/TFT_ring_meter/TFT_ring_meter.ino index ebed42b..d4d8c2f 100644 --- a/examples/480 x 320/TFT_ring_meter/TFT_ring_meter.ino +++ b/examples/480 x 320/TFT_ring_meter/TFT_ring_meter.ino @@ -251,8 +251,10 @@ void drawIcon(const unsigned short* icon, int16_t x, int16_t y, int8_t width, in uint16_t pix_buffer[BUFF_SIZE]; // Pixel buffer (16 bits per pixel) + tft.startWrite(); + // Set up a window the right size to stream pixels into - tft.setWindow(x, y, x + width - 1, y + height - 1); + tft.setAddrWindow(x, y, width, height); // Work out the number whole buffers to send uint16_t nb = ((uint16_t)height * width) / BUFF_SIZE; @@ -273,5 +275,7 @@ void drawIcon(const unsigned short* icon, int16_t x, int16_t y, int8_t width, in for (int i = 0; i < np; i++) pix_buffer[i] = pgm_read_word(&icon[nb * BUFF_SIZE + i]); tft.pushColors(pix_buffer, np); } + + tft.endWrite(); } diff --git a/examples/Generic/ESP32_SDcard_jpeg/Data/Baboon40.jpg b/examples/Generic/ESP32_SDcard_jpeg/Data/Baboon40.jpg new file mode 100644 index 0000000..a53afef Binary files /dev/null and b/examples/Generic/ESP32_SDcard_jpeg/Data/Baboon40.jpg differ diff --git a/examples/Generic/ESP32_SDcard_jpeg/Data/EagleEye.jpg b/examples/Generic/ESP32_SDcard_jpeg/Data/EagleEye.jpg new file mode 100644 index 0000000..240b7ef Binary files /dev/null and b/examples/Generic/ESP32_SDcard_jpeg/Data/EagleEye.jpg differ diff --git a/examples/Generic/ESP32_SDcard_jpeg/Data/Mouse480.jpg b/examples/Generic/ESP32_SDcard_jpeg/Data/Mouse480.jpg new file mode 100644 index 0000000..9cab6a7 Binary files /dev/null and b/examples/Generic/ESP32_SDcard_jpeg/Data/Mouse480.jpg differ diff --git a/examples/Generic/ESP32_SDcard_jpeg/Data/lena20k.jpg b/examples/Generic/ESP32_SDcard_jpeg/Data/lena20k.jpg new file mode 100644 index 0000000..183b98f Binary files /dev/null and b/examples/Generic/ESP32_SDcard_jpeg/Data/lena20k.jpg differ diff --git a/examples/Generic/Local_Custom_Fonts/Local_Custom_Fonts.ino b/examples/Generic/Local_Custom_Fonts/Local_Custom_Fonts.ino new file mode 100644 index 0000000..67deb9a --- /dev/null +++ b/examples/Generic/Local_Custom_Fonts/Local_Custom_Fonts.ino @@ -0,0 +1,121 @@ +/* + Example for TFT_eSPI library + + This example shows the use of a Adafruit_GFX custom font with a + character code range of 32 - 255, this means accented characters + (amongst others) are available. + + The custom font file is attached to this sketch as a header file. The + font data has been created following the instructions here: + https://www.youtube.com/watch?v=L8MmTISmwZ8 + + Note that online converters for Adafruit_GFX compatible fonts are + available but these typically only use characters in the range 32-127, + and thus do not include the accented characters. These online converters + can however still be used with this sketch but the example characters + used must be changed. + + The Arduino IDE uses UTF8 encoding for these characters. The TFT_eSPI + library also expects characters in the range 128 to 255 to be UTF-8 + encoded. See link here for details: + + https://playground.arduino.cc/Code/UTF-8 + + To sumarise, UTF-8 characters are encoded as mor than 1 byte so care must + be taken: + + char c = 'µ'; // Wrong + char bad[4] = "5µA"; // Wrong + char good[] = "5µA"; // Good + String okay = "5µA"; // Good + + Created by Bodmer 08/02/19 + + Make sure LOAD_GFXFF is defined in the used User_Setup file + within the library folder. + + ######################################################################### + ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ###### + ###### TO SELECT YOUR DISPLAY TYPE, PINS USED AND ENABLE FONTS ###### + ######################################################################### +*/ + +#define TEST_TEXT "ßäöü ñâàå" // Text that will be printed on screen in the font +//#define TEST_TEXT "Hello" // Text that will be printed on screen in the font + +#include "SPI.h" +#include "TFT_eSPI.h" + +// The custom font file attached to this sketch must be included +#include "MyFont.h" + +// Stock font and GFXFF reference handle +#define GFXFF 1 + +// Easily remembered name for the font +#define MYFONT32 &myFont32pt8b + +// Use hardware SPI +TFT_eSPI tft = TFT_eSPI(); + +void setup(void) { + + Serial.begin(250000); + + tft.begin(); + + tft.setRotation(1); + +} + +void loop() { + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Show custom fonts + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + // Where font sizes increase the screen is not cleared as the larger fonts overwrite + // the smaller one with the background colour. + + // We can set the text datum to be Top, Middle, Bottom vertically and Left, Centre + // and Right horizontally. These are the text datums that can be used: + // TL_DATUM = Top left (default) + // TC_DATUM = Top centre + // TR_DATUM = Top right + // ML_DATUM = Middle left + // MC_DATUM = Middle centre <<< This is used below + // MR_DATUM = Middle right + // BL_DATUM = Bottom left + // BC_DATUM = Bottom centre + // BR_DATUM = Bottom right + // L_BASELINE = Left character baseline (Line the 'A' character would sit on) + // C_BASELINE = Centre character baseline + // R_BASELINE = Right character baseline + + //Serial.println(); + + // Set text datum to middle centre (MC_DATUM) + tft.setTextDatum(MC_DATUM); + + // Set text colour to white with black background + // Unlike the stock Adafruit_GFX library, the TFT_eSPI library DOES optionally draw + // the background colour for the custom and Free Fonts when using drawString() + tft.setTextColor(TFT_WHITE, TFT_BLACK); // White characters on black background + //tft.setTextColor(TFT_WHITE); // or white characters, no background + + tft.fillScreen(TFT_BLUE); // Clear screen + tft.setFreeFont(MYFONT32); // Select the font + tft.drawString("MyFont 32", 160, 60, GFXFF); // Print the name of the font + tft.setFreeFont(MYFONT32); // Select the font + tft.drawString(TEST_TEXT, 160, 140, GFXFF); // Print the test text in the custom font + delay(2000); + + // Setting textDatum does nothing when using tft.print + tft.fillScreen(TFT_BLUE); // Clear screen + tft.setCursor(0,60); // To be compatible with Adafruit_GFX the cursor datum is always bottom left + tft.print("âäàå"); // Using tft.print means text background is NEVER rendered + delay(2000); + + // Reset text padding to zero (default) + tft.setTextPadding(0); +} diff --git a/examples/Generic/Local_Custom_Fonts/MyFont.h b/examples/Generic/Local_Custom_Fonts/MyFont.h new file mode 100644 index 0000000..da5ee55 --- /dev/null +++ b/examples/Generic/Local_Custom_Fonts/MyFont.h @@ -0,0 +1,3366 @@ +// If you follow the tutorial here: +// https://www.youtube.com/watch?v=L8MmTISmwZ8 +// do not forget the names must be edited to remove the Windows file path. + +// I had to edit lines 8, 3135, 3361-3363 in this file + + +const uint8_t myFont32pt8bBitmaps[] PROGMEM = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xBF, 0xCF, 0xE7, 0xF3, + 0xF9, 0xFC, 0xFE, 0x7F, 0x3F, 0x9F, 0x8F, 0xC7, 0xE1, 0xF0, 0xF8, 0x7C, + 0x3E, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF8, 0xFF, 0xC3, 0xFF, 0xFF, 0xC3, 0xFF, 0xFF, 0xC3, 0xFF, + 0xFF, 0xC3, 0xFF, 0xFF, 0xC3, 0xFF, 0xFF, 0xC3, 0xFF, 0xFF, 0xC3, 0xFF, + 0xFF, 0xC3, 0xFF, 0x7F, 0xC3, 0xFF, 0x7F, 0xC1, 0xFE, 0x7F, 0x81, 0xFE, + 0x7F, 0x81, 0xFE, 0x7F, 0x81, 0xFE, 0x3F, 0x81, 0xFE, 0x3F, 0x80, 0xFE, + 0x3F, 0x80, 0xFC, 0x00, 0x1F, 0xC0, 0xFE, 0x00, 0x1F, 0xC0, 0x7F, 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x3F, 0xFF, 0xF0, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x1F, 0xF0, + 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x01, 0xF0, 0x00, + 0x00, 0x07, 0xC0, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, + 0x03, 0xF8, 0x00, 0x00, 0x3F, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x1F, 0x80, + 0x01, 0xFF, 0xF8, 0x00, 0x07, 0xE0, 0x00, 0xFF, 0xFE, 0x00, 0x03, 0xF0, + 0x00, 0x7F, 0xFF, 0xC0, 0x00, 0xFC, 0x00, 0x1F, 0xC7, 0xF8, 0x00, 0x7E, + 0x00, 0x0F, 0xE0, 0xFE, 0x00, 0x1F, 0x80, 0x03, 0xF8, 0x3F, 0x80, 0x0F, + 0xC0, 0x00, 0xFE, 0x07, 0xE0, 0x03, 0xF0, 0x00, 0x3F, 0x81, 0xFC, 0x01, + 0xF8, 0x00, 0x0F, 0xE0, 0x7F, 0x00, 0x7E, 0x00, 0x03, 0xF0, 0x1F, 0xC0, + 0x3F, 0x00, 0x00, 0xFC, 0x07, 0xF0, 0x0F, 0xC0, 0x00, 0x3F, 0x01, 0xFC, + 0x07, 0xE0, 0x00, 0x0F, 0xE0, 0x7F, 0x01, 0xF8, 0x00, 0x03, 0xF8, 0x1F, + 0x80, 0xFC, 0x00, 0x00, 0xFE, 0x0F, 0xE0, 0x3F, 0x00, 0x00, 0x3F, 0x83, + 0xF8, 0x1F, 0x80, 0x00, 0x07, 0xF1, 0xFE, 0x07, 0xE0, 0x00, 0x01, 0xFF, + 0xFF, 0x03, 0xF0, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0xFC, 0x00, 0x00, 0x07, + 0xFF, 0xE0, 0x7E, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x1F, 0x80, 0x00, 0x00, + 0x0F, 0xE0, 0x0F, 0xC0, 0x00, 0x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 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x07, 0xF8, + 0x00, 0x00, 0x7F, 0x80, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x3F, 0xC0, 0x00, + 0x03, 0xFC, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x1F, + 0xE0, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7F, 0x80, + 0x00, 0x07, 0xFC, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x01, 0xFE, 0x00, 0x00, + 0x1F, 0xE0, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x7F, + 0x80, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x01, 0xFF, 0x00, + 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x03, 0xFC, 0x00, 0x00, + 0x3F, 0xE0, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7F, + 0x80, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0xFF, 0x00, + 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x0F, 0xFF, 0xC0, + 0x01, 0xFF, 0xFF, 0x80, 0x1F, 0xFF, 0xFE, 0x01, 0xFF, 0xFF, 0xF8, 0x1F, + 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0x8F, 0xFE, 0x0F, 0xFC, 0x7F, 0xC0, + 0x3F, 0xE3, 0xFE, 0x00, 0xFF, 0x9F, 0xE0, 0x07, 0xFC, 0xFF, 0x00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0x07, 0xFF, 0xF0, 0x00, 0x0F, 0xFF, 0x80, 0x00, 0x1F, + 0xF8, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xE0, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, + 0x3F, 0xFF, 0x80, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0xFF, 0xFF, 0xFE, 0x00, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xF8, + 0x7F, 0xF8, 0x1F, 0xFC, 0x7F, 0xF0, 0x03, 0xFF, 0x3F, 0xE0, 0x00, 0xFF, + 0x9F, 0xF0, 0x00, 0x3F, 0xDF, 0xF0, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x0F, + 0xF8, 0x78, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x03, + 0xFE, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x01, 0xFF, 0x80, 0x00, 0x03, + 0xFF, 0x80, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x03, + 0xFF, 0x80, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x03, + 0xFF, 0x80, 0x00, 0x01, 0xFF, 0x80, 0x00, 0x01, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x7F, 0xC0, 0x00, 0x00, + 0x3F, 0xC0, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, + 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xC0, 0x00, 0x00, 0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0xF8, 0x07, 0xFF, 0x07, 0xFF, 0x80, + 0x00, 0x3F, 0x80, 0x1F, 0x80, 0x7F, 0x80, 0x00, 0x07, 0xF8, 0x00, 0x00, + 0x00, 0x00, 0x03, 0xF8, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, + 0xF8, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0xFF, 0x80, 0x00, 0x00, 0x00, + 0x0F, 0xF0, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x07, 0xFE, 0x01, 0xFF, 0xE0, + 0x00, 0x00, 0x03, 0xFF, 0x80, 0x1F, 0xFF, 0x00, 0x00, 0x01, 0xFF, 0xE0, + 0x01, 0xFF, 0xFF, 0x00, 0x07, 0xFF, 0xF8, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x07, + 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xE0, + 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x07, 0xFF, + 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xE0, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, + 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x0F, + 0xFF, 0x80, 0x00, 0x00, 0x00, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x07, 0xFF, + 0xF0, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0x00, 0x00, 0x03, 0xFF, 0xFE, + 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0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x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x03, + 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x3F, 0xFF, 0xFF, 0xFE, 0x00, 0x03, 0xFF, + 0xFF, 0xFF, 0xE0, 0x00, 0x7F, 0xFF, 0xFF, 0xFE, 0x00, 0x07, 0xFF, 0xFF, + 0xFF, 0xF0, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0x07, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xF8, +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xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x03, 0xFE, 0x00, + 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, + 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, + 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, + 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, + 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, + 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, + 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, + 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, + 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, + 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, + 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, + 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, + 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x3F, + 0xE0, 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x3F, 0xFF, + 0xF0, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0xFF, 0xFF, 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0xC7, 0xFC, 0x00, 0x00, 0x3F, 0xF3, 0xFF, 0x00, + 0x00, 0x07, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, + 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xFF, + 0xFC, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x07, 0xFF, 0x80, + 0x00, 0x00, 0x01, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, + 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0xFC, + 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, + 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, + 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x3F, + 0xF0, 0x00, 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, + 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xC0, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, + 0xFE, 0x3F, 0xFF, 0xFF, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0xFE, 0x3F, 0xFF, + 0xFF, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0xFE, 0x3F, 0xFF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0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, + 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, + 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, + 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x03, 0xE1, 0xF0, + 0xF8, 0x7C, 0x3F, 0x1F, 0x8F, 0xC7, 0xE7, 0xF3, 0xF9, 0xFC, 0xFE, 0x7F, + 0x3F, 0x9F, 0xCF, 0xF7, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x78, 0x00, + 0x00, 0x01, 0xE0, 0x00, 0x00, 0x0F, 0x80, 0x00, 0x00, 0x3C, 0x00, 0x00, + 0x00, 0xF0, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x03, 0xE0, 0x00, 0x07, 0xFF, 0x00, 0x00, 0xFF, 0xFC, + 0x00, 0x0F, 0xFF, 0xFC, 0x00,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7E, 0x00, 0x00, 0x01, 0xF0, 0x00, + 0x00, 0x3E, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x3E, 0x00, 0x01, 0xFC, 0x00, + 0x00, 0x1F, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x1F, 0x00, 0x07, 0xFF, 0x00, + 0x00, 0x0F, 0x00, 0x07, 0xFF, 0x80, 0x00, 0x0F, 0x80, 0x03, 0xFF, 0xC0, + 0x00, 0x0F, 0x80, 0x01, 0xF7, 0xE0, 0x00, 0x07, 0xC0, 0x00, 0xF3, 0xF0, + 0x00, 0x07, 0xC0, 0x00, 0x41, 0xF8, 0x00, 0x03, 0xE0, 0x00, 0x00, 0xFC, + 0x00, 0x03, 0xE0, 0x00, 0x00, 0x7E, 0x00, 0x03, 0xE0, 0x00, 0x00, 0x3F, + 0x00, 0x01, 0xF0, 0x00, 0x00, 0x1F, 0x80, 0x01, 0xF0, 0x00, 0x00, 0x0F, + 0xC0, 0x00, 0xF8, 0x00, 0x00, 0x07, 0xE0, 0x00, 0xF8, 0x00, 0x00, 0x03, + 0xF0, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x7C, 0x00, 0x00, 0x00, + 0xFC, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x3E, 0x00, 0x00, 0x00, + 0x3F, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x1F, 0x00, 0x00, 0x00, + 0x0F, 0xC0, 0x1F, 0x00, 0x03, 0xF0, 0x00, 0x00, 0x0F, 0x00, 0x03, 0xF8, + 0x00, 0x00, 0x0F, 0x80, 0x01, 0xFC, 0x00, 0x00, 0x0F, 0x80, 0x01, 0xFE, + 0x00, 0x00, 0x07, 0xC0, 0x01, 0xFF, 0x00, 0x00, 0x07, 0xC0, 0x01, 0xFF, + 0x80, 0x00, 0x03, 0xE0, 0x01, 0xFF, 0xC0, 0x00, 0x03, 0xE0, 0x01, 0xF7, + 0xE0, 0x00, 0x03, 0xE0, 0x01, 0xFB, 0xF0, 0x00, 0x01, 0xF0, 0x01, 0xF9, + 0xF8, 0x00, 0x01, 0xF0, 0x01, 0xF8, 0xFC, 0x00, 0x00, 0xF8, 0x00, 0xF8, + 0x7E, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x78, 0x00, 0xFF, + 0xFF, 0xF0, 0x00, 0x7C, 0x00, 0x7F, 0xFF, 0xF8, 0x00, 0x7C, 0x00, 0x3F, + 0xFF, 0xFC, 0x00, 0x3E, 0x00, 0x1F, 0xFF, 0xFE, 0x00, 0x3E, 0x00, 0x0F, + 0xFF, 0xFF, 0x00, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x1F, 0x00, 0x00, + 0x00, 0x7E, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x0F, 0x80, 0x00, + 0x00, 0x1F, 0x80, 0x0F, 0x80, 0x00, 0x00, 0x0F, 0xC0, 0x07, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x00, 0x3E, 0x00, 0x03, 0xF0, 0x00, + 0x00, 0x7C, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x7C, 0x00, 0x0F, 0xF0, 0x00, + 0x00, 0xF8, 0x00, 0x7F, 0xF0, 0x00, 0x00, 0xF8, 0x00, 0xFF, 0xF0, 0x00, + 0x01, 0xF0, 0x00, 0xFF, 0xF0, 0x00, 0x03, 0xE0, 0x00, 0xFB, 0xF0, 0x00, + 0x03, 0xE0, 0x00, 0xF3, 0xF0, 0x00, 0x07, 0xC0, 0x00, 0x83, 0xF0, 0x00, + 0x07, 0xC0, 0x00, 0x03, 0xF0, 0x00, 0x0F, 0x80, 0x00, 0x03, 0xF0, 0x00, + 0x0F, 0x80, 0x00, 0x03, 0xF0, 0x00, 0x1F, 0x00, 0x00, 0x03, 0xF0, 0x00, + 0x3E, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x3E, 0x00, 0x00, 0x03, 0xF0, 0x00, + 0x7C, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x7C, 0x00, 0x00, 0x03, 0xF0, 0x00, + 0xF8, 0x00, 0x00, 0x03, 0xF0, 0x00, 0xF8, 0x00, 0x00, 0x03, 0xF0, 0x01, + 0xF0, 0x00, 0x00, 0x03, 0xF0, 0x01, 0xE0, 0x00, 0x00, 0x03, 0xF0, 0x03, + 0xE0, 0x00, 0x00, 0x03, 0xF0, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, + 0xC0, 0x1F, 0xE0, 0x00, 0x00, 0x0F, 0x80, 0x7F, 0xF8, 0x00, 0x00, 0x0F, + 0x80, 0xFF, 0xFC, 0x00, 0x00, 0x1F, 0x01, 0xFF, 0xFE, 0x00, 0x00, 0x1E, + 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x3E, 0x03, 0xF8, 0x7F, 0x00, 0x00, 0x7C, + 0x03, 0xF0, 0x3F, 0x00, 0x00, 0x7C, 0x03, 0xF0, 0x3F, 0x00, 0x00, 0xF8, + 0x00, 0x00, 0x3F, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x7E, 0x00, 0x01, 0xF0, + 0x00, 0x00, 0xFE, 0x00, 0x01, 0xE0, 0x00, 0x01, 0xFC, 0x00, 0x03, 0xE0, + 0x00, 0x03, 0xF8, 0x00, 0x07, 0xC0, 0x00, 0x0F, 0xF0, 0x00, 0x07, 0xC0, + 0x00, 0x1F, 0xE0, 0x00, 0x0F, 0x80, 0x00, 0x3F, 0x80, 0x00, 0x0F, 0x80, + 0x00, 0x7F, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x1E, 0x00, + 0x01, 0xFF, 0xFF, 0x00, 0x3E, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x7C, 0x00, + 0x03, 0xFF, 0xFF, 0x00, 0x7C, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0xF8, 0x00, + 0x07, 0xFF, 0xFF, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x03, 0xF8, 0x00, + 0x00, 0x00, 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x00, 0xF8, 0x00, 0x7F, 0xFC, + 0x00, 0x00, 0x3E, 0x00, 0x1F, 0xFF, 0xC0, 0x00, 0x0F, 0x80, 0x07, 0xFF, + 0xF8, 0x00, 0x01, 0xF0, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x7C, 0x00, 0x1F, + 0x03, 0xF0, 0x00, 0x0F, 0x80, 0x00, 0xE0, 0xFC, 0x00, 0x03, 0xE0, 0x00, + 0x00, 0x3F, 0x80, 0x00, 0x78, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x1F, 0x00, + 0x00, 0x07, 0xF8, 0x00, 0x07, 0xC0, 0x00, 0x00, 0xFF, 0x80, 0x00, 0xF8, + 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x07, + 0xC0, 0x00, 0x00, 0x01, 0xF0, 0x01, 0xF0, 0x00, 0x03, 0xE0, 0x3F, 0x00, + 0x7C, 0x00, 0x00, 0xFC, 0x0F, 0xE0, 0x0F, 0x80, 0x00, 0x0F, 0xC3, 0xFC, + 0x03, 0xE0, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x7C, 0x00, 0x00, 0x1F, 0xFF, + 0xC0, 0x1F, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0x03, 0xC0, 0x00, 0x00, 0x1F, + 0xFC, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x3E, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xC0, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x7F, + 0x00, 0x00, 0x00, 0x3E, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x0F, 0x80, 0x03, + 0xFC, 0x00, 0x00, 0x01, 0xE0, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x7C, 0x00, + 0x3F, 0xF0, 0x00, 0x00, 0x1F, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x03, 0xE0, + 0x03, 0xEF, 0xC0, 0x00, 0x00, 0xF8, 0x00, 0xFD, 0xF8, 0x00, 0x00, 0x1F, + 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x07, 0xC0, 0x0F, 0xC7, 0xE0, 0x00, 0x01, + 0xF0, 0x01, 0xF0, 0xFC, 0x00, 0x00, 0x3E, 0x00, 0x7C, 0x1F, 0x80, 0x00, + 0x0F, 0x80, 0x1F, 0xFF, 0xFE, 0x00, 0x01, 0xF0, 0x03, 0xFF, 0xFF, 0xC0, + 0x00, 0x7C, 0x00, 0x7F, 0xFF, 0xF8, 0x00, 0x0F, 0x00, 0x0F, 0xFF, 0xFF, + 0x00, 0x03, 0xE0, 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0xF8, 0x00, 0x00, 0x07, + 0xE0, 0x00, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x07, 0xC0, 0x00, 0x00, + 0x1F, 0x80, 0x00, 0xF8, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x3E, 0x00, 0x00, + 0x00, 0x7E, 0x00, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, + 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x01, 0xFE, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x3F, + 0xC0, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7F, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, + 0x1F, 0xF0, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, + 0x07, 0xFC, 0x00, 0x00, 0x07, 0xFE, 0x00, 0x00, 0x07, 0xFE, 0x00, 0x00, + 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, + 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, + 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, + 0x01, 0xFF, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x00, + 0x00, 0x7F, 0xC0, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x3E, 0x1F, 0xF0, 0x00, + 0x1F, 0xEF, 0xF8, 0x00, 0x1F, 0xF3, 0xFE, 0x00, 0x0F, 0xF9, 0xFF, 0x80, + 0x0F, 0xFC, 0x7F, 0xF0, 0x3F, 0xFC, 0x3F, 0xFF, 0xFF, 0xFE, 0x0F, 0xFF, + 0xFF, 0xFE, 0x03, 0xFF, 0xFF, 0xFE, 0x00, 0xFF, 0xFF, 0xFE, 0x00, 0x3F, + 0xFF, 0xFC, 0x00, 0x07, 0xFF, 0xF8, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, + 0x03, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, + 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xF8, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7F, + 0x00, 0x00, 0x00, 0x00, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x00, + 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x00, + 0x07, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x00, 0x03, + 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xC0, 0x00, 0x00, 0x01, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xC0, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x3F, 0xEF, 0xF8, + 0x00, 0x00, 0x03, 0xFE, 0x7F, 0xE0, 0x00, 0x00, 0x1F, 0xF1, 0xFF, 0x00, + 0x00, 0x01, 0xFF, 0x8F, 0xF8, 0x00, 0x00, 0x0F, 0xF8, 0x7F, 0xE0, 0x00, + 0x00, 0x7F, 0xC1, 0xFF, 0x00, 0x00, 0x07, 0xFC, 0x0F, 0xFC, 0x00, 0x00, + 0x3F, 0xE0, 0x3F, 0xE0, 0x00, 0x01, 0xFF, 0x01, 0xFF, 0x00, 0x00, 0x1F, + 0xF0, 0x0F, 0xFC, 0x00, 0x00, 0xFF, 0x80, 0x3F, 0xE0, 0x00, 0x0F, 0xFC, + 0x01, 0xFF, 0x80, 0x00, 0x7F, 0xC0, 0x07, 0xFC, 0x00, 0x03, 0xFE, 0x00, + 0x3F, 0xE0, 0x00, 0x3F, 0xE0, 0x01, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0xFF, + 0xFC, 0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, + 0x80, 0x07, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xF0, + 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x3F, 0xFF, 0xFF, 0xFF, 0xFE, 0x01, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x0F, 0xF8, 0x00, 0x00, 0xFF, 0x80, 0xFF, + 0xC0, 0x00, 0x07, 0xFE, 0x07, 0xFC, 0x00, 0x00, 0x3F, 0xF0, 0x3F, 0xE0, + 0x00, 0x00, 0xFF, 0xC3, 0xFF, 0x00, 0x00, 0x07, 0xFE, 0x1F, 0xF0, 0x00, + 0x00, 0x1F, 0xF1, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0xCF, 0xFC, 0x00, 0x00, + 0x07, 0xFE, 0x7F, 0xC0, 0x00, 0x00, 0x1F, 0xFF, 0xFE, 0x00, 0x00, 0x00, + 0xFF, 0xC0, 0x00, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xC0, + 0x00, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x00, + 0x00, 0x00, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, + 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x00, + 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x01, 0xFF, + 0xC0, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF8, + 0x00, 0x00, 0x00, 0x07, 0xFF, 0xC0, 0x00, 0x00, 0x00,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x00, 0x00, 0x3F, + 0xF0, 0x3F, 0xE0, 0x00, 0x00, 0xFF, 0xC3, 0xFF, 0x00, 0x00, 0x07, 0xFE, + 0x1F, 0xF0, 0x00, 0x00, 0x1F, 0xF1, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0xCF, + 0xFC, 0x00, 0x00, 0x07, 0xFE, 0x7F, 0xC0, 0x00, 0x00, 0x1F, 0xFF, 0xFE, + 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x00, + 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x01, + 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x1F, 0xDF, 0xC0, 0x00, 0x00, 0x00, 0xFC, + 0xFE, 0x00, 0x00, 0x00, 0x0F, 0xE3, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x0F, + 0xE0, 0x00, 0x00, 0x0F, 0xE0, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, + 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xC0, 0x00, 0x00, 0x00, + 0x7F, 0xFE, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x1F, + 0xFF, 0xC0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0F, 0xFF, + 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x07, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x3F, 0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 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x01, 0xF0, 0x07, + 0x80, 0x00, 0x00, 0x3F, 0xE0, 0x3C, 0x00, 0x00, 0x01, 0xFF, 0xC3, 0xE0, + 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF0, 0x00, + 0x00, 0x07, 0x87, 0xFF, 0x80, 0x00, 0x00, 0x3C, 0x0F, 0xF8, 0x00, 0x00, + 0x01, 0xE0, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x3F, + 0xF8, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x1F, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xC0, + 0x00, 0x00, 0x00, 0x7F, 0xFF, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xF8, 0x00, + 0x00, 0x00, 0x3F, 0xFF, 0xE0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xE0, 0x00, 0x00, + 0x07, 0xFD, 0xFF, 0x00, 0x00, 0x00, 0x7F, 0xCF, 0xFC, 0x00, 0x00, 0x03, + 0xFE, 0x3F, 0xE0, 0x00, 0x00, 0x3F, 0xF1, 0xFF, 0x00, 0x00, 0x01, 0xFF, + 0x0F, 0xFC, 0x00, 0x00, 0x0F, 0xF8, 0x3F, 0xE0, 0x00, 0x00, 0xFF, 0x81, + 0xFF, 0x80, 0x00, 0x07, 0xFC, 0x07, 0xFC, 0x00, 0x00, 0x3F, 0xE0, 0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F, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00, + 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x00, + 0x7F, 0xFF, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x3F, + 0xFF, 0xE0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x1F, 0xFF, + 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x07, 0xFD, 0xFF, + 0x00, 0x00, 0x00, 0x7F, 0xCF, 0xFC, 0x00, 0x00, 0x03, 0xFE, 0x3F, 0xE0, + 0x00, 0x00, 0x3F, 0xF1, 0xFF, 0x00, 0x00, 0x01, 0xFF, 0x0F, 0xFC, 0x00, + 0x00, 0x0F, 0xF8, 0x3F, 0xE0, 0x00, 0x00, 0xFF, 0x81, 0xFF, 0x80, 0x00, + 0x07, 0xFC, 0x07, 0xFC, 0x00, 0x00, 0x3F, 0xE0, 0x3F, 0xE0, 0x00, 0x03, + 0xFE, 0x01, 0xFF, 0x80, 0x00, 0x1F, 0xF0, 0x07, 0xFC, 0x00, 0x01, 0xFF, + 0x80, 0x3F, 0xF0, 0x00, 0x0F, 0xF8, 0x00, 0xFF, 0x80, 0x00, 0x7F, 0xC0, + 0x07, 0xFC, 0x00, 0x07, 0xFC, 0x00, 0x3F, 0xF0, 0x00, 0x3F, 0xFF, 0xFF, + 0xFF, 0x80, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x1F, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x0F, 0xFF, 0xFF, 0xFF, 0xFE, + 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, + 0x3F, 0xFF, 0xFF, 0xFF, 0xFE, 0x01, 0xFF, 0x00, 0x00, 0x1F, 0xF0, 0x1F, + 0xF8, 0x00, 0x00, 0xFF, 0xC0, 0xFF, 0x80, 0x00, 0x07, 0xFE, 0x07, 0xFC, + 0x00, 0x00, 0x1F, 0xF8, 0x7F, 0xE0, 0x00, 0x00, 0xFF, 0xC3, 0xFE, 0x00, + 0x00, 0x03, 0xFE, 0x3F, 0xF0, 0x00, 0x00, 0x1F, 0xF9, 0xFF, 0x80, 0x00, + 0x00, 0xFF, 0xCF, 0xF8, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xC0, 0x00, 0x00, + 0x1F, 0xF8, 0x00, 0x00, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x01, 0xFE, 0x00, + 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0xF1, 0xE0, 0x00, + 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x78, 0x38, 0x00, 0x00, + 0x00, 0x03, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, + 0x00, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x0F, + 0xFF, 0x80, 0x00, 0x00, 0x00, 0x7F, 0xFC, 0x00, 0x00, 0x00, 0x07, 0xFF, + 0xE0, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0x00, 0x00, 0x01, 0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 0x7F, 0xE0, 0x00, 0x07, 0xFE, 0x7F, 0xE0, 0x00, 0x1F, 0xF8, 0xFF, + 0xC0, 0x00, 0x3F, 0xF0, 0xFF, 0xC0, 0x00, 0xFF, 0xE1, 0xFF, 0xE0, 0x03, + 0xFF, 0x81, 0xFF, 0xF0, 0x3F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFC, 0x03, + 0xFF, 0xFF, 0xFF, 0xF0, 0x03, 0xFF, 0xFF, 0xFF, 0xC0, 0x03, 0xFF, 0xFF, + 0xFF, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x00, 0x01, 0xFF, 0xFF, 0xF0, 0x00, + 0x00, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x3F, + 0xC0, 0x00, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x03, 0xFF, 0xE0, 0x00, + 0x00, 0x04, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x0F, 0xC0, 0x00, 0x00, 0x00, + 0x1F, 0x80, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x01, 0xFC, 0x00, + 0x00, 0x07, 0xFF, 0xF0, 0x00, 0x00, 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x07, + 0xFC, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x1F, 0xF0, 0x00, 0x00, + 0x03, 0xFC, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, 0x0F, 0xE0, 0x00, + 0x00, 0x03, 0xFC, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x0F, 0xE0, + 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, + 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xF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0x00, 0x3F, 0xF7, 0xFE, 0x00, + 0x00, 0x0F, 0xFC, 0xFF, 0xC0, 0x00, 0x01, 0xFF, 0x8F, 0xFC, 0x00, 0x00, + 0x7F, 0xF1, 0xFF, 0xC0, 0x00, 0x1F, 0xFC, 0x1F, 0xFC, 0x00, 0x07, 0xFF, + 0x83, 0xFF, 0xE0, 0x01, 0xFF, 0xE0, 0x3F, 0xFF, 0x01, 0xFF, 0xF8, 0x07, + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xC0, 0x07, 0xFF, + 0xFF, 0xFF, 0xF0, 0x00, 0x7F, 0xFF, 0xFF, 0xFC, 0x00, 0x03, 0xFF, 0xFF, + 0xFE, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0x80, + 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, + 0x00, 0x00, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00, + 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x03, 0xF8, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xC0, 0x00, 0x00, 0x00, 0x07, 0xF0, + 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x0F, + 0xFF, 0xFF, 0xE0, 0x00, 0x03, 0xFF, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, + 0xFF, 0xF0, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0x1F, 0xFF, 0xFF, 0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F, + 0xFF, 0xFF, 0xFF, 0xC0, 0x07, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x7F, 0xFF, + 0xFF, 0xFC, 0x00, 0x03, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1F, 0xFF, 0xFF, + 0x80, 0x00, 0x00, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x03, 0xFF, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0xC0, 0x00, 0x00, 0x00, 0x1F, 0xFC, 0x00, 0x00, + 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x00, + 0x3F, 0xBF, 0x80, 0x00, 0x00, 0x07, 0xE7, 0xF0, 0x00, 0x00, 0x01, 0xFC, + 0x7F, 0x00, 0x00, 0x00, 0x7F, 0x07, 0xF0, 0x00, 0x00, 0x1F, 0xC0, 0x7F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0x00, 0x00, 0x00, + 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xE0, 0x00, 0x03, 0xFF, + 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x7F, 0xFF, 0xFF, + 0xFF, 0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xF0, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0xFF, 0xFC, 0x07, 0xFF, 0xE0, 0x3F, 0xFE, 0x00, 0x1F, 0xFE, 0x07, + 0xFF, 0x00, 0x01, 0xFF, 0xE1, 0xFF, 0xC0, 0x00, 0x1F, 0xFC, 0x3F, 0xF0, + 0x00, 0x01, 0xFF, 0xCF, 0xFC, 0x00, 0x00, 0x1F, 0xF9, 0xFF, 0x80, 0x00, + 0x03, 0xFF, 0x3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0x1F, 0xFF, 0xFC, 0x00, 0x00, 0x3F, 0xFC, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x07, + 0xF8, 0x00, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, + 0x0F, 0xF0, 0x00, 0x00, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, + 0x00, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0x00, + 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x01, 0xFF, 0xFF, + 0x80, 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0xFF, + 0xFF, 0xC0, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, + 0x7F, 0xFF, 0xE0, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x01, 0xFF, 0xFF, 0x80, + 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0xFF, 0xFF, + 0xC0, 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x7F, + 0xFF, 0xE0, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, + 0x3F, 0xFF, 0xF0, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x00, 0xFF, 0xFF, 0xC0, + 0x00, 0x1F, 0xFF, 0xF8, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x7F, 0xFF, + 0xE0, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x01, 0xFF, 0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00, 0x00, 0x7F, + 0xFF, 0xF0, 0x00, 0x1F, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0x7F, 0xF0, 0x01, + 0xFF, 0xCF, 0xFF, 0x80, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, + 0xFF, 0xFF, 0xC1, 0xFF, 0xFF, 0xFF, 0xF0, 0x1F, 0xFF, 0xFF, 0xFE, 0x01, + 0xFF, 0xFF, 0xFF, 0x00, 0x1F, 0xFF, 0xFF, 0xC0, 0x00, 0xFF, 0xFF, 0xE0, + 0x00, 0x01, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x1F, 0xF0, 0x00, 0x00, 0x00, + 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x00, 0x01, 0xFE, + 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x00, + 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, + 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3F, 0xF8, 0x00, 0x00, 0x7F, 0xF7, 0xFE, 0x00, 0x00, 0x1F, 0xF9, + 0xFF, 0xC0, 0x00, 0x0F, 0xFE, 0x3F, 0xF8, 0x00, 0x03, 0xFF, 0x07, 0xFE, + 0x00, 0x01, 0xFF, 0x81, 0xFF, 0xC0, 0x00, 0xFF, 0xE0, 0x3F, 0xF0, 0x00, + 0x3F, 0xF0, 0x07, 0xFE, 0x00, 0x1F, 0xF8, 0x01, 0xFF, 0xC0, 0x07, 0xFE, + 0x00, 0x3F, 0xF0, 0x03, 0xFF, 0x00, 0x07, 0xFE, 0x01, 0xFF, 0x80, 0x01, + 0xFF, 0x80, 0x7F, 0xE0, 0x00, 0x3F, 0xF0, 0x3F, 0xF0, 0x00, 0x0F, 0xFE, + 0x0F, 0xFC, 0x00, 0x01, 0xFF, 0x87, 0xFE, 0x00, 0x00, 0x3F, 0xF1, 0xFF, + 0x00, 0x00, 0x0F, 0xFC, 0xFF, 0xC0, 0x00, 0x01, 0xFF, 0xFF, 0xE0, 0x00, + 0x00, 0x3F, 0xFF, 0xF0, 0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00, 0x01, + 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x0F, 0xFF, + 0xC0, 0x00, 0x00, 0x01, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x7F, 0xF8, 0x00, + 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x0F, + 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, + 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, + 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x00, + 0x3F, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, + 0x00, 0x00, 0x0F, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00, 0x00, 0xFF, 0x80, + 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x0F,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FF, 0x00, 0xFF, 0x81, 0xFC, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, + 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, + 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, + 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0x80, + 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x01, 0xFE, 0x0F, 0xF0, 0x00, 0x7F, + 0x83, 0xFC, 0x00, 0x1F, 0xE0, 0xFF, 0x00, 0x07, 0xF8, 0x3F, 0xC0, 0x01, + 0xFE, 0x0F, 0xF0, 0x00, 0x7F, 0x83, 0xFC, 0x00, 0x1F, 0xE0, 0xFF, 0x00, + 0x07, 0xF8, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xC0, 0x00, + 0x7F, 0xDF, 0xF0, 0x00, 0x1F, 0xE7, 0xFC, 0x00, 0x0F, 0xF8, 0xFF, 0x80, + 0x03, 0xFE, 0x3F, 0xE0, 0x00, 0xFF, 0x07, 0xF8, 0x00, 0x7F, 0xC1, 0xFF, + 0x00, 0x1F, 0xF0, 0x7F, 0xC0, 0x07, 0xF8, 0x0F, 0xF0, 0x03, 0xFE, 0x03, + 0xFE, 0x00, 0xFF, 0x80, 0xFF, 0x80, 0x3F, 0xC0, 0x1F, 0xE0, 0x1F, 0xF0, + 0x07, 0xFC, 0x07, 0xF8, 0x00, 0xFF, 0x01, 0xFE, 0x00, 0x3F, 0xC0, 0xFF, + 0x80, 0x0F, 0xF8, 0x3F, 0xC0, 0x01, 0xFE, 0x0F, 0xF0, 0x00, 0x7F, 0x87, + 0xFC, 0x00, 0x1F, 0xF1, 0xFE, 0x00, 0x03, 0xFC, 0x7F, 0x80, 0x00, 0xFF, + 0x3F, 0xE0, 0x00, 0x1F, 0xEF, 0xF0, 0x00, 0x07, 0xFB, 0xFC, 0x00, 0x01, + 0xFF, 0xFF, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0x00, 0x0F, 0xFF, 0xE0, 0x00, + 0x03, 0xFF, 0xF0, 0x00, 0x00, 0x7F, 0xFC, 0x00, 0x00, 0x1F, 0xFF, 0x00, + 0x00, 0x03, 0xFF, 0x80, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x3F, 0xF8, + 0x00, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0xC0, 0x00, 0x00, 0x3F, 0xE0, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x07, + 0xFE, 0x00, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x01, 0xFF, 0xC0, 0x00, 0x1F, + 0xFF, 0xE0, 0x00, 0x07, 0xFF, 0xF8, 0x00, 0x01, 0xFF, 0xFC, 0x00, 0x00, + 0x7F, 0xFE, 0x00, 0x00, 0x1F, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x80, 0x00, + 0x01, 0xFF, 0x00, 0x00, 0x00 }; + +const GFXglyph myFont32pt8bGlyphs[] PROGMEM = { + { 0, 0, 0, 18, 0, 1 }, // 0x20 ' ' + { 0, 9, 45, 21, 6, -44 }, // 0x21 '!' + { 51, 24, 16, 30, 3, -44 }, // 0x22 '"' + { 99, 33, 45, 35, 1, -44 }, // 0x23 '#' + { 285, 30, 55, 35, 2, -47 }, // 0x24 '$' + { 492, 50, 48, 56, 3, -45 }, // 0x25 '%' + { 792, 41, 47, 46, 3, -45 }, // 0x26 '&' + { 1033, 9, 16, 15, 3, -44 }, // 0x27 ''' + { 1051, 16, 58, 21, 3, -44 }, // 0x28 '(' + { 1167, 16, 58, 21, 2, -44 }, // 0x29 ')' + { 1283, 22, 21, 25, 1, -44 }, // 0x2A '*' + { 1341, 31, 32, 37, 3, -37 }, // 0x2B '+' + { 1465, 9, 19, 18, 4, -8 }, // 0x2C ',' + { 1487, 17, 8, 21, 4, -19 }, // 0x2D '-' + { 1504, 8, 9, 18, 5, -8 }, // 0x2E '.' + { 1513, 18, 45, 18, 0, -44 }, // 0x2F '/' + { 1615, 29, 46, 35, 3, -44 }, // 0x30 '0' + { 1782, 20, 45, 35, 5, -44 }, // 0x31 '1' + { 1895, 30, 45, 35, 2, -44 }, // 0x32 '2' + { 2064, 30, 46, 35, 2, -44 }, // 0x33 '3' + { 2237, 33, 44, 35, 1, -43 }, // 0x34 '4' + { 2419, 30, 45, 35, 3, -43 }, // 0x35 '5' + { 2588, 30, 46, 35, 3, -44 }, // 0x36 '6' + { 2761, 29, 44, 35, 3, -43 }, // 0x37 '7' + { 2921, 29, 46, 35, 3, -44 }, // 0x38 '8' + { 3088, 30, 46, 35, 2, -44 }, // 0x39 '9' + { 3261, 9, 33, 21, 6, -32 }, // 0x3A ':' + { 3299, 10, 43, 21, 5, -32 }, // 0x3B ';' + { 3353, 31, 34, 37, 3, -38 }, // 0x3C '<' + { 3485, 31, 22, 37, 3, -32 }, // 0x3D '=' + { 3571, 31, 34, 37, 3, -38 }, // 0x3E '>' + { 3703, 33, 46, 38, 3, -45 }, // 0x3F '?' + { 3893, 59, 61, 61, 2, -45 }, // 0x40 '@' + { 4343, 45, 45, 46, 0, -44 }, // 0x41 'A' + { 4597, 37, 45, 46, 5, -44 }, // 0x42 'B' + { 4806, 39, 46, 46, 3, -45 }, // 0x43 'C' + { 5031, 37, 45, 46, 5, -44 }, // 0x44 'D' + { 5240, 34, 45, 42, 5, -44 }, // 0x45 'E' + { 5432, 31, 45, 38, 5, -44 }, // 0x46 'F' + { 5607, 42, 47, 49, 3, -45 }, // 0x47 'G' + { 5854, 36, 45, 46, 5, -44 }, // 0x48 'H' + { 6057, 9, 45, 18, 4, -44 }, // 0x49 'I' + { 6108, 29, 46, 35, 1, -44 }, // 0x4A 'J' + { 6275, 40, 45, 46, 5, -44 }, // 0x4B 'K' + { 6500, 32, 45, 38, 5, -44 }, // 0x4C 'L' + { 6680, 44, 45, 52, 4, -44 }, // 0x4D 'M' + { 6928, 35, 45, 46, 5, -44 }, // 0x4E 'N' + { 7125, 43, 47, 49, 3, -45 }, // 0x4F 'O' + { 7378, 34, 45, 42, 5, -44 }, // 0x50 'P' + { 7570, 45, 51, 49, 3, -45 }, // 0x51 'Q' + { 7857, 40, 45, 46, 5, -44 }, // 0x52 'R' + { 8082, 37, 47, 42, 2, -45 }, // 0x53 'S' + { 8300, 36, 45, 38, 1, -44 }, // 0x54 'T' + { 8503, 35, 46, 46, 5, -44 }, // 0x55 'U' + { 8705, 42, 45, 42, 0, -44 }, // 0x56 'V' + { 8942, 59, 45, 59, 0, -44 }, // 0x57 'W' + { 9274, 42, 45, 42, 0, -44 }, // 0x58 'X' + { 9511, 42, 45, 42, 0, -44 }, // 0x59 'Y' + { 9748, 36, 45, 38, 1, -44 }, // 0x5A 'Z' + { 9951, 16, 58, 21, 4, -44 }, // 0x5B '[' + { 10067, 18, 45, 18, 0, -44 }, // 0x5C '\' + { 10169, 15, 58, 21, 1, -44 }, // 0x5D ']' + { 10278, 29, 24, 37, 4, -45 }, // 0x5E '^' + { 10365, 36, 7, 35, -1, 6 }, // 0x5F '_' + { 10397, 14, 9, 21, 1, -44 }, // 0x60 '`' + { 10413, 31, 35, 35, 2, -33 }, // 0x61 'a' + { 10549, 32, 46, 38, 4, -44 }, // 0x62 'b' + { 10733, 30, 35, 35, 3, -33 }, // 0x63 'c' + { 10865, 31, 46, 38, 3, -44 }, // 0x64 'd' + { 11044, 31, 35, 35, 2, -33 }, // 0x65 'e' + { 11180, 22, 46, 21, 1, -45 }, // 0x66 'f' + { 11307, 31, 48, 38, 3, -33 }, // 0x67 'g' + { 11493, 30, 45, 38, 4, -44 }, // 0x68 'h' + { 11662, 8, 45, 18, 5, -44 }, // 0x69 'i' + { 11707, 16, 59, 18, -3, -44 }, // 0x6A 'j' + { 11825, 30, 45, 35, 4, -44 }, // 0x6B 'k' + { 11994, 8, 45, 18, 5, -44 }, // 0x6C 'l' + { 12039, 48, 34, 56, 4, -33 }, // 0x6D 'm' + { 12243, 30, 34, 38, 4, -33 }, // 0x6E 'n' + { 12371, 33, 35, 38, 3, -33 }, // 0x6F 'o' + { 12516, 32, 47, 38, 4, -33 }, // 0x70 'p' + { 12704, 32, 47, 38, 3, -33 }, // 0x71 'q' + { 12892, 21, 34, 25, 4, -33 }, // 0x72 'r' + { 12982, 31, 35, 35, 1, -33 }, // 0x73 's' + { 13118, 19, 45, 21, 1, -43 }, // 0x74 't' + { 13225, 30, 34, 38, 4, -32 }, // 0x75 'u' + { 13353, 34, 33, 35, 0, -32 }, // 0x76 'v' + { 13494, 49, 33, 49, 0, -32 }, // 0x77 'w' + { 13697, 34, 33, 35, 0, -32 }, // 0x78 'x' + { 13838, 34, 47, 35, 0, -32 }, // 0x79 'y' + { 14038, 29, 33, 32, 1, -32 }, // 0x7A 'z' + { 14158, 21, 60, 25, 2, -45 }, // 0x7B '{' + { 14316, 7, 59, 18, 5, -44 }, // 0x7C '|' + { 14368, 21, 60, 25, 1, -45 }, // 0x7D '}' + { 14526, 33, 12, 37, 2, -27 }, // 0x7E '~' + { 14576, 31, 39, 47, 8, -38 }, // 0x7F + { 14728, 31, 39, 47, 8, -38 }, // 0x80 + { 14880, 31, 39, 47, 8, -38 }, // 0x81 + { 15032, 31, 39, 47, 8, -38 }, // 0x82 + { 15184, 31, 39, 47, 8, -38 }, // 0x83 + { 15336, 31, 39, 47, 8, -38 }, // 0x84 + { 15488, 31, 39, 47, 8, -38 }, // 0x85 + { 15640, 31, 39, 47, 8, -38 }, // 0x86 + { 15792, 31, 39, 47, 8, -38 }, // 0x87 + { 15944, 31, 39, 47, 8, -38 }, // 0x88 + { 16096, 31, 39, 47, 8, -38 }, // 0x89 + { 16248, 31, 39, 47, 8, -38 }, // 0x8A + { 16400, 31, 39, 47, 8, -38 }, // 0x8B + { 16552, 31, 39, 47, 8, -38 }, // 0x8C + { 16704, 31, 39, 47, 8, -38 }, // 0x8D + { 16856, 31, 39, 47, 8, -38 }, // 0x8E + { 17008, 31, 39, 47, 8, -38 }, // 0x8F + { 17160, 31, 39, 47, 8, -38 }, // 0x90 + { 17312, 31, 39, 47, 8, -38 }, // 0x91 + { 17464, 31, 39, 47, 8, -38 }, // 0x92 + { 17616, 31, 39, 47, 8, -38 }, // 0x93 + { 17768, 31, 39, 47, 8, -38 }, // 0x94 + { 17920, 31, 39, 47, 8, -38 }, // 0x95 + { 18072, 31, 39, 47, 8, -38 }, // 0x96 + { 18224, 31, 39, 47, 8, -38 }, // 0x97 + { 18376, 31, 39, 47, 8, -38 }, // 0x98 + { 18528, 31, 39, 47, 8, -38 }, // 0x99 + { 18680, 31, 39, 47, 8, -38 }, // 0x9A + { 18832, 31, 39, 47, 8, -38 }, // 0x9B + { 18984, 31, 39, 47, 8, -38 }, // 0x9C + { 19136, 31, 39, 47, 8, -38 }, // 0x9D + { 19288, 31, 39, 47, 8, -38 }, // 0x9E + { 19440, 31, 39, 47, 8, -38 }, // 0x9F + { 19592, 0, 0, 18, 0, 1 }, // 0xA0 + { 19592, 9, 46, 21, 6, -32 }, // 0xA1 + { 19644, 30, 58, 35, 3, -44 }, // 0xA2 + { 19862, 34, 47, 35, 0, -45 }, // 0xA3 + { 20062, 32, 33, 35, 1, -38 }, // 0xA4 + { 20194, 35, 45, 35, 0, -44 }, // 0xA5 + { 20391, 7, 59, 18, 5, -44 }, // 0xA6 + { 20443, 31, 59, 35, 2, -45 }, // 0xA7 + { 20672, 21, 8, 21, 0, -44 }, // 0xA8 + { 20693, 47, 47, 46, 0, -45 }, // 0xA9 + { 20970, 21, 23, 23, 1, -45 }, // 0xAA + { 21031, 29, 29, 35, 3, -30 }, // 0xAB + { 21137, 31, 22, 37, 3, -32 }, // 0xAC + { 21223, 17, 8, 21, 4, -19 }, // 0xAD + { 21240, 47, 47, 46, 0, -45 }, // 0xAE + { 21517, 36, 7, 35, -1, -54 }, // 0xAF + { 21549, 19, 19, 25, 3, -45 }, // 0xB0 + { 21595, 31, 43, 35, 2, -42 }, // 0xB1 + { 21762, 18, 23, 21, 1, -45 }, // 0xB2 + { 21814, 19, 23, 21, 1, -45 }, // 0xB3 + { 21869, 14, 9, 21, 6, -44 }, // 0xB4 + { 21885, 30, 46, 36, 3, -32 }, // 0xB5 + { 22058, 35, 57, 35, 0, -44 }, // 0xB6 + { 22308, 9, 9, 21, 6, -26 }, // 0xB7 + { 22319, 17, 11, 21, 1, 1 }, // 0xB8 + { 22343, 12, 23, 21, 3, -45 }, // 0xB9 + { 22378, 21, 23, 23, 1, -45 }, // 0xBA + { 22439, 29, 29, 35, 3, -30 }, // 0xBB + { 22545, 49, 46, 53, 3, -44 }, // 0xBC + { 22827, 48, 47, 53, 3, -45 }, // 0xBD + { 23109, 51, 47, 53, 1, -45 }, // 0xBE + { 23409, 33, 47, 38, 3, -32 }, // 0xBF + { 23603, 45, 58, 46, 0, -57 }, // 0xC0 + { 23930, 45, 58, 46, 0, -57 }, // 0xC1 + { 24257, 45, 58, 46, 0, -57 }, // 0xC2 + { 24584, 45, 57, 46, 0, -56 }, // 0xC3 + { 24905, 45, 57, 46, 0, -56 }, // 0xC4 + { 25226, 45, 54, 46, 0, -53 }, // 0xC5 + { 25530, 63, 45, 63, -3, -44 }, // 0xC6 + { 25885, 39, 57, 46, 3, -45 }, // 0xC7 + { 26163, 34, 58, 42, 5, -57 }, // 0xC8 + { 26410, 34, 58, 42, 5, -57 }, // 0xC9 + { 26657, 34, 58, 42, 5, -57 }, // 0xCA + { 26904, 34, 57, 42, 5, -56 }, // 0xCB + { 27147, 14, 58, 18, -1, -57 }, // 0xCC + { 27249, 14, 58, 18, 4, -57 }, // 0xCD + { 27351, 21, 58, 18, -1, -57 }, // 0xCE + { 27504, 21, 57, 18, -2, -56 }, // 0xCF + { 27654, 42, 45, 46, 0, -44 }, // 0xD0 + { 27891, 35, 57, 46, 5, -56 }, // 0xD1 + { 28141, 43, 59, 49, 3, -57 }, // 0xD2 + { 28459, 43, 59, 49, 3, -57 }, // 0xD3 + { 28777, 43, 59, 49, 3, -57 }, // 0xD4 + { 29095, 43, 58, 49, 3, -56 }, // 0xD5 + { 29407, 43, 58, 49, 3, -56 }, // 0xD6 + { 29719, 30, 30, 37, 3, -36 }, // 0xD7 + { 29832, 45, 50, 49, 2, -47 }, // 0xD8 + { 30114, 35, 59, 46, 5, -57 }, // 0xD9 + { 30373, 35, 59, 46, 5, -57 }, // 0xDA + { 30632, 35, 59, 46, 5, -57 }, // 0xDB + { 30891, 35, 58, 46, 5, -56 }, // 0xDC + { 31145, 42, 58, 42, 0, -57 }, // 0xDD + { 31450, 34, 45, 42, 5, -44 }, // 0xDE + { 31642, 32, 47, 38, 4, -45 }, // 0xDF + { 31830, 31, 47, 35, 2, -45 }, // 0xE0 + { 32013, 31, 47, 35, 2, -45 }, // 0xE1 + { 32196, 31, 47, 35, 2, -45 }, // 0xE2 + { 32379, 31, 46, 35, 2, -44 }, // 0xE3 + { 32558, 31, 46, 35, 2, -44 }, // 0xE4 + { 32737, 31, 50, 35, 2, -48 }, // 0xE5 + { 32931, 50, 35, 56, 3, -33 }, // 0xE6 + { 33150, 30, 45, 35, 3, -33 }, // 0xE7 + { 33319, 31, 47, 35, 2, -45 }, // 0xE8 + { 33502, 31, 47, 35, 2, -45 }, // 0xE9 + { 33685, 31, 47, 35, 2, -45 }, // 0xEA + { 33868, 31, 46, 35, 2, -44 }, // 0xEB + { 34047, 14, 46, 18, -1, -45 }, // 0xEC + { 34128, 14, 46, 18, 4, -45 }, // 0xED + { 34209, 21, 46, 18, -2, -45 }, // 0xEE + { 34330, 21, 45, 18, -2, -44 }, // 0xEF + { 34449, 33, 46, 38, 3, -44 }, // 0xF0 + { 34639, 30, 45, 38, 4, -44 }, // 0xF1 + { 34808, 33, 47, 38, 3, -45 }, // 0xF2 + { 35002, 33, 47, 38, 3, -45 }, // 0xF3 + { 35196, 33, 47, 38, 3, -45 }, // 0xF4 + { 35390, 33, 46, 38, 3, -44 }, // 0xF5 + { 35580, 33, 46, 38, 3, -44 }, // 0xF6 + { 35770, 31, 32, 35, 2, -37 }, // 0xF7 + { 35894, 33, 38, 38, 3, -35 }, // 0xF8 + { 36051, 30, 47, 38, 4, -45 }, // 0xF9 + { 36228, 30, 47, 38, 4, -45 }, // 0xFA + { 36405, 30, 47, 38, 4, -45 }, // 0xFB + { 36582, 30, 46, 38, 4, -44 }, // 0xFC + { 36755, 34, 60, 35, 0, -45 }, // 0xFD + { 37010, 32, 58, 38, 4, -44 }, // 0xFE + { 37242, 34, 59, 35, 0, -44 } }; // 0xFF + +const GFXfont myFont32pt8b PROGMEM = { + (uint8_t *)myFont32pt8bBitmaps, + (GFXglyph *)myFont32pt8bGlyphs, + 0x20, 0xFF, 72 }; + +// Approx. 39068 bytes diff --git a/examples/320 x 240/TFT_Flash_Bitmap/Alert.h b/examples/Generic/TFT_Flash_Bitmap/Alert.h similarity index 99% rename from examples/320 x 240/TFT_Flash_Bitmap/Alert.h rename to examples/Generic/TFT_Flash_Bitmap/Alert.h index 44196a9..0e5a895 100644 --- a/examples/320 x 240/TFT_Flash_Bitmap/Alert.h +++ b/examples/Generic/TFT_Flash_Bitmap/Alert.h @@ -38,4 +38,3 @@ const unsigned short alert[1024] PROGMEM={ 0xECA2,0xECA2,0xECC2,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4E1,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E2,0xF4E1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xF4C1,0xECC2,0xECC3,0xECA2, // row 29, 960 pixels 0x8AC1,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0xEC82,0x9B01, // row 30, 992 pixels 0x0000,0x1880,0x51A0,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x8AA1,0x61E0,0x28E0,0x0000}; // row 31, 1024 pixels - diff --git a/examples/320 x 240/TFT_Flash_Bitmap/Close.h b/examples/Generic/TFT_Flash_Bitmap/Close.h similarity index 100% rename from examples/320 x 240/TFT_Flash_Bitmap/Close.h rename to examples/Generic/TFT_Flash_Bitmap/Close.h diff --git a/examples/320 x 240/TFT_Flash_Bitmap/Info.h b/examples/Generic/TFT_Flash_Bitmap/Info.h similarity index 100% rename from examples/320 x 240/TFT_Flash_Bitmap/Info.h rename to examples/Generic/TFT_Flash_Bitmap/Info.h diff --git a/examples/Generic/TFT_Flash_Bitmap/TFT_Flash_Bitmap.ino b/examples/Generic/TFT_Flash_Bitmap/TFT_Flash_Bitmap.ino new file mode 100644 index 0000000..54ac4e7 --- /dev/null +++ b/examples/Generic/TFT_Flash_Bitmap/TFT_Flash_Bitmap.ino @@ -0,0 +1,72 @@ +// Icon images are stored in tabs ^ e.g. Alert.h etc above this line +// more than one icon can be in a header file + +// Arrays containing FLASH images can be created with UTFT library tool: +// (libraries\UTFT\Tools\ImageConverter565.exe) +// Convert to .c format then copy into a new tab + +/* + This sketch demonstrates loading images from arrays stored in program (FLASH) memory. + + Works with TFT_eSPI library here: + https://github.com/Bodmer/TFT_eSPI + + This sketch does not use/need any fonts at all... + + Code derived from ILI9341_due library example + + Make sure all the display driver and pin comnenctions are correct by + editting the User_Setup.h file in the TFT_eSPI library folder. + + ######################################################################### + ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ###### + ######################################################################### +*/ + +#include // Hardware-specific library + +TFT_eSPI tft = TFT_eSPI(); // Invoke custom library + +// Include the header files that contain the icons +#include "Alert.h" +#include "Close.h" +#include "Info.h" + +long count = 0; // Loop count + +void setup() +{ + Serial.begin(115200); + tft.begin(); + tft.setRotation(1); // landscape + + tft.fillScreen(TFT_BLACK); + + // Swap the colour byte order when rendering + tft.setSwapBytes(true); + + // Draw the icons + tft.pushImage(100, 100, infoWidth, infoHeight, info); + tft.pushImage(140, 100, alertWidth, alertHeight, alert); + tft.pushImage(180, 100, closeWidth, closeHeight, closeX); + + // Pause here to admire the icons! + delay(2000); + +} + +void loop() +{ + // Loop filling and clearing screen + tft.pushImage(random(tft.width() - infoWidth), random(tft.height() - infoHeight), infoWidth, infoHeight, info); + tft.pushImage(random(tft.width() - alertWidth), random(tft.height() - alertHeight), alertWidth, alertHeight, alert); + tft.pushImage(random(tft.width() - closeWidth), random(tft.height() - closeHeight), alertWidth, closeHeight, closeX); + + // Clear screen after 100 x 3 = 300 icons drawn + if (1000 == count++) { + count = 1; + tft.setRotation(2 * random(2)); // Rotate randomly to clear display left>right or right>left to reduce monotony! + tft.fillScreen(TFT_BLACK); + tft.setRotation(1); + } +} diff --git a/examples/Generic/TFT_Screen_Capture/TFT_Screen_Capture.ino b/examples/Generic/TFT_Screen_Capture/TFT_Screen_Capture.ino new file mode 100644 index 0000000..50cfc16 --- /dev/null +++ b/examples/Generic/TFT_Screen_Capture/TFT_Screen_Capture.ino @@ -0,0 +1,207 @@ +/* + This sketch has been written to test the Processing screenshot client. + + It has been created to work with the TFT_eSPI library here: + https://github.com/Bodmer/TFT_eSPI + + It sends screenshots to a PC running a Processing client sketch. + + The Processing IDE that will run the client sketch can be downloaded + here: https://processing.org/ + + The Processing sketch needed is contained within a tab attached to this + Arduino sketch. Cut and paste that tab into the Processing IDE and run. + Read the Procesing sketch header for instructions. + + This sketch uses the GLCD, 2, 4, 6 fonts only. + + Make sure all the display driver and pin comnenctions are correct by + editting the User_Setup.h file in the TFT_eSPI library folder. + + Maximum recommended SPI clock rate is 27MHz when reading pixels, 40MHz + seems to be OK with ILI9341 displays but this is above the manufacturers + specifed maximum clock rate. + + In the setup file you can define different write and read SPI clock rates + + In the setup file you can define TFT_SDA_READ for a TFT with bi-directional + SDA pin (otherwise the normal MISO pin will be used to read from the TFT) + + >>>> NOTE: NOT ALL TFTs SUPPORT READING THE CGRAM (pixel) MEMORY <<<< + + ######################################################################### + ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ###### + ######################################################################### +*/ + +// Created by: Bodmer 5/3/17 +// Updated by: Bodmer 10/3/17 +// Updated by: Bodmer 23/11/18 to support SDA reads and the ESP32 +// Version: 0.07 + +// MIT licence applies, all text above must be included in derivative works + +#include // Hardware-specific library +#include + +TFT_eSPI tft = TFT_eSPI(); // Invoke custom library + +unsigned long targetTime = 0; +byte red = 0x1F; +byte green = 0; +byte blue = 0; +byte state = 0; +unsigned int colour = red << 11; // Colour order is RGB 5+6+5 bits each + +void setup(void) { + Serial.begin(921600); // Set to a high rate for fast image transfer to a PC + + tft.init(); + tft.setRotation(0); + tft.fillScreen(TFT_BLACK); + + randomSeed(analogRead(A0)); + + targetTime = millis() + 1000; +} + +#define RGB_TEST false // true produces a simple RGB color test screen + +void loop() { + + if (targetTime < millis()) { + if (!RGB_TEST) + { + targetTime = millis() + 1500; // Wait a minimum of 1.5s + + tft.setRotation(random(4)); + rainbow_fill(); // Fill the screen with rainbow colours + + tft.setTextColor(TFT_BLACK); // Text background is not defined so it is transparent + tft.setTextDatum(TC_DATUM); // Top Centre datum + int xpos = tft.width() / 2; // Centre of screen + + tft.setTextFont(0); // Select font 0 which is the Adafruit font + tft.drawString("Original Adafruit font!", xpos, 5); + + // The new larger fonts do not need to use the .setCursor call, coords are embedded + tft.setTextColor(TFT_BLACK); // Do not plot the background colour + + // Overlay the black text on top of the rainbow plot (the advantage of not drawing the backgorund colour!) + tft.drawString("Font size 2", xpos, 14, 2); // Draw text centre at position xpos, 14 using font 2 + tft.drawString("Font size 4", xpos, 30, 4); // Draw text centre at position xpos, 30 using font 4 + tft.drawString("12.34", xpos, 54, 6); // Draw text centre at position xpos, 54 using font 6 + + tft.drawString("12.34 is in font size 6", xpos, 92, 2); // Draw text centre at position xpos, 92 using font 2 + // Note the x position is the top of the font! + + // draw a floating point number + float pi = 3.1415926; // Value to print + int precision = 3; // Number of digits after decimal point + + int ypos = 110; // y position + + tft.setTextDatum(TR_DATUM); // Top Right datum so text butts neatly to xpos (right justified) + + tft.drawFloat(pi, precision, xpos, ypos, 2); // Draw rounded number and return new xpos delta for next print position + + tft.setTextDatum(TL_DATUM); // Top Left datum so text butts neatly to xpos (left justified) + + tft.drawString(" is pi", xpos, ypos, 2); + + tft.setTextSize(1); // We are using a font size multiplier of 1 + tft.setTextDatum(TC_DATUM); // Top Centre datum + tft.setTextColor(TFT_BLACK); // Set text colour to black, no background (so transparent) + + tft.drawString("Transparent...", xpos, 125, 4); // Font 4 + + tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set text colour to white and background to black + tft.drawString("White on black", xpos, 150, 4); // Font 4 + + tft.setTextColor(TFT_GREEN, TFT_BLACK); // This time we will use green text on a black background + + tft.setTextFont(2); // Select font 2, now we do not need to specify the font in drawString() + + // An easier way to position text and blank old text is to set the datum and use width padding + tft.setTextDatum(BC_DATUM); // Bottom centre for text datum + tft.setTextPadding(tft.width() + 1); // Pad text to full screen width + 1 spare for +/-1 position rounding + + tft.drawString("Ode to a Small Lump of Green Putty", xpos, 230 - 32); + tft.drawString("I Found in My Armpit One Midsummer", xpos, 230 - 16); + tft.drawString("Morning", xpos, 230); + + tft.setTextDatum(TL_DATUM); // Reset to top left for text datum + tft.setTextPadding(0); // Reset text padding to 0 pixels + + // Now call the screen server to send a copy of the TFT screen to the PC running the Processing client sketch + screenServer(); + } + else + { + tft.fillScreen(TFT_BLACK); + tft.fillRect( 0, 0, 16, 16, TFT_RED); + tft.fillRect(16, 0, 16, 16, TFT_GREEN); + tft.fillRect(32, 0, 16, 16, TFT_BLUE); + screenServer(); + } + } +} + +// Fill screen with a rainbow pattern +void rainbow_fill() +{ + // The colours and state are not initialised so the start colour changes each time the funtion is called + int rotation = tft.getRotation(); + tft.setRotation(random(4)); + for (int i = tft.height() - 1; i >= 0; i--) { + // This is a "state machine" that ramps up/down the colour brightnesses in sequence + switch (state) { + case 0: + green ++; + if (green == 64) { + green = 63; + state = 1; + } + break; + case 1: + red--; + if (red == 255) { + red = 0; + state = 2; + } + break; + case 2: + blue ++; + if (blue == 32) { + blue = 31; + state = 3; + } + break; + case 3: + green --; + if (green == 255) { + green = 0; + state = 4; + } + break; + case 4: + red ++; + if (red == 32) { + red = 31; + state = 5; + } + break; + case 5: + blue --; + if (blue == 255) { + blue = 0; + state = 0; + } + break; + } + colour = red << 11 | green << 5 | blue; + // Draw a line 1 pixel wide in the selected colour + tft.drawFastHLine(0, i, tft.width(), colour); // tft.width() returns the pixel width of the display + } + tft.setRotation(rotation); +} diff --git a/examples/320 x 240/TFT_Screen_Capture/processing_sketch.ino b/examples/Generic/TFT_Screen_Capture/processing_sketch.ino similarity index 100% rename from examples/320 x 240/TFT_Screen_Capture/processing_sketch.ino rename to examples/Generic/TFT_Screen_Capture/processing_sketch.ino diff --git a/examples/320 x 240/TFT_Screen_Capture/screenServer.ino b/examples/Generic/TFT_Screen_Capture/screenServer.ino similarity index 89% rename from examples/320 x 240/TFT_Screen_Capture/screenServer.ino rename to examples/Generic/TFT_Screen_Capture/screenServer.ino index 962d561..2924947 100644 --- a/examples/320 x 240/TFT_Screen_Capture/screenServer.ino +++ b/examples/Generic/TFT_Screen_Capture/screenServer.ino @@ -11,16 +11,14 @@ // Created by: Bodmer 27/1/17 // Updated by: Bodmer 10/3/17 -// Version: 0.07 +// Updated by: Bodmer 23/11/18 to support SDA reads and the ESP32 +// Version: 0.08 // MIT licence applies, all text above must be included in derivative works //==================================================================================== // Definitions //==================================================================================== -#define BAUD_RATE 250000 // Maximum Serial Monitor rate for other messages -#define DUMP_BAUD_RATE 921600 // Rate used for screen dumps - #define PIXEL_TIMEOUT 100 // 100ms Time-out between pixel requests #define START_TIMEOUT 10000 // 10s Maximum time to wait at start transfer @@ -33,14 +31,17 @@ #define FILE_TYPE "png" // jpg, bmp, png, tif are valid // Filename extension -// '#' = add 0-9, '@' = add timestamp, '%' add millis() timestamp, '*' = add nothing +// '#' = add incrementing number, '@' = add timestamp, '%' add millis() timestamp, +// '*' = add nothing // '@' and '%' will generate new unique filenames, so beware of cluttering up your // hard drive with lots of images! The PC client sketch is set to limit the number of // saved images to 1000 and will then prompt for a restart. -#define FILE_EXT '%' +#define FILE_EXT '@' // Number of pixels to send in a burst (minimum of 1), no benefit above 8 -// NPIXELS values and render times: 1 = 5.0s, 2 = 1.75s, 4 = 1.68s, 8 = 1.67s +// NPIXELS values and render times: +// NPIXELS 1 = use readPixel() = >5s and 16 bit pixels only +// NPIXELS >1 using rectRead() 2 = 1.75s, 4 = 1.68s, 8 = 1.67s #define NPIXELS 8 // Must be integer division of both TFT width and TFT height //==================================================================================== @@ -60,16 +61,12 @@ boolean screenServer(void) // Start a screen dump server (serial or network) - filename specified boolean screenServer(String filename) { - Serial.end(); // Stop the serial port (clears buffers too) - Serial.begin(DUMP_BAUD_RATE); // Force baud rate to be high delay(0); // Equivalent to yield() for ESP8266; boolean result = serialScreenServer(filename); // Screenshot serial port server //boolean result = wifiScreenServer(filename); // Screenshot WiFi UDP port server (WIP) - Serial.end(); // Stop the serial port (clears buffers too) - Serial.begin(BAUD_RATE); // Return baud rate to normal - delay(0); // Equivalent to yield() for ESP8266; + delay(0); // Equivalent to yield() //Serial.println(); //if (result) Serial.println(F("Screen dump passed :-)")); @@ -146,14 +143,20 @@ boolean serialScreenServer(String filename) // Save arrival time of the read command (for later time-out check) lastCmdTime = millis(); -#if defined BITS_PER_PIXEL && BITS_PER_PIXEL >= 24 +#if defined BITS_PER_PIXEL && BITS_PER_PIXEL >= 24 && NPIXELS > 1 // Fetch N RGB pixels from x,y and put in buffer tft.readRectRGB(x, y, NPIXELS, 1, color); // Send buffer to client Serial.write(color, 3 * NPIXELS); // Write all pixels in the buffer #else // Fetch N 565 format pixels from x,y and put in buffer - tft.readRect(x, y, NPIXELS, 1, (uint16_t *)color); + if (NPIXELS > 1) tft.readRect(x, y, NPIXELS, 1, (uint16_t *)color); + else + { + uint16_t c = tft.readPixel(x, y); + color[0] = c>>8; + color[1] = c & 0xFF; // Swap bytes + } // Send buffer to client Serial.write(color, 2 * NPIXELS); // Write all pixels in the buffer #endif @@ -179,7 +182,8 @@ void sendParameters(String filename) Serial.write(tft.height() & 0xFF); Serial.write('Y'); // Bits per pixel (16 or 24) - Serial.write(BITS_PER_PIXEL); + if (NPIXELS > 1) Serial.write(BITS_PER_PIXEL); + else Serial.write(16); // readPixel() only provides 16 bit values Serial.write('?'); // Filename next Serial.print(filename); @@ -190,5 +194,3 @@ void sendParameters(String filename) Serial.write(*FILE_TYPE); // First character defines file type j,b,p,t } - - diff --git a/examples/Smooth Fonts/ESP32_Smooth_Font_SD/ESP32_Smooth_Font_SD.ino b/examples/Smooth Fonts/ESP32_Smooth_Font_SD/ESP32_Smooth_Font_SD.ino new file mode 100644 index 0000000..c6dbb19 --- /dev/null +++ b/examples/Smooth Fonts/ESP32_Smooth_Font_SD/ESP32_Smooth_Font_SD.ino @@ -0,0 +1,174 @@ +/* + Sketch to demonstrate using the print class with smooth fonts + that are saved onto an SD Card accessed by the SD library. + + For ESP32 only, GPIO 5 must be used for SD chip select. + This method of storing the fonts is NOT compatible with the ESP8266. + + Sketch is written for a 240 x 320 display + + Load the font file onto the root directory of the SD Card. The font files + used by this sketch can be found in the Data folder, press Ctrl+K to see it. + + The library supports 16 bit unicode characters: + https://en.wikipedia.org/wiki/Unicode_font + + The characters supported are in the in the Basic Multilingal Plane: + https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane + + Make sure all the display driver and pin connenctions are correct by + editting the User_Setup.h file in the TFT_eSPI library folder. + + ######################################################################### + ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ###### + ######################################################################### +*/ + +// Font file is stored on SD card +#include + +// Graphics and font library +#include +#include + +TFT_eSPI tft = TFT_eSPI(); // Invoke library + +// ------------------------------------------------------------------------- +// Setup +// ------------------------------------------------------------------------- +void setup(void) { + Serial.begin(115200); // Used for messages + + // Initialise the SD library before the TFT so the chip select is defined + if (!SD.begin()) { + Serial.println("Card Mount Failed"); + return; + } + uint8_t cardType = SD.cardType(); + + if (cardType == CARD_NONE) { + Serial.println("No SD card attached"); + return; + } + + Serial.print("SD Card Type: "); + if (cardType == CARD_MMC) { + Serial.println("MMC"); + } else if (cardType == CARD_SD) { + Serial.println("SDSC"); + } else if (cardType == CARD_SDHC) { + Serial.println("SDHC"); + } else { + Serial.println("UNKNOWN"); + } + + uint64_t cardSize = SD.cardSize() / (1024 * 1024); + Serial.printf("SD Card Size: %lluMB\n", cardSize); + + // Initialise the TFT after the SD card! + tft.init(); + tft.setRotation(1); + tft.fillScreen(TFT_BLACK); + + listDir(SD, "/", 0); + + Serial.println("SD and TFT initialisation done."); +} + +// ------------------------------------------------------------------------- +// Main loop +// ------------------------------------------------------------------------- +void loop() { + // Wrap test at right and bottom of screen + tft.setTextWrap(true, true); + + // Name of font file (library adds leading / and .vlw) + String fileName = "Final-Frontier-28"; + + // Font and background colour, background colour is used for anti-alias blending + tft.setTextColor(TFT_WHITE, TFT_BLACK); + + // Load the font + tft.loadFont(fileName, SD); // Use font stored on SD + + // Display all characters of the font + tft.showFont(2000); + + uint32_t dt = millis(); + + int count = 100; + + while (count--) + { + // Set "cursor" at top left corner of display (0,0) + // (cursor will move to next line automatically during printing with 'tft.println' + // or stay on the line is there is room for the text with tft.print) + tft.setCursor(0, 0); + + // Set the font colour to be white with a black background, set text size multiplier to 1 + tft.setTextColor(TFT_WHITE, TFT_BLACK); + + // We can now plot text on screen using the "print" class + tft.println("Hello World!"); + + // Set the font colour to be yellow + tft.setTextColor(TFT_YELLOW, TFT_BLACK); + tft.println(1234.56); + + // Set the font colour to be red + tft.setTextColor(TFT_RED, TFT_BLACK); + tft.println((uint32_t)3735928559, HEX); // Should print DEADBEEF + + // Set the font colour to be green with black background + tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.println("Anti-aliased font!"); + tft.println(""); + + // Test some print formatting functions + float fnumber = 123.45; + + // Set the font colour to be blue + tft.setTextColor(TFT_BLUE, TFT_BLACK); + tft.print("Float = "); tft.println(fnumber); // Print floating point number + tft.print("Binary = "); tft.println((int)fnumber, BIN); // Print as integer value in binary + tft.print("Hexadecimal = "); tft.println((int)fnumber, HEX); // Print as integer number in Hexadecimal + } + + Serial.println(millis()-dt); + + // Unload the font to recover used RAM + tft.unloadFont(); + + delay(10000); +} + +void listDir(fs::FS &fs, const char * dirname, uint8_t levels){ + Serial.printf("Listing directory: %s\n", dirname); + + File root = fs.open(dirname); + if(!root){ + Serial.println("Failed to open directory"); + return; + } + if(!root.isDirectory()){ + Serial.println("Not a directory"); + return; + } + + File file = root.openNextFile(); + while(file){ + if(file.isDirectory()){ + Serial.print(" DIR : "); + Serial.println(file.name()); + if(levels){ + listDir(fs, file.name(), levels -1); + } + } else { + Serial.print(" FILE: "); + Serial.print(file.name()); + Serial.print(" SIZE: "); + Serial.println(file.size()); + } + file = root.openNextFile(); + } +} diff --git a/examples/Smooth Fonts/ESP32_Smooth_Font_SD/data/Final-Frontier-28.vlw b/examples/Smooth Fonts/ESP32_Smooth_Font_SD/data/Final-Frontier-28.vlw new file mode 100644 index 0000000..2872fd5 Binary files /dev/null and b/examples/Smooth Fonts/ESP32_Smooth_Font_SD/data/Final-Frontier-28.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_1/Font_Demo_1.ino b/examples/Smooth Fonts/Font_Demo_1/Font_Demo_1.ino new file mode 100644 index 0000000..e38a5ee --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_1/Font_Demo_1.ino @@ -0,0 +1,182 @@ +/* + There are four different methods of plotting anti-aliased fonts to the screen. + + This sketch uses method 1, using tft.print() and tft.println() calls. + + In some cases the sketch shows what can go wrong too, so read the comments! + + The font is rendered WITHOUT a background, but a background colour needs to be + set so the anti-aliasing of the character is performed correctly. This is because + characters are drawn one by one. + + This method is good for static text that does not change often because changing + values may flicker. The text appears at the tft cursor coordinates. + + It is also possible to "print" text directly into a created sprite, for example using + spr.println("Hello"); and then push the sprite to the screen. That method is not + demonstrated in this sketch. + +*/ +// The fonts used are in the sketch data folder, press Ctrl+K to view. + +// Upload the fonts and icons to SPIFFS (must set at least 1M for SPIFFS) using the +// "Tools" "ESP8266 (or ESP32) Sketch Data Upload" menu option in the IDE. +// To add this option follow instructions here for the ESP8266: +// https://github.com/esp8266/arduino-esp8266fs-plugin +// or for the ESP32: +// https://github.com/me-no-dev/arduino-esp32fs-plugin + +// Close the IDE and open again to see the new menu option. + +// A processing sketch to create new fonts can be found in the Tools folder of TFT_eSPI +// https://github.com/Bodmer/TFT_eSPI/tree/master/Tools/Create_Smooth_Font/Create_font + +// This sketch uses font files created from the Noto family of fonts: +// https://www.google.com/get/noto/ + +#define AA_FONT_SMALL "NotoSansBold15" +#define AA_FONT_LARGE "NotoSansBold36" + +// Font files are stored in SPIFFS, so load the linbrary +#include + +#include +#include // Hardware-specific library + +TFT_eSPI tft = TFT_eSPI(); + + +void setup(void) { + + Serial.begin(250000); + + tft.begin(); + + tft.setRotation(0); + + if (!SPIFFS.begin()) { + Serial.println("SPIFFS initialisation failed!"); + while (1) yield(); // Stay here twiddling thumbs waiting + } + Serial.println("\r\nSPIFFS available!"); + + // ESP32 will crash if any of the fonts are missing + bool font_missing = false; + if (SPIFFS.exists("/NotoSansBold15.vlw") == false) font_missing = true; + if (SPIFFS.exists("/NotoSansBold36.vlw") == false) font_missing = true; + + if (font_missing) + { + Serial.println("\r\nFont missing in SPIFFS, did you upload it?"); + while(1) yield(); + } + else Serial.println("\r\nFonts found OK."); +} + + +void loop() { + + tft.fillScreen(TFT_BLACK); + + tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set the font colour AND the background colour + // so the anti-aliasing works + + tft.setCursor(0, 0); // Set cursor at top left of screen + + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Small font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.loadFont(AA_FONT_SMALL); // Must load the font first + + tft.println("Small 15pt font"); // println moves cursor down for a new line + + tft.println(); // New line + + tft.print("ABC"); // print leaves cursor at end of line + + tft.setTextColor(TFT_CYAN, TFT_BLACK); + tft.println("1234"); // Added to line after ABC + + tft.setTextColor(TFT_YELLOW, TFT_BLACK); + // print stream formatting can be used,see: + // https://www.arduino.cc/en/Serial/Print + int ivalue = 1234; + tft.println(ivalue); // print as an ASCII-encoded decimal + tft.println(ivalue, DEC); // print as an ASCII-encoded decimal + tft.println(ivalue, HEX); // print as an ASCII-encoded hexadecimal + tft.println(ivalue, OCT); // print as an ASCII-encoded octal + tft.println(ivalue, BIN); // print as an ASCII-encoded binary + + tft.println(); // New line + tft.setTextColor(TFT_MAGENTA, TFT_BLACK); + float fvalue = 1.23456; + tft.println(fvalue, 0); // no decimal places + tft.println(fvalue, 1); // 1 decimal place + tft.println(fvalue, 2); // 2 decimal places + tft.println(fvalue, 5); // 5 decimal places + + delay(5000); + + // Get ready for the next demo while we have this font loaded + tft.fillScreen(TFT_BLACK); + tft.setCursor(0, 0); // Set cursor at top left of screen + tft.setTextColor(TFT_WHITE, TFT_BLACK); + tft.println("Wrong and right ways to"); + tft.println("print changing values..."); + + tft.unloadFont(); // Remove the font to recover memory used + + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Large font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.loadFont(AA_FONT_LARGE); // Load another different font + + //tft.fillScreen(TFT_BLACK); + + // Draw changing numbers - does not work unless a filled rectangle is drawn over the old text + for (int i = 0; i <= 20; i++) + { + tft.setCursor(50, 50); + tft.print(" "); // Overprinting old number with spaces DOES NOT WORK! + tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.setCursor(50, 50); + tft.print(i / 10.0, 1); + + tft.fillRect (50, 90, 60, 40, TFT_BLACK); // Overprint with a filled rectangle + tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.setCursor(50, 90); + tft.print(i / 10.0, 1); + + delay (200); + } + + delay(5000); + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Large font text wrapping + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.fillScreen(TFT_BLACK); + + tft.setTextColor(TFT_YELLOW, TFT_BLACK); // Change the font colour and the background colour + + tft.setCursor(0, 0); // Set cursor at top left of screen + + tft.println("Large font!"); + + tft.setTextWrap(true); // Wrap on width + tft.setTextColor(TFT_CYAN, TFT_BLACK); + tft.println("Long lines wrap to the next line"); + + tft.setTextWrap(false, false); // Wrap on width and height switched off + tft.setTextColor(TFT_MAGENTA, TFT_BLACK); + tft.println("Unless text wrap is switched off"); + + tft.unloadFont(); // Remove the font to recover memory used + + delay(8000); +} diff --git a/examples/Smooth Fonts/Font_Demo_1/Notes.ino b/examples/Smooth Fonts/Font_Demo_1/Notes.ino new file mode 100644 index 0000000..f04f2b7 --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_1/Notes.ino @@ -0,0 +1,56 @@ +/* + +Information notes only: +====================== + +//These are the text plotting alignment (reference datum point) + +TL_DATUM = Top left (default) +TC_DATUM = Top centre +TR_DATUM = Top right + +ML_DATUM = Middle left +MC_DATUM = Middle centre +MR_DATUM = Middle right + +BL_DATUM = Bottom left +BC_DATUM = Bottom centre +BR_DATUM = Bottom right + +L_BASELINE = Left character baseline (Line the 'A' character would sit on) +C_BASELINE = Centre character baseline +R_BASELINE = Right character baseline + +// Basic colours already defined: + +TFT_BLACK 0x0000 +TFT_NAVY 0x000F +TFT_DARKGREEN 0x03E0 +TFT_DARKCYAN 0x03EF +TFT_MAROON 0x7800 +TFT_PURPLE 0x780F +TFT_OLIVE 0x7BE0 +TFT_LIGHTGREY 0xC618 +TFT_DARKGREY 0x7BEF +TFT_BLUE 0x001F +TFT_GREEN 0x07E0 +TFT_CYAN 0x07FF +TFT_RED 0xF800 +TFT_MAGENTA 0xF81F +TFT_YELLOW 0xFFE0 +TFT_WHITE 0xFFFF +TFT_ORANGE 0xFDA0 +TFT_GREENYELLOW 0xB7E0 +TFT_PINK 0xFC9F + + + + + + + + + + + + */ diff --git a/examples/Smooth Fonts/Font_Demo_1/data/NotoSansBold15.vlw b/examples/Smooth Fonts/Font_Demo_1/data/NotoSansBold15.vlw new file mode 100644 index 0000000..803a1bd Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_1/data/NotoSansBold15.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_1/data/NotoSansBold36.vlw b/examples/Smooth Fonts/Font_Demo_1/data/NotoSansBold36.vlw new file mode 100644 index 0000000..66003f6 Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_1/data/NotoSansBold36.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_2/Font_Demo_2.ino b/examples/Smooth Fonts/Font_Demo_2/Font_Demo_2.ino new file mode 100644 index 0000000..6dbf769 --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_2/Font_Demo_2.ino @@ -0,0 +1,231 @@ +/* + There are four different methods of plotting anti-aliased fonts to the screen. + + This sketch uses method 2, using graphics calls plotting direct to the TFT: + tft.drawString(string, x, y); + tft.drawNumber(integer, x, y); + tft.drawFloat(float, dp, x, y); // dp = number of decimal places + + setTextDatum() and setTextPadding() functions work with those draw functions. + + This method is good for static text that does not change often because changing + values may flicker. + +*/ +// The fonts used are in the sketch data folder, press Ctrl+K to view. + +// Upload the fonts and icons to SPIFFS (must set at least 1M for SPIFFS) using the +// "Tools" "ESP8266 (or ESP32) Sketch Data Upload" menu option in the IDE. +// To add this option follow instructions here for the ESP8266: +// https://github.com/esp8266/arduino-esp8266fs-plugin +// or for the ESP32: +// https://github.com/me-no-dev/arduino-esp32fs-plugin + +// Close the IDE and open again to see the new menu option. + +// A processing sketch to create new fonts can be found in the Tools folder of TFT_eSPI +// https://github.com/Bodmer/TFT_eSPI/tree/master/Tools/Create_Smooth_Font/Create_font + +// This sketch uses font files created from the Noto family of fonts: +// https://www.google.com/get/noto/ + +#define AA_FONT_SMALL "NotoSansBold15" +#define AA_FONT_LARGE "NotoSansBold36" + +// Font files are stored in SPIFFS, so load the linbrary +#include + +#include +#include // Hardware-specific library + +TFT_eSPI tft = TFT_eSPI(); + +void setup(void) { + + Serial.begin(250000); + + tft.begin(); + + tft.setRotation(1); + + if (!SPIFFS.begin()) { + Serial.println("SPIFFS initialisation failed!"); + while (1) yield(); // Stay here twiddling thumbs waiting + } + Serial.println("\r\nSPIFFS available!"); + + // ESP32 will crash if any of the fonts are missing + bool font_missing = false; + if (SPIFFS.exists("/NotoSansBold15.vlw") == false) font_missing = true; + if (SPIFFS.exists("/NotoSansBold36.vlw") == false) font_missing = true; + + if (font_missing) + { + Serial.println("\r\nFont missing in SPIFFS, did you upload it?"); + while(1) yield(); + } + else Serial.println("\r\nFonts found OK."); +} + +void loop() { + + tft.fillScreen(TFT_BLACK); + + tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set the font colour and the background colour + + tft.setTextDatum(TC_DATUM); // Top Centre datum + + int xpos = tft.width() / 2; // Half the screen width + int ypos = 10; + + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Small font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.loadFont(AA_FONT_SMALL); // Must load the font first + + tft.drawString("Small 15pt font", xpos, ypos); + + ypos += tft.fontHeight(); // Get the font height and move ypos down + + tft.setTextColor(TFT_GREEN, TFT_BLACK); + + // If the string does not fit the screen width, then the next character will wrap to a new line + tft.drawString("Ode To A Small Lump Of Green Putty I Found In My Armpit One Midsummer Morning", xpos, ypos); + + tft.setTextColor(TFT_GREEN, TFT_BLUE); // Background colour does not match the screen background! + tft.drawString("Anti-aliasing causes odd looking shadow effects if the text and screen background colours are not the same!", xpos, ypos + 60); + + tft.unloadFont(); // Remove the font to recover memory used + + delay(5000); + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Large font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.loadFont(AA_FONT_LARGE); // Load another different font + + tft.fillScreen(TFT_BLACK); + + tft.setTextColor(TFT_GREEN, TFT_BLUE); // Change the font colour and the background colour + + tft.drawString("36pt font", xpos, ypos); + + ypos += tft.fontHeight(); // Get the font height and move ypos down + + // Set text padding to 100 pixels wide area to over-write old values on screen + tft.setTextPadding(100); + + // Draw changing numbers - likely to flicker using this plot method! + for (int i = 0; i <= 20; i++) { + tft.drawFloat(i / 10.0, 1, xpos, ypos); + delay (200); + } + + tft.unloadFont(); // Remove the font to recover memory used + + delay(5000); + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Setting the 12 datum positions works with free fonts + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + // Integer numbers, floats and strings can be drawn relative to a x,y datum, e.g.: + // tft.drawNumber( 123, x, y); + // tft.drawFloat( 1.23, dp, x, y); // Where dp is number of decimal places to show + // tft.drawString( "Abc", x, y); + + tft.fillScreen(TFT_BLACK); + + tft.setTextColor(TFT_DARKGREY, TFT_BLACK); + + // Use middle of screen as datum + xpos = tft.width() /2; + ypos = tft.height()/2; + + tft.loadFont(AA_FONT_SMALL); + tft.setTextDatum(TL_DATUM); + tft.drawString("[Top left]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(TC_DATUM); + tft.drawString("[Top centre]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(TR_DATUM); + tft.drawString("[Top right]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(ML_DATUM); + tft.drawString("[Middle left]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(MC_DATUM); + tft.drawString("[Middle centre]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(MR_DATUM); + tft.drawString("[Middle right]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(BL_DATUM); + tft.drawString("[Bottom left]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(BC_DATUM); + tft.drawString("[Bottom centre]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(BR_DATUM); + tft.drawString("[Bottom right]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(L_BASELINE); + tft.drawString("[Left baseline]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(C_BASELINE); + tft.drawString("[Centre baseline]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.fillScreen(TFT_BLACK); + tft.setTextDatum(R_BASELINE); + tft.drawString("[Right baseline]", xpos, ypos); + drawDatumMarker(xpos, ypos); + delay(1000); + + tft.unloadFont(); // Remove the font to recover memory used + + delay(4000); + +} + +// Draw a + mark centred on x,y +void drawDatumMarker(int x, int y) +{ + tft.drawLine(x - 5, y, x + 5, y, TFT_GREEN); + tft.drawLine(x, y - 5, x, y + 5, TFT_GREEN); +} diff --git a/examples/Smooth Fonts/Font_Demo_2/Notes.ino b/examples/Smooth Fonts/Font_Demo_2/Notes.ino new file mode 100644 index 0000000..f04f2b7 --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_2/Notes.ino @@ -0,0 +1,56 @@ +/* + +Information notes only: +====================== + +//These are the text plotting alignment (reference datum point) + +TL_DATUM = Top left (default) +TC_DATUM = Top centre +TR_DATUM = Top right + +ML_DATUM = Middle left +MC_DATUM = Middle centre +MR_DATUM = Middle right + +BL_DATUM = Bottom left +BC_DATUM = Bottom centre +BR_DATUM = Bottom right + +L_BASELINE = Left character baseline (Line the 'A' character would sit on) +C_BASELINE = Centre character baseline +R_BASELINE = Right character baseline + +// Basic colours already defined: + +TFT_BLACK 0x0000 +TFT_NAVY 0x000F +TFT_DARKGREEN 0x03E0 +TFT_DARKCYAN 0x03EF +TFT_MAROON 0x7800 +TFT_PURPLE 0x780F +TFT_OLIVE 0x7BE0 +TFT_LIGHTGREY 0xC618 +TFT_DARKGREY 0x7BEF +TFT_BLUE 0x001F +TFT_GREEN 0x07E0 +TFT_CYAN 0x07FF +TFT_RED 0xF800 +TFT_MAGENTA 0xF81F +TFT_YELLOW 0xFFE0 +TFT_WHITE 0xFFFF +TFT_ORANGE 0xFDA0 +TFT_GREENYELLOW 0xB7E0 +TFT_PINK 0xFC9F + + + + + + + + + + + + */ diff --git a/examples/Smooth Fonts/Font_Demo_2/data/NotoSansBold15.vlw b/examples/Smooth Fonts/Font_Demo_2/data/NotoSansBold15.vlw new file mode 100644 index 0000000..803a1bd Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_2/data/NotoSansBold15.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_2/data/NotoSansBold36.vlw b/examples/Smooth Fonts/Font_Demo_2/data/NotoSansBold36.vlw new file mode 100644 index 0000000..66003f6 Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_2/data/NotoSansBold36.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_3/Font_Demo_3.ino b/examples/Smooth Fonts/Font_Demo_3/Font_Demo_3.ino new file mode 100644 index 0000000..ebc2055 --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_3/Font_Demo_3.ino @@ -0,0 +1,231 @@ +/* + There are four different methods of plotting anti-aliased fonts to the screen. + + This sketch uses method 3, the font characters are first plotted in a Sprite, then the + Sprite is pushed to the screen. This method is very flexible and the Sprite can be + created, deleted, resized as needed. To render anit-aliased fonts well the Sprite + needs to be 16 bit. The fonts will render in 1 bit per pixel sprites but there + will then be no anti-aliasing. Using 1 bit per pixel Sprites is however useful + to use the extended Unicode range in fonts on mono displays like ePaper. + + A single Sprite can be re-used for plotting different values and graphics to + different positions on the screen. This makes this method a very powerful display tool, + for example round buttons can be created, making use of transparent colour plotting. + +*/ +// The fonts used are in the sketch data folder, press Ctrl+K to view. + +// Upload the fonts and icons to SPIFFS (must set at least 1M for SPIFFS) using the +// "Tools" "ESP8266 (or ESP32) Sketch Data Upload" menu option in the IDE. +// To add this option follow instructions here for the ESP8266: +// https://github.com/esp8266/arduino-esp8266fs-plugin +// or for the ESP32: +// https://github.com/me-no-dev/arduino-esp32fs-plugin + +// Close the IDE and open again to see the new menu option. + +// A processing sketch to create new fonts can be found in the Tools folder of TFT_eSPI +// https://github.com/Bodmer/TFT_eSPI/tree/master/Tools/Create_Smooth_Font/Create_font + +// This sketch uses font files created from the Noto family of fonts: +// https://www.google.com/get/noto/ + +#define AA_FONT_SMALL "NotoSansBold15" +#define AA_FONT_LARGE "NotoSansBold36" +#define AA_FONT_MONO "NotoSansMonoSCB20" // NotoSansMono-SemiCondensedBold 20pt +// Font files are stored in SPIFFS, so load the linbrary +#include + +#include +#include // Hardware-specific library + +TFT_eSPI tft = TFT_eSPI(); +TFT_eSprite spr = TFT_eSprite(&tft); // Sprite class needs to be invoked + +void setup(void) { + + Serial.begin(250000); + + tft.begin(); + + tft.setRotation(1); + + spr.setColorDepth(16); // 16 bit colour needed to show antialiased fonts + + if (!SPIFFS.begin()) { + Serial.println("SPIFFS initialisation failed!"); + while (1) yield(); // Stay here twiddling thumbs waiting + } + Serial.println("\r\nSPIFFS available!"); + + // ESP32 will crash if any of the fonts are missing + bool font_missing = false; + if (SPIFFS.exists("/NotoSansBold15.vlw") == false) font_missing = true; + if (SPIFFS.exists("/NotoSansBold36.vlw") == false) font_missing = true; + if (SPIFFS.exists("/NotoSansMonoSCB20.vlw") == false) font_missing = true; + + if (font_missing) + { + Serial.println("\r\nFont missing in SPIFFS, did you upload it?"); + while(1) yield(); + } + else Serial.println("\r\nFonts found OK."); +} + +void loop() { + + tft.fillScreen(TFT_DARKGREY); + + int xpos = tft.width() / 2; // Half the screen width + int ypos = 50; + + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Small font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + spr.loadFont(AA_FONT_SMALL); // Must load the font first into the sprite class + + spr.createSprite(100, 50); // Create a sprite 100 pixels wide and 50 high + + spr.fillSprite(TFT_BLUE); + + spr.drawRect(0, 0, 100, 50, TFT_WHITE); // Draw sprite border outline (so we see extent) + + spr.setTextColor(TFT_YELLOW, TFT_DARKGREY); // Set the sprite font colour and the background colour + + spr.setTextDatum(MC_DATUM); // Middle Centre datum + + spr.drawString("15pt font", 50, 25 ); // Coords of middle of 100 x 50 Sprite + + spr.pushSprite(10, 10); // Push to TFT screen coord 10, 10 + + spr.pushSprite(10, 70, TFT_BLUE); // Push to TFT screen, TFT_BLUE is transparent + + spr.unloadFont(); // Remove the font from sprite class to recover memory used + + delay(4000); + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Large font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.fillScreen(TFT_BLACK); + + // Beware: Sprites are a differerent "class" to TFT, so different fonts can be loaded + // in the tft and sprite instances, so load the font in the class instance you use! + // In this example this means the spr. instance. + + spr.loadFont(AA_FONT_LARGE); // Load another different font into the sprite instance + + // 100 x 50 sprite was created above and still exists... + + spr.fillSprite(TFT_GREEN); + + spr.setTextColor(TFT_BLACK, TFT_GREEN); // Set the font colour and the background colour + + spr.setTextDatum(MC_DATUM); // Middle Centre datum + + spr.drawString("Fits", 50, 25); // Make sure text fits in the Sprite! + spr.pushSprite(10, 10); // Push to TFT screen coord 10, 10 + + spr.fillSprite(TFT_RED); + spr.setTextColor(TFT_WHITE, TFT_RED); // Set the font colour and the background colour + + spr.drawString("Too big", 50, 25); // Text is too big to all fit in the Sprite! + spr.pushSprite(10, 70); // Push to TFT screen coord 10, 70 + + // Draw changing numbers - no flicker using this plot method! + + // >>>> Note: it is best to use drawNumber() and drawFloat() for numeric values <<<< + // >>>> this reduces digit position movement when the value changes <<<< + // >>>> drawNumber() and drawFloat() functions behave like drawString() and are <<<< + // >>>> supported by setTextDatum() and setTextPadding() <<<< + + spr.setTextDatum(TC_DATUM); // Top Centre datum + + spr.setTextColor(TFT_WHITE, TFT_BLUE); // Set the font colour and the background colour + + for (int i = 0; i <= 200; i++) { + spr.fillSprite(TFT_BLUE); + spr.drawFloat(i / 100.0, 2, 50, 10); // draw with 2 decimal places at 50,10 in sprite + spr.pushSprite(10, 130); // Push to TFT screen coord 10, 130 + delay (20); + } + + spr.unloadFont(); // Remove the font to recover memory used + + spr.deleteSprite(); // Recover memory + + delay(1000); + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Mono spaced font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + spr.loadFont(AA_FONT_MONO); // Mono spaced fonts have fixed intercharacter gaps to + // aid formatting + int bnum = 1; + + // Example of drawing buttons + for (int j = 0; j < 4; j++) + { + for (int k = 0; k < 4; k++) + { + int x = 120 + k * 45; + int y = 40 + j * 30; + button(x, y, bnum++); + } + } + + for (int i = 0; i < 100; i++) + { + button(120, 160, i); + delay(50); + } + + spr.unloadFont(); + + delay(8000); +} + +// ######################################################################### +// Draw a number in a rounded rectangle with some transparent pixels +// Load the font before calling +// ######################################################################### +void button(int x, int y, int num ) +{ + + // Size of sprite + #define IWIDTH 40 + #define IHEIGHT 25 + + // Create a 16 bit sprite 40 pixels wide, 25 high (2000 bytes of RAM needed) + spr.setColorDepth(16); + spr.createSprite(IWIDTH, IHEIGHT); + + // Fill it with black (this will be the transparent colour this time) + spr.fillSprite(TFT_BLACK); + + // Draw a background for the numbers + spr.fillRoundRect( 0, 0, IWIDTH, IHEIGHT, 8, TFT_RED); + spr.drawRoundRect( 0, 0, IWIDTH, IHEIGHT, 8, TFT_WHITE); + + // Set the font parameters + + // Set text coordinate datum to middle centre + spr.setTextDatum(MC_DATUM); + + // Set the font colour and the background colour + spr.setTextColor(TFT_WHITE, TFT_RED); + + // Draw the number + spr.drawNumber(num, IWIDTH/2, 1 + IHEIGHT/2); + + // Push sprite to TFT screen CGRAM at coordinate x,y (top left corner) + // All black pixels will not be drawn hence will show as "transparent" + spr.pushSprite(x, y, TFT_BLACK); + + // Delete sprite to free up the RAM + spr.deleteSprite(); +} diff --git a/examples/Smooth Fonts/Font_Demo_3/Notes.ino b/examples/Smooth Fonts/Font_Demo_3/Notes.ino new file mode 100644 index 0000000..bdab3d0 --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_3/Notes.ino @@ -0,0 +1,61 @@ +/* + +Information notes only: +====================== + +Note: it is best to use drawNumber() and drawFloat() for numeric values + this reduces digit position movement when the value changes + drawNumber() and drawFloat() functions behave like drawString() and are + supported by setTextDatum() and setTextPadding() + +//These are the text plotting alignment (reference datum point) + +TL_DATUM = Top left (default) +TC_DATUM = Top centre +TR_DATUM = Top right + +ML_DATUM = Middle left +MC_DATUM = Middle centre +MR_DATUM = Middle right + +BL_DATUM = Bottom left +BC_DATUM = Bottom centre +BR_DATUM = Bottom right + +L_BASELINE = Left character baseline (Line the 'A' character would sit on) +C_BASELINE = Centre character baseline +R_BASELINE = Right character baseline + +// Basic colours already defined: + +TFT_BLACK 0x0000 +TFT_NAVY 0x000F +TFT_DARKGREEN 0x03E0 +TFT_DARKCYAN 0x03EF +TFT_MAROON 0x7800 +TFT_PURPLE 0x780F +TFT_OLIVE 0x7BE0 +TFT_LIGHTGREY 0xC618 +TFT_DARKGREY 0x7BEF +TFT_BLUE 0x001F +TFT_GREEN 0x07E0 +TFT_CYAN 0x07FF +TFT_RED 0xF800 +TFT_MAGENTA 0xF81F +TFT_YELLOW 0xFFE0 +TFT_WHITE 0xFFFF +TFT_ORANGE 0xFDA0 +TFT_GREENYELLOW 0xB7E0 +TFT_PINK 0xFC9F + + + + + + + + + + + + */ diff --git a/examples/Smooth Fonts/Font_Demo_3/data/NotoSansBold15.vlw b/examples/Smooth Fonts/Font_Demo_3/data/NotoSansBold15.vlw new file mode 100644 index 0000000..803a1bd Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_3/data/NotoSansBold15.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_3/data/NotoSansBold36.vlw b/examples/Smooth Fonts/Font_Demo_3/data/NotoSansBold36.vlw new file mode 100644 index 0000000..66003f6 Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_3/data/NotoSansBold36.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_3/data/NotoSansMonoSCB20.vlw b/examples/Smooth Fonts/Font_Demo_3/data/NotoSansMonoSCB20.vlw new file mode 100644 index 0000000..4045c62 Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_3/data/NotoSansMonoSCB20.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_4/Font_Demo_4.ino b/examples/Smooth Fonts/Font_Demo_4/Font_Demo_4.ino new file mode 100644 index 0000000..edad83c --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_4/Font_Demo_4.ino @@ -0,0 +1,140 @@ +/* + There are four different methods of plotting anti-aliased fonts to the screen. + + This sketch uses method 4, printing "String" or character array types only to screen, + via a Sprite. The Sprite must NOT have been created already. The printToSprite() + function automatically creates a sprite of a minimal size to contain the String, + then plots to screen at the "tft" cursor position. Printing via a sprite draws the + text faster on the screen. This method minimises flicker but uses RAM for the Sprite, + the Sprite is automatically deleted after plotting to the TFT. + + Number and float types must be converted to strings to use printToSprite() e.g.: + spr.printToSprite( (String) number ); + spr.printToSprite( (String) (number * 55 / 1.23) ); // Put calculations within brackets + + The key advantage of this method is that you do not need to calculate the size of sprite + needed to contain the text, the library does that for you. The library also fills the + the sprite with text background colour for you. + + printToSprite() has a second purpose, if the sprite has been created already the String + will be printed into the Sprite at the "sprite" cursor position, which is + different to the "tft" cursor position. In this case the Sprite is not deleted and + you must use pushSprite() to plot on the screen. This method is not used in this sketch. + because in general it is better to use drawString() in an already created sprite. + printToSprite() will NOT move the tft cursor. + +*/ +// The fonts used are in the sketch data folder, press Ctrl+K to view. + +// Upload the fonts and icons to SPIFFS (must set at least 1M for SPIFFS) using the +// "Tools" "ESP8266 (or ESP32) Sketch Data Upload" menu option in the IDE. +// To add this option follow instructions here for the ESP8266: +// https://github.com/esp8266/arduino-esp8266fs-plugin +// or for the ESP32: +// https://github.com/me-no-dev/arduino-esp32fs-plugin + +// Close the IDE and open again to see the new menu option. + +// A processing sketch to create new fonts can be found in the Tools folder of TFT_eSPI +// https://github.com/Bodmer/TFT_eSPI/tree/master/Tools/Create_Smooth_Font/Create_font + +// This sketch uses font files created from the Noto family of fonts: +// https://www.google.com/get/noto/ + +#define AA_FONT_SMALL "NotoSansBold15" +#define AA_FONT_LARGE "NotoSansBold36" + +// Font files are stored in SPIFFS, so load the linbrary +#include + +#include +#include // Hardware-specific library + +TFT_eSPI tft = TFT_eSPI(); +TFT_eSprite spr = TFT_eSprite(&tft); // Sprite class needs to be invoked + +void setup(void) { + + Serial.begin(250000); + + tft.begin(); + + tft.setRotation(1); + + spr.setColorDepth(16); // 16 bit colour needed to show antialiased fonts + + if (!SPIFFS.begin()) { + Serial.println("SPIFFS initialisation failed!"); + while (1) yield(); // Stay here twiddling thumbs waiting + } + Serial.println("\r\nSPIFFS available!"); + + // ESP32 will crash if any of the fonts are missing + bool font_missing = false; + if (SPIFFS.exists("/NotoSansBold15.vlw") == false) font_missing = true; + if (SPIFFS.exists("/NotoSansBold36.vlw") == false) font_missing = true; + + if (font_missing) + { + Serial.println("\r\nFont missing in SPIFFS, did you upload it?"); + while(1) yield(); + } + else Serial.println("\r\nFonts found OK."); +} + +void loop() { + + tft.fillScreen(TFT_BLACK); + + tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set the font colour and the background colour + + tft.setTextDatum(TC_DATUM); // Top Centre datum + + int xpos = tft.width() / 2; // Half the screen width + int ypos = 50; + + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Small font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + spr.loadFont(AA_FONT_SMALL); // Must load the font first into the sprite class + + spr.setTextColor(TFT_YELLOW, TFT_BLACK); // Set the sprite font colour and the background colour + + tft.setCursor(xpos - 50, ypos); // Set the tft cursor position, yes tft position! + spr.printToSprite("Small 15pt font"); // Prints to tft cursor position, tft cursor NOT moved + + ypos += spr.fontHeight(); // Get the font height and move ypos down + + spr.unloadFont(); // Remove the font from sprite class to recover memory used + + delay(4000); + + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + // Large font + // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + tft.fillScreen(TFT_BLACK); + + spr.loadFont(AA_FONT_LARGE); // Load another different font + + spr.setTextColor(TFT_WHITE, TFT_BLUE); // Set the font colour and the background colour + + tft.setCursor(xpos - 90, ypos); // Set the tft cursor position + spr.printToSprite("36pt font"); // Text is rendered via a minimally sized sprite + + ypos += spr.fontHeight(); // Get the font height and move ypos down + + // Draw changing numbers - no flicker using this plot method! + for (int i = 0; i <= 200; i++) { + tft.setCursor(10, 10); + // Number is converted to String type by (String) (number) + spr.printToSprite(" " + (String) (i / 100.0) + " "); // Space padding helps over-write old numbers + delay (20); + } + + spr.unloadFont(); // Remove the font to recover memory used + + delay(8000); +} diff --git a/examples/Smooth Fonts/Font_Demo_4/Notes.ino b/examples/Smooth Fonts/Font_Demo_4/Notes.ino new file mode 100644 index 0000000..f04f2b7 --- /dev/null +++ b/examples/Smooth Fonts/Font_Demo_4/Notes.ino @@ -0,0 +1,56 @@ +/* + +Information notes only: +====================== + +//These are the text plotting alignment (reference datum point) + +TL_DATUM = Top left (default) +TC_DATUM = Top centre +TR_DATUM = Top right + +ML_DATUM = Middle left +MC_DATUM = Middle centre +MR_DATUM = Middle right + +BL_DATUM = Bottom left +BC_DATUM = Bottom centre +BR_DATUM = Bottom right + +L_BASELINE = Left character baseline (Line the 'A' character would sit on) +C_BASELINE = Centre character baseline +R_BASELINE = Right character baseline + +// Basic colours already defined: + +TFT_BLACK 0x0000 +TFT_NAVY 0x000F +TFT_DARKGREEN 0x03E0 +TFT_DARKCYAN 0x03EF +TFT_MAROON 0x7800 +TFT_PURPLE 0x780F +TFT_OLIVE 0x7BE0 +TFT_LIGHTGREY 0xC618 +TFT_DARKGREY 0x7BEF +TFT_BLUE 0x001F +TFT_GREEN 0x07E0 +TFT_CYAN 0x07FF +TFT_RED 0xF800 +TFT_MAGENTA 0xF81F +TFT_YELLOW 0xFFE0 +TFT_WHITE 0xFFFF +TFT_ORANGE 0xFDA0 +TFT_GREENYELLOW 0xB7E0 +TFT_PINK 0xFC9F + + + + + + + + + + + + */ diff --git a/examples/Smooth Fonts/Font_Demo_4/data/NotoSansBold15.vlw b/examples/Smooth Fonts/Font_Demo_4/data/NotoSansBold15.vlw new file mode 100644 index 0000000..803a1bd Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_4/data/NotoSansBold15.vlw differ diff --git a/examples/Smooth Fonts/Font_Demo_4/data/NotoSansBold36.vlw b/examples/Smooth Fonts/Font_Demo_4/data/NotoSansBold36.vlw new file mode 100644 index 0000000..66003f6 Binary files /dev/null and b/examples/Smooth Fonts/Font_Demo_4/data/NotoSansBold36.vlw differ diff --git a/examples/Sprite/1_bit_Sprite_Demo/1_bit_Sprite_Demo.ino b/examples/Sprite/One_bit_Sprite_Demo/One_bit_Sprite_Demo.ino similarity index 100% rename from examples/Sprite/1_bit_Sprite_Demo/1_bit_Sprite_Demo.ino rename to examples/Sprite/One_bit_Sprite_Demo/One_bit_Sprite_Demo.ino diff --git a/examples/Sprite/1_bit_Yin_Yang/1_bit_Yin_Yang.ino b/examples/Sprite/One_bit_Yin_Yang/One_bit_Yin_Yang.ino similarity index 100% rename from examples/Sprite/1_bit_Yin_Yang/1_bit_Yin_Yang.ino rename to examples/Sprite/One_bit_Yin_Yang/One_bit_Yin_Yang.ino diff --git a/examples/Sprite/Rotated_Sprite_1/Rotated_Sprite_1.ino b/examples/Sprite/Rotated_Sprite_1/Rotated_Sprite_1.ino new file mode 100644 index 0000000..b789b50 --- /dev/null +++ b/examples/Sprite/Rotated_Sprite_1/Rotated_Sprite_1.ino @@ -0,0 +1,182 @@ +// This example plots a rotated Sprite to the screen using the pushRotated() +// function. It is written for a 240 x 320 TFT screen. + +// Two rotation pivot points must be set, one for the Sprite and one for the TFT +// using setPivot(). These pivot points do not need to be within the visible screen +// or Sprite boundary. + +// When the Sprite is rotated and pushed to the TFT with pushRotated(angle) it will be +// drawn so that the two pivot points coincide. This makes rotation about a point on the +// screen very simple. The rotation is clockwise with increasing angle. The angle is in +// degrees, an angle of 0 means no Sprite rotation. + +// The pushRotated() function works with 1, 8 and 16 bit per pixel (bpp) Sprites. + +// The original Sprite is unchanged so can be plotted again at a different angle. + +// Optionally a transparent colour can be defined, pixels of this colour will +// not be plotted to the TFT. + +// For 1 bpp Sprites the foreground and background colours are defined with the +// function spr.setBitmapColor(foregroundColor, backgroundColor). + +// Created by Bodmer 6/1/19 as an example to the TFT_eSPI library: +// https://github.com/Bodmer/TFT_eSPI + +#include + +TFT_eSPI tft = TFT_eSPI(); // TFT object + +TFT_eSprite spr = TFT_eSprite(&tft); // Sprite object + +// ======================================================================================= +// Setup +// ======================================================================================= + +void setup() { + Serial.begin(250000); // Debug only + + tft.begin(); // initialize + tft.setRotation(0); +} + +// ======================================================================================= +// Loop +// ======================================================================================= + +void loop() { + + int xw = tft.width()/2; // xw, yh is midle of screen + int yh = tft.height()/2; + + + showMessage("90 degree angles"); + tft.setPivot(xw, yh); // Set pivot to middle of TFT screen + drawX(xw, yh); // Show where screen pivot is + + // Create the Sprite + spr.setColorDepth(8); // Create an 8bpp Sprite of 60x30 pixels + spr.createSprite(64, 30); // 8bpp requires 64 * 30 = 1920 bytes + spr.setPivot(32, 55); // Set pivot relative to top left corner of Sprite + spr.fillSprite(TFT_BLACK); // Fill the Sprite with black + + spr.setTextColor(TFT_GREEN); // Green text + spr.setTextDatum(MC_DATUM); // Middle centre datum + spr.drawString("Hello", 32, 15, 4); // Plot text, font 4, in Sprite at 30, 15 + + spr.pushRotated(0); + spr.pushRotated(90); + spr.pushRotated(180); + spr.pushRotated(270); + + delay(2000); + + + showMessage("45 degree angles"); + drawX(xw, yh); // Show where screen pivot is + + spr.pushRotated(45); + spr.pushRotated(135); + spr.pushRotated(225); + spr.pushRotated(315); + + delay(2000); // Pause so we see it + + + showMessage("Moved Sprite pivot point"); + drawX(xw, yh); // Show where screen pivot is + + spr.setPivot(-20, 15); // Change just the Sprite pivot point + + spr.pushRotated(45); + spr.pushRotated(135); + spr.pushRotated(225); + spr.pushRotated(315); + + delay(2000); // Pause so we see it + + + showMessage("Moved TFT pivot point"); + tft.setPivot(100, 100); // Change just the TFT pivot point + drawX(100, 100); // Show where pivot is + + spr.pushRotated(45); + spr.pushRotated(135); + spr.pushRotated(225); + spr.pushRotated(315); + + delay(2000); // Pause so we see it + + + showMessage("Transparent rotations"); + tft.fillCircle(xw, yh, 70, TFT_DARKGREY); // Draw a filled circle + + tft.setPivot(xw, yh); // Set pivot to middle of screen + drawX(xw, yh); // Show where pivot is + + spr.deleteSprite(); + + spr.setColorDepth(8); // Create a 8bpp Sprite + spr.createSprite(40, 30); // Create a new Sprite 40x30 + spr.setPivot(20, 70); // Set Sprite pivot at 20,80 + + spr.setTextColor(TFT_RED); // Red text in Sprite + spr.setTextDatum(MC_DATUM); // Middle centre datum + + int num = 1; + + for (int16_t angle = 30; angle <= 360; angle += 30) + { + spr.fillSprite(TFT_BLACK); // Clear the Sprite + spr.drawNumber(num, 20, 15, 4); // Plot number, in Sprite at 15,15 and with font 4 + spr.pushRotated(angle, TFT_BLACK); // Plot rotated Sprite, black being transparent + num++; + } + + spr.setTextColor(TFT_WHITE); // White text in Sprite + spr.setPivot(-75, 15); // Set Sprite pivot at -75,15 + + for (int16_t angle = -90; angle < 270; angle += 30) + { + spr.fillSprite(TFT_BLACK); // Clear the Sprite + spr.drawNumber(angle+90, 15, 15, 4); // Plot number, in Sprite at 15,15 and with font 4 + spr.pushRotated(angle, TFT_BLACK); // Plot rotated Sprite, black being transparent + num++; + } + + delay(8000); // Pause so we see it + + spr.deleteSprite(); + +} + +// ======================================================================================= +// Draw an X centered on x,y +// ======================================================================================= + +void drawX(int x, int y) +{ + tft.drawLine(x-5, y-5, x+5, y+5, TFT_WHITE); + tft.drawLine(x-5, y+5, x+5, y-5, TFT_WHITE); +} + +// ======================================================================================= +// Show a message at the top of the screen +// ======================================================================================= + +void showMessage(String msg) +{ + // Clear the screen areas + tft.fillRect(0, 0, tft.width(), 20, TFT_BLACK); + tft.fillRect(0, 20, tft.width(), tft.height()-20, TFT_BLUE); + + uint8_t td = tft.getTextDatum(); // Get current datum + + tft.setTextDatum(TC_DATUM); // Set new datum + + tft.drawString(msg, tft.width()/2, 2, 2); // Message in font 2 + + tft.setTextDatum(td); // Restore old datum +} + +// ======================================================================================= diff --git a/examples/Sprite/Rotated_Sprite_2/Rotated_Sprite_2.ino b/examples/Sprite/Rotated_Sprite_2/Rotated_Sprite_2.ino new file mode 100644 index 0000000..1dc5da7 --- /dev/null +++ b/examples/Sprite/Rotated_Sprite_2/Rotated_Sprite_2.ino @@ -0,0 +1,181 @@ +// This example plots a rotated Sprite into another Sprite and then the resultant composited +// Sprite is pushed to the TFT screen. This example is for a 240 x 320 screen. + +// The motivation for developing this capability is that animated dials can be drawn easily +// and the complex calculations involved are handled by the TFT_eSPI library. To create a dial +// with a moving needle a graphic of a meter needle is plotted at a specified angle into another +// Sprite that contains the dial face. When the needle Sprite is pushed to the dial Sprite the +// plotting ensures two pivot points for each Sprite coincide with pixel level accuracy. + +// Two rotation pivot points must be set, one for the first Sprite and one for the second +// Sprite using setPivot(). These pivot points do not need to be within the Sprite boundaries. + +// In this example a needle graphic is also be plotted direct to a defined TFT pivot point. + +// The rotation angle is in degrees, an angle of 0 means no Sprite rotation. + +// The pushRotated() function works with 1, 8 and 16 bit per pixel (bpp) Sprites. + +// For 1 bpp Sprites the foreground and background colours are defined with the +// member function setBitmapColor(foregroundColor, backgroundColor). + +// Created by Bodmer 6/1/19 as an example to the TFT_eSPI library: +// https://github.com/Bodmer/TFT_eSPI + +#include + +TFT_eSPI tft = TFT_eSPI(); + +TFT_eSprite dial = TFT_eSprite(&tft); // Sprite object for dial +TFT_eSprite needle = TFT_eSprite(&tft); // Sprite object for needle + +uint32_t startMillis; + +int16_t angle = 0; + +// ======================================================================================= +// Setup +// ======================================================================================= + +void setup() { + Serial.begin(250000); // Debug only + + tft.begin(); + tft.setRotation(1); + + // Clear TFT screen + tft.fillScreen(TFT_NAVY); + + // Create the dial Sprite and dial (this temporarily hijacks the use of the needle Sprite) + createDialScale(-120, 120, 30); // create scale (start angle, end angle, increment angle) + drawEmptyDial("Label", 12345); // draw the centre of dial in the Sprite + + dial.pushSprite(110, 0); // push a copy of the dial to the screen so we can see it + + // Create the needle Sprite + createNeedle(); // draw the needle graphic + needle.pushSprite(95, 7); // push a copy of the needle to the screen so we can see it +} + +// ======================================================================================= +// Loop +// ======================================================================================= + +void loop() { + + // Push the needle sprite to the dial Sprite at different angles and then push the dial to the screen + // Use angle increments in range 1 to 6 for smoother or faster movement + for (int16_t angle = -120; angle <= 120; angle += 2) { + plotDial(0, 0, angle, "RPM", angle + 120); + delay(25); + yield(); // Avoid a watchdog time-out + } + + delay(1000); // Pause + + // Update the dial Sprite with decreasing angle and plot to screen at 0,0, no delay + for (int16_t angle = 120; angle >= -120; angle -= 2) { + plotDial(0, 0, angle, "RPM", angle + 120); + yield(); // Avoid a watchdog time-out + } + + // Now show plotting of the rotated needle direct to the TFT + tft.setPivot(45, 150); // Set the TFT pivot point that the needle will rotate around + + // The needle graphic has a black border so if the angle increment is small + // (6 degrees or less in this case) it wipes the last needle position when + // it is rotated and hence it clears the swept area to black + for (int16_t angle = 0; angle <= 360; angle += 5) + { + needle.pushRotated(angle); // Plot direct to TFT at specifed angle + yield(); // Avoid a watchdog time-out + } +} + +// ======================================================================================= +// Create the dial sprite, the dial outer and place scale markers +// ======================================================================================= + +void createDialScale(int16_t start_angle, int16_t end_angle, int16_t increment) +{ + // Create the dial Sprite + dial.setColorDepth(8); // Size is odd (i.e. 91) so there is a centre pixel at 45,45 + dial.createSprite(91, 91); // 8bpp requires 91 * 91 = 8281 bytes + dial.setPivot(45, 45); // set pivot in middle of dial Sprite + + // Draw dial outline + dial.fillSprite(TFT_TRANSPARENT); // Fill with transparent colour + dial.fillCircle(45, 45, 43, TFT_DARKGREY); // Draw dial outer + + // Hijack the use of the needle Sprite since that has not been used yet! + needle.createSprite(3, 3); // 3 pixels wide, 3 high + needle.fillSprite(TFT_WHITE); // Fill with white + needle.setPivot(1, 43); // Set pivot point x to the Sprite centre and y to marker radius + + for (int16_t angle = start_angle; angle <= end_angle; angle += increment) { + needle.pushRotated(&dial, angle); // Sprite is used to make scale markers + yield(); // Avoid a watchdog time-out + } + + needle.deleteSprite(); // Delete the hijacked Sprite +} + + +// ======================================================================================= +// Add the empty dial face with label and value +// ======================================================================================= + +void drawEmptyDial(String label, int16_t val) +{ + // Draw black face + dial.fillCircle(45, 45, 40, TFT_BLACK); + dial.drawPixel(45, 45, TFT_WHITE); // For demo only, mark pivot point with a while pixel + + dial.setTextDatum(TC_DATUM); // Draw dial text + dial.drawString(label, 45, 15, 2); + dial.drawNumber(val, 45, 60, 2); +} + +// ======================================================================================= +// Update the dial and plot to screen with needle at defined angle +// ======================================================================================= + +void plotDial(int16_t x, int16_t y, int16_t angle, String label, uint16_t val) +{ + // Draw the blank dial in the Sprite, add label and number + drawEmptyDial(label, val); + + // Push a rotated needle Sprite to the dial Sprite, with black as transparent colour + needle.pushRotated(&dial, angle, TFT_BLACK); // dial is the destination Sprite + + // Push the resultant dial Sprite to the screen, with transparent colour + dial.pushSprite(x, y, TFT_TRANSPARENT); +} + +// ======================================================================================= +// Create the needle Sprite and the image of the needle +// ======================================================================================= + +void createNeedle(void) +{ + needle.setColorDepth(8); + needle.createSprite(11, 49); // create the needle Sprite 11 pixels wide by 49 high + + needle.fillSprite(TFT_BLACK); // Fill with black + + // Define needle pivot point + uint16_t piv_x = needle.width() / 2; // x pivot of Sprite (middle) + uint16_t piv_y = needle.height() - 10; // y pivot of Sprite (10 pixels from bottom) + needle.setPivot(piv_x, piv_y); // Set pivot point in this Sprite + + // Draw the red needle with a yellow tip + // Keep needle tip 1 pixel inside dial circle to avoid leaving stray pixels + needle.fillRect(piv_x - 1, 2, 3, piv_y + 8, TFT_RED); + needle.fillRect(piv_x - 1, 2, 3, 5, TFT_YELLOW); + + // Draw needle centre boss + needle.fillCircle(piv_x, piv_y, 5, TFT_MAROON); + needle.drawPixel( piv_x, piv_y, TFT_WHITE); // Mark needle pivot point with a white pixel +} + +// ======================================================================================= diff --git a/examples/Sprite/Rotated_Sprite_3/Rotated_Sprite_3.ino b/examples/Sprite/Rotated_Sprite_3/Rotated_Sprite_3.ino new file mode 100644 index 0000000..8e8e72b --- /dev/null +++ b/examples/Sprite/Rotated_Sprite_3/Rotated_Sprite_3.ino @@ -0,0 +1,140 @@ +/*==================================================================================== + + This example draws a jpeg image in a Sprite then plot a rotated copy of the Sprite + to the TFT. + + The jpeg used in in the sketch Data folder (presss Ctrl+K to see folder) + + The jpeg must be uploaded to the ESP8266 or ESP32 SPIFFS by using the Tools menu + sketch data upload option of the Arduino IDE. If you do not have that option it can + be added. Close the Serial Monitor window before uploading to avoid an error message! + + To add the upload option for the ESP8266 see: + http://www.esp8266.com/viewtopic.php?f=32&t=10081 + https://github.com/esp8266/arduino-esp8266fs-plugin/releases + + To add the upload option for the ESP32 see: + https://github.com/me-no-dev/arduino-esp32fs-plugin + + Created by Bodmer 6/1/19 as an example to the TFT_eSPI library: + https://github.com/Bodmer/TFT_eSPI + + Extension funtions in the TFT_eFEX library are used to list SPIFFS files and render + the jpeg to the TFT and to the Sprite: + https://github.com/Bodmer/TFT_eFEX + + To render the Jpeg image the JPEGDecoder library is needed, this can be obtained + with the IDE library manager, or downloaded from here: + https://github.com/Bodmer/JPEGDecoder + + ==================================================================================*/ + +//==================================================================================== +// Libraries +//==================================================================================== +// Call up the SPIFFS FLASH filing system, this is part of the ESP Core +#define FS_NO_GLOBALS +#include + +#ifdef ESP32 +#include "SPIFFS.h" // Needed for ESP32 only +#endif + +// https://github.com/Bodmer/TFT_eSPI +#include // Hardware-specific library +TFT_eSPI tft = TFT_eSPI(); // Invoke custom library +TFT_eSprite spr = TFT_eSprite(&tft); // Create Sprite object "spr" with pointer to "tft" object + +// https://github.com/Bodmer/TFT_eFEX +#include // Include the function extension library +TFT_eFEX fex = TFT_eFEX(&tft); // Create TFT_eFX object "fex" with pointer to "tft" object + + +//==================================================================================== +// Setup +//==================================================================================== +void setup() +{ + Serial.begin(250000); // Used for messages + + tft.begin(); + tft.setRotation(0); // 0 & 2 Portrait. 1 & 3 landscape + tft.fillScreen(TFT_BLACK); + + // Create a sprite to hold the jpeg (or part of it) + spr.createSprite(80, 64); + + // Initialise SPIFFS + if (!SPIFFS.begin()) { + Serial.println("SPIFFS initialisation failed!"); + while (1) yield(); // Stay here twiddling thumbs waiting + } + Serial.println("\r\nInitialisation done.\r\n"); + + // Lists the files so you can see what is in the SPIFFS + fex.listSPIFFS(); + + // Note the / before the SPIFFS file name must be present, this means the file is in + // the root directory of the SPIFFS, e.g. "/tiger.jpg" for a file called "tiger.jpg" + + // Send jpeg info to serial port + fex.jpegInfo("/Eye_80x64.jpg"); + + // Draw jpeg iamge in Sprite spr at 0,0 + fex.drawJpeg("/Eye_80x64.jpg", 0 , 0, &spr); +} + +//==================================================================================== +// Loop +//==================================================================================== +void loop() +{ + + tft.fillScreen(random(0xFFFF)); + + + // Set the TFT pivot point to the centre of the screen + tft.setPivot(tft.width() / 2, tft.height() / 2); + + // Set Sprite pivot point to centre of Sprite + spr.setPivot(spr.width() / 2, spr.height() / 2); + + // Push Sprite to the TFT at 0,0 (not rotated) + spr.pushSprite(0, 0); + + delay(1000); + + // Push copies of Sprite rotated through increasing angles 0-360 degrees + // with 45 fegree increments + for (int16_t angle = 0; angle <= 360; angle += 45) { + spr.pushRotated(angle); + delay(500); + } + + delay(2000); + + // Move Sprite pivot to a point above the image at 40,-60 + // (Note: Top left corner is Sprite coordinate 0,0) + // The TFT pivot point has already been set to middle of screen. + /* .Pivot point at 40,-60 + ^ + | + -60 + < 40 >| + ______V______ + | | + | Sprite | + |_____________| + */ + spr.setPivot(40, -60); + + // Push Sprite to screen rotated about the new pivot points + // negative angle rotates Sprite anticlockwise + for (int16_t angle = 330; angle >= 0; angle -= 30) { + spr.pushRotated(angle); + yield(); // Stop watchdog triggering + } + + delay(5000); +} +//==================================================================================== diff --git a/examples/Sprite/Rotated_Sprite_3/data/EagleEye.jpg b/examples/Sprite/Rotated_Sprite_3/data/EagleEye.jpg new file mode 100644 index 0000000..240b7ef Binary files /dev/null and b/examples/Sprite/Rotated_Sprite_3/data/EagleEye.jpg differ diff --git a/examples/Sprite/Rotated_Sprite_3/data/Eye_80x64.jpg b/examples/Sprite/Rotated_Sprite_3/data/Eye_80x64.jpg new file mode 100644 index 0000000..10013b7 Binary files /dev/null and b/examples/Sprite/Rotated_Sprite_3/data/Eye_80x64.jpg differ diff --git a/examples/Sprite/Sprite_scroll_1bit/Sprite_scroll_1bit.ino b/examples/Sprite/Sprite_scroll_1bit/Sprite_scroll_1bit.ino new file mode 100644 index 0000000..ab4a53e --- /dev/null +++ b/examples/Sprite/Sprite_scroll_1bit/Sprite_scroll_1bit.ino @@ -0,0 +1,147 @@ +/* + Sketch to show scrolling of the graphics in sprites. + + This sketch scrolls a 1 bit per pixel (1 bpp) Sprite. + + In a 1 bit Sprite any colour except TFT_BLACK turns a pixel "ON" + TFT_BLACK turns a pixel "OFF". + + The 1 bpp Sprite has a unique property that other bit depth Sprites + do not have, you can set the rotation of the coordinate frame e.g.: + spr.setRotation(1); + + This is similar to screen rotations, so for example text can + be drawn rotated: + Rotation 0: Normal orientation + Rotation 1: Coordinate frame rotated clockwise 90 degrees + Rotation 2: Coordinate frame rotated clockwise 180 degrees (upside down) + Rotation 3: Coordinate frame rotated clockwise 270 degrees + + When pushSprite is used the sprite is drawn with the width and height + staying as created, so the created Sprite itself is not rotated during + rendering. See stext2 sprite example below at line 83. + + ON and OFF pixels can be set to any two colours before + rendering to the screen with pushSprite, for example: + tft.setBitmapColor(ON_COLOR, OFF_COLOR); + + Scrolling moves the pixels in a defined rectangle within + the Sprite. By defalt the whole sprite is scrolled. + The gap left by scrolling is filled with a defined colour. + + Example for library: + https://github.com/Bodmer/TFT_eSPI + + A Sprite is notionally an invisible graphics screen that is + kept in the processors RAM. Graphics can be drawn into the + Sprite just as it can be drawn directly to the screen. Once + the Sprite is completed it can be plotted onto the screen in + any position. If there is sufficient RAM then the Sprite can + be the same size as the screen and used as a frame buffer. + + A 1 bit Sprite occupies (width * height)/8 bytes in RAM. + +*/ + +#include + +TFT_eSPI tft = TFT_eSPI(); + +TFT_eSprite graph1 = TFT_eSprite(&tft); // Sprite object graph1 + +TFT_eSprite stext1 = TFT_eSprite(&tft); // Sprite object stext1 + +TFT_eSprite stext2 = TFT_eSprite(&tft); // Sprite object stext2 + +int graphVal = 1; +int delta = 1; +int grid = 0; +int tcount = 0; + +//========================================================================================== +void setup() { + tft.init(); + tft.fillScreen(TFT_BLACK); + + // Create a sprite for the graph + graph1.setColorDepth(1); + graph1.createSprite(128, 61); + graph1.fillSprite(TFT_BLACK); // Note: Sprite is filled with black when created + + // The scroll area is set to the full sprite size upon creation of the sprite + // but we can change that by defining a smaller area using "setScrollRect()"if needed + // parameters are x,y,w,h,color as in drawRect(), the color fills the gap left by scrolling + //graph1.setScrollRect(64, 0, 64, 61, TFT_BLACK); // Try this line to change the graph scroll area + + // Create a sprite for the scrolling numbers + stext1.setColorDepth(1); + stext1.createSprite(32, 64); + stext1.fillSprite(TFT_BLACK); // Fill sprite with blue + stext1.setScrollRect(0, 0, 32, 64, TFT_BLACK); // here we set scroll gap fill color to blue + stext1.setTextColor(TFT_WHITE); // White text, no background + stext1.setTextDatum(BR_DATUM); // Bottom right coordinate datum + + // Create a sprite for Hello World + stext2.setColorDepth(1); + stext2.createSprite(16, 80); // Narrow and tall + stext2.setRotation(1); // Plot with 90 deg. clockwise rotation + stext2.fillSprite(TFT_BLACK); + stext2.setScrollRect(0, 0, 40, 16, TFT_BLACK); // Scroll the "Hello" in the first 40 pixels + stext2.setTextColor(TFT_WHITE); // White text, no background +} + +//========================================================================================== +void loop() { + // Draw point in graph1 sprite at far right edge (this will scroll left later) + graph1.drawFastVLine(127,60-graphVal,2,TFT_WHITE); // draw 2 pixel point on graph + + // Draw number in stext1 sprite at 31,63 (bottom right datum set) + stext1.drawNumber(graphVal, 31, 63, 2); // plot value in font 2 + + // Push the sprites onto the TFT at specied coordinates + tft.setBitmapColor(TFT_WHITE, TFT_BLUE); // Specify the colours of the ON and OFF pixels + graph1.pushSprite(0, 0); + + tft.setBitmapColor(TFT_GREEN, TFT_BLACK); + stext1.pushSprite(0, 64); + + tft.setBitmapColor(TFT_BLACK, TFT_YELLOW); + stext2.pushSprite(60, 70); + + // Change the value to plot + graphVal+=delta; + + // If the value reaches a limit, then change delta of value + if (graphVal >= 60) delta = -1; // ramp down value + else if (graphVal <= 1) delta = +1; // ramp up value + + delay(50); // wait so things do not scroll too fast + + // Now scroll the sprites scroll(dt, dy) where: + // dx is pixels to scroll, left = negative value, right = positive value + // dy is pixels to scroll, up = negative value, down = positive value + graph1.scroll(-1, 0); // scroll graph 1 pixel left, 0 up/down + stext1.scroll(0,-16); // scroll stext 0 pixels left/right, 16 up + stext2.scroll(1); // scroll stext 1 pixel right, up/down default is 0 + + // Draw the grid on far right edge of sprite as graph has now moved 1 pixel left + grid++; + if (grid >= 10) + { // Draw a vertical line if we have scrolled 10 times (10 pixels) + grid = 0; + graph1.drawFastVLine(127, 0, 61, TFT_WHITE); // draw line on graph + } + else + { // Otherwise draw points spaced 10 pixels for the horizontal grid lines + for (int p = 0; p <= 60; p += 10) graph1.drawPixel(127, p, TFT_WHITE); + } + + tcount--; + if (tcount <=0) + { // If we have scrolled 40 pixels the redraw text + tcount = 40; + stext2.drawString("Hello World", 6, 0, 2); // draw at 6,0 in sprite, font 2 + } + +} // Loop back and do it all again +//========================================================================================== diff --git a/examples/Sprite/Sprite_scroll_wrap_1bit/Sprite_scroll_wrap_1bit.ino b/examples/Sprite/Sprite_scroll_wrap_1bit/Sprite_scroll_wrap_1bit.ino new file mode 100644 index 0000000..76fcfc6 --- /dev/null +++ b/examples/Sprite/Sprite_scroll_wrap_1bit/Sprite_scroll_wrap_1bit.ino @@ -0,0 +1,139 @@ +// This **ONLY** works for 1 bpp Sprites due to lack of bounds checking in the +// Sprite pushImage() function for 8 and 16 bit Sprites (it is on the TO DO list) + +// Wrapping scroll example by Bodmer for the TFT_eSPI library + +//========================================================================================== + +#include + +TFT_eSPI tft = TFT_eSPI(); + +TFT_eSprite gfx = TFT_eSprite(&tft); // Sprite object for graphics write + +TFT_eSprite fb = TFT_eSprite(&tft); // Sprite object for frame buffer + +// Width and height of the Sprite +#define WIDTH 60 +#define HEIGHT 60 + +// Define scroll increment in x and y directions +// positive numbers = right, down +// negative numbers = left, up +#define XDELTA 1 +#define YDELTA 1 + +int16_t scroll_x = 0; // Keep track of the scrolled position, this is where the origin +int16_t scroll_y = 0; // (top left) of the gfx Sprite will be + +int16_t radius = 5; // radius of circle + +bool grow = true; // grow or shrink circle + +uint16_t *gfxPtr; // Pointer to start of graphics sprite memory area + +//========================================================================================== +//========================================================================================== + +void setup() { + Serial.begin(115200); + tft.init(); + tft.fillScreen(TFT_BLACK); + + tft.setRotation(1); + + //tft.invertDisplay(true); + + // Create a sprite for the graphics + gfx.setColorDepth(1); + gfxPtr = (uint16_t*) gfx.createSprite(WIDTH, HEIGHT); // 450 bytes needed + gfx.fillSprite(TFT_BLACK); // Note: Sprite is filled with black when created + + // Create a sprite for the frame buffer + fb.setColorDepth(1); + fb.createSprite(WIDTH, HEIGHT); // 450 bytes needed + fb.fillSprite(TFT_BLACK); // Note: Sprite is filled with black when created + + // Text colour and alignment in graphics Sprite + gfx.setTextColor(TFT_WHITE, TFT_BLACK); + gfx.setTextDatum(MC_DATUM); + + // Text colour and alignment in frame buffer + fb.setTextColor(TFT_WHITE, TFT_BLACK); + fb.setTextDatum(MC_DATUM); + + // Next 3 lines are for test only to see what we have drawn + drawGraphics(); // draw the graphics in the gfx sprite and copy to buffer + gfx.pushSprite(0, 0); // Plot to screen so we see what it looks like + delay(2000); +} + +//========================================================================================== +//========================================================================================== + +void loop() { +uint32_t tnow = millis(); + drawGraphics(); // Not needed if scrolling graphics are static + + wrappingScroll(XDELTA, YDELTA); + + // Plot two copies without "Hello", then one in the middle with "Hello" + //fb.setBitmapColor(TFT_WHITE, TFT_RED ); + fb.pushSprite(0, 0); // Plot frame buffer onto the TFT screen + //fb.setBitmapColor(TFT_WHITE, TFT_BLUE ); + fb.pushSprite(120, 0); // Plot frame buffer onto the TFT screen + + fb.drawString("Hello", 30, 20, 2); // Plot hello in frame buffer + //fb.setBitmapColor(TFT_BLACK, TFT_GREEN); + fb.pushSprite(60, 0); // Plot frame buffer in middle of other two + + //Serial.println(millis() - tnow); + delay(20); +} + +//========================================================================================== +// Draw graphics in the master Sprite +//========================================================================================== + +void drawGraphics(void) +{ + gfx.fillSprite(TFT_BLACK); // Clear sprite each time and completely redraw + + //gfx.drawRect(0,0,60,60,TFT_WHITE); // Test to check alignment + + gfx.drawCircle( 30 , 30, radius, TFT_WHITE); + if (grow) radius++; + else radius--; + + if ( radius > 25 ) grow = false; + if ( radius < 1 ) grow = true; + + gfx.drawString("World", 30, 40, 2); // Plot hello in frame buffer +} + +//========================================================================================== +// This function scrolls and wraps the graphic in a 1 bit per pixel Sprite, dy and dy +// control the scroll direction. Pixels that scroll off one side appear on the other. +// Scrolling is achieved by plotting one Sprite inside another with an offset. This has +// to be done by plotting 4 times into a second frame buffer Sprite. +//========================================================================================== +void wrappingScroll(int16_t dx, int16_t dy) +{ + // Position the quadrants so they overlap all areas of the buffer + scroll_x += dx; + if (scroll_x < -WIDTH) scroll_x += WIDTH; + if (scroll_x > 0) scroll_x -= WIDTH; + + scroll_y += dy; + if (scroll_y < -HEIGHT) scroll_y += HEIGHT; + if (scroll_y > 0) scroll_y -= HEIGHT; + + // push the 4 quadrants of gfx. sprite into the fb. sprite + // pushImage will do the cropping + fb.pushImage(scroll_x, scroll_y, WIDTH, HEIGHT, gfxPtr); + fb.pushImage(scroll_x + WIDTH, scroll_y, WIDTH, HEIGHT, gfxPtr); + fb.pushImage(scroll_x, scroll_y + HEIGHT, WIDTH, HEIGHT, gfxPtr); + fb.pushImage(scroll_x + WIDTH, scroll_y + HEIGHT, WIDTH, HEIGHT, gfxPtr); +} + +//========================================================================================== diff --git a/examples/Test and diagnostics/Colour_Test/Colour_Test.ino b/examples/Test and diagnostics/Colour_Test/Colour_Test.ino new file mode 100644 index 0000000..ed7a061 --- /dev/null +++ b/examples/Test and diagnostics/Colour_Test/Colour_Test.ino @@ -0,0 +1,132 @@ + +// Diagnostic test for the displayed colour order +// +// Writen by Bodmer 17/2/19 for the TFT_eSPI library: +// https://github.com/Bodmer/TFT_eSPI + +/* + Different hardware manufacturers use different colour order + configurations at the hardware level. This may result in + incorrect colours being displayed. + + Incorrectly displayed colours could also be the result of + using the wrong display driver in the library setup file. + + Typically displays have a control register (MADCTL) that can + be used to set the Red Green Blue (RGB) colour order to RGB + or BRG so that red and blue are swapped on the display. + + This control register is also used to manage the display + rotation and coordinate mirroring. The control register + typically has 8 bits, for the ILI9341 these are: + + Bit Function + 7 Mirror Y coordinate (row address order) + 6 Mirror X coordinate (column address order) + 5 Row/column exchange (for rotation) + 4 Refresh direction (top to bottom or bottom to top in portrait orientation) + 3 RGB order (swaps red and blue) + 2 Refresh direction (top to bottom or bottom to top in landscape orientation) + 1 Not used + 0 Not used + + The control register bits can be written with this example command sequence: + + tft.writecommand(TFT_MADCTL); + tft.writedata(0x48); // Bits 6 and 3 set + + 0x48 is the default value for ILI9341 (0xA8 for ESP32 M5STACK) + in rotation 0 orientation. + + Another control register can be used to "invert" colours, + this swaps black and white as well as other colours (e.g. + green to magenta, red to cyan, blue to yellow). + + To invert colours insert this line after tft.init() or tft.begin(): + + tft.invertDisplay( invert ); // Where invert is true or false + +*/ + +#include + +#include // Hardware-specific library + +TFT_eSPI tft = TFT_eSPI(); // Invoke custom library + +void setup(void) { + tft.init(); + + tft.fillScreen(TFT_BLACK); + + // Set "cursor" at top left corner of display (0,0) and select font 4 + tft.setCursor(0, 0, 4); + + // Set the font colour to be white with a black background + tft.setTextColor(TFT_WHITE, TFT_BLACK); + + // We can now plot text on screen using the "print" class + tft.println("Intialised default\n"); + tft.println("White text"); + + tft.setTextColor(TFT_RED, TFT_BLACK); + tft.println("Red text"); + + tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.println("Green text"); + + tft.setTextColor(TFT_BLUE, TFT_BLACK); + tft.println("Blue text"); + + delay(5000); + +} + +void loop() { + + tft.invertDisplay( false ); // Where i is true or false + + tft.fillScreen(TFT_BLACK); + + tft.setCursor(0, 0, 4); + + tft.setTextColor(TFT_WHITE, TFT_BLACK); + tft.println("Invert OFF\n"); + + tft.println("White text"); + + tft.setTextColor(TFT_RED, TFT_BLACK); + tft.println("Red text"); + + tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.println("Green text"); + + tft.setTextColor(TFT_BLUE, TFT_BLACK); + tft.println("Blue text"); + + delay(5000); + + + // Binary inversion of colours + tft.invertDisplay( true ); // Where i is true or false + + tft.fillScreen(TFT_BLACK); + + tft.setCursor(0, 0, 4); + + tft.setTextColor(TFT_WHITE, TFT_BLACK); + tft.println("Invert ON\n"); + + tft.println("White text"); + + tft.setTextColor(TFT_RED, TFT_BLACK); + tft.println("Red text"); + + tft.setTextColor(TFT_GREEN, TFT_BLACK); + tft.println("Green text"); + + tft.setTextColor(TFT_BLUE, TFT_BLACK); + tft.println("Blue text"); + + delay(5000); +} diff --git a/examples/Test and diagnostics/Read_User_Setup/Read_User_Setup.ino b/examples/Test and diagnostics/Read_User_Setup/Read_User_Setup.ino index 45d48bf..f13cb16 100644 --- a/examples/Test and diagnostics/Read_User_Setup/Read_User_Setup.ino +++ b/examples/Test and diagnostics/Read_User_Setup/Read_User_Setup.ino @@ -41,6 +41,8 @@ void loop(void) { tft.getSetup(user); // Serial.printf("\n[code]\n"); + +Serial.print ("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 diff --git a/keywords.txt b/keywords.txt index 53b0825..f89d981 100644 --- a/keywords.txt +++ b/keywords.txt @@ -6,6 +6,9 @@ drawChar KEYWORD2 setAddrWindow KEYWORD2 setWindow KEYWORD2 readAddrWindow KEYWORD2 +startWrite KEYWORD2 +writeColor KEYWORD2 +endWrite KEYWORD2 pushColor KEYWORD2 pushColors KEYWORD2 fillScreen KEYWORD2 @@ -36,6 +39,7 @@ getCursorY KEYWORD2 setTextColor KEYWORD2 setTextSize KEYWORD2 setTextFont KEYWORD2 +setFreeFont KEYWORD2 setTextWrap KEYWORD2 setTextDatum KEYWORD2 setTextPadding KEYWORD2 @@ -70,11 +74,11 @@ textWidth KEYWORD2 fontHeight KEYWORD2 getTouchRaw KEYWORD2 +convertRawXY KEYWORD2 getTouchRawZ KEYWORD2 getTouch KEYWORD2 calibrateTouch KEYWORD2 setTouch KEYWORD2 -validTouch KEYWORD2 TFT_eSPI_Button KEYWORD1 @@ -93,7 +97,13 @@ TFT_eSprite KEYWORD1 createSprite KEYWORD2 setColorDepth KEYWORD2 +getColorDepth KEYWORD2 deleteSprite KEYWORD2 +pushRotated KEYWORD2 +rotatedBounds KEYWORD2 +setPivot KEYWORD2 +getPivotX KEYWORD2 +getPivotY KEYWORD2 fillSprite KEYWORD2 pushBitmap KEYWORD2 pushSprite KEYWORD2 diff --git a/library.json b/library.json index 5265998..1474e04 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "1.0.0", + "version": "1.4.9", "keywords": "tft, ePaper, display, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486, ST7789", "description": "A TFT and ePaper SPI graphics library for ESP8266 and ESP32", "repository": diff --git a/library.properties b/library.properties index e789025..a8b48c7 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ name=TFT_eSPI -version=1.0.0 +version=1.4.9 author=Bodmer maintainer=Bodmer -sentence=A fast TFT library for ESP8266 processors and the Arduino IDE -paragraph=Supports TFT displays using drivers (ILI9341 etc) that operate with hardware SPI. +sentence=A fast TFT graphics library for ESP8266 and ESP32 processors for the Arduino IDE +paragraph=Supports TFT displays using drivers (ILI9341 etc) that operate with hardware SPI or 8 bit parallel. category=Display -url=http://www.instructables.com/id/Arduino-TFT-display-and-font-library/ +url=https://github.com/Bodmer/TFT_eSPI architectures=esp8266,esp32 includes=TFT_eSPI.h