diff --git a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp index 398dba0df..6e39edb70 100644 --- a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp +++ b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp @@ -31,6 +31,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef ESP32 +#define USE_UFILESYS +#endif + #include "Adafruit_GFX.h" #include "glcdfont.c" #ifdef __AVR__ diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp index d71a77368..1a752eb53 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp @@ -104,7 +104,7 @@ uint8_t *Renderer::allocate_framebuffer(uint32_t size) { void Renderer::setTextSize(uint8_t sf) { if (sf < 1) sf = 1; - if (sf > 4) sf = 4; + if (sf > 16) sf = 16; tsize = sf; Adafruit_GFX::setTextSize(sf); } diff --git a/lib/lib_display/UDisplay/uDisplay.cpp b/lib/lib_display/UDisplay/uDisplay.cpp index 4581cee9c..3b974eab9 100755 --- a/lib/lib_display/UDisplay/uDisplay.cpp +++ b/lib/lib_display/UDisplay/uDisplay.cpp @@ -483,6 +483,11 @@ Renderer *uDisplay::Init(void) { } #endif // ESP32 + + spiSettings = SPISettings((uint32_t)spi_speed*1000000, MSBFIRST, SPI_MODE3); + SPI_BEGIN_TRANSACTION + + if (reset >= 0) { pinMode(reset, OUTPUT); digitalWrite(reset, HIGH); @@ -493,11 +498,7 @@ Renderer *uDisplay::Init(void) { delay(200); } - spiSettings = SPISettings((uint32_t)spi_speed*1000000, MSBFIRST, SPI_MODE3); - uint16_t index = 0; - - SPI_BEGIN_TRANSACTION while (1) { uint8_t iob; SPI_CS_LOW @@ -1213,7 +1214,8 @@ void uDisplay::pushColors(uint16_t *data, uint16_t len, boolean not_swapped) { // special version 8 bit spi I or II #ifdef ESP8266 while (len--) { - uspi->write(*data++); + //uspi->write(*data++); + WriteColor(*data++); } #else uspi->writePixels(data, len * 2);