From f33674c1a26591ca6c981d41e81585b6252c8343 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Mon, 19 Apr 2021 00:30:28 +0100 Subject: [PATCH] Fix #1144 (RP2040 SPI pin settings) Library now uses setup defined pins for SPI instead of defaults set by board package. --- Processors/TFT_eSPI_RP2040.c | 7 +++++-- examples/Smooth Fonts/SPIFFS/Font_Demo_1/Font_Demo_1.ino | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Processors/TFT_eSPI_RP2040.c b/Processors/TFT_eSPI_RP2040.c index 2454bf8..b58eb96 100644 --- a/Processors/TFT_eSPI_RP2040.c +++ b/Processors/TFT_eSPI_RP2040.c @@ -6,8 +6,11 @@ // Global variables //////////////////////////////////////////////////////////////////////////////////////// -// Select the SPI port to use -SPIClass& spi = SPI; +#if !defined (TFT_PARALLEL_8_BIT) + // Select the SPI port to use + //SPIClass& spi = SPI; + MbedSPI spi = MbedSPI(TFT_MISO, TFT_MOSI, TFT_SCLK); +#endif #ifdef RP2040_DMA uint32_t dma_tx_channel; diff --git a/examples/Smooth Fonts/SPIFFS/Font_Demo_1/Font_Demo_1.ino b/examples/Smooth Fonts/SPIFFS/Font_Demo_1/Font_Demo_1.ino index e38a5ee..f33526b 100644 --- a/examples/Smooth Fonts/SPIFFS/Font_Demo_1/Font_Demo_1.ino +++ b/examples/Smooth Fonts/SPIFFS/Font_Demo_1/Font_Demo_1.ino @@ -37,7 +37,7 @@ #define AA_FONT_SMALL "NotoSansBold15" #define AA_FONT_LARGE "NotoSansBold36" -// Font files are stored in SPIFFS, so load the linbrary +// Font files are stored in SPIFFS, so load the library #include #include