mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-04 21:24:44 +02:00
Update Read_User_Setup example for RP2040
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
#ifndef _TFT_eSPIH_
|
#ifndef _TFT_eSPIH_
|
||||||
#define _TFT_eSPIH_
|
#define _TFT_eSPIH_
|
||||||
|
|
||||||
#define TFT_ESPI_VERSION "2.3.84"
|
#define TFT_ESPI_VERSION "2.3.85"
|
||||||
|
|
||||||
// Bit level feature flags
|
// Bit level feature flags
|
||||||
// Bit 0 set: viewport capability
|
// Bit 0 set: viewport capability
|
||||||
|
@@ -74,15 +74,9 @@ if (user.r2_y_offset != 0) { Serial.print("R2 y offset = "); Serial.println(us
|
|||||||
if (user.r3_x_offset != 0) { Serial.print("R3 x offset = "); Serial.println(user.r3_x_offset); }
|
if (user.r3_x_offset != 0) { Serial.print("R3 x offset = "); Serial.println(user.r3_x_offset); }
|
||||||
if (user.r3_y_offset != 0) { Serial.print("R3 y offset = "); Serial.println(user.r3_y_offset); }
|
if (user.r3_y_offset != 0) { Serial.print("R3 y offset = "); Serial.println(user.r3_y_offset); }
|
||||||
|
|
||||||
#ifdef ESP32
|
if (user.pin_tft_mosi != -1) { Serial.print("MOSI = "); Serial.print("GPIO "); Serial.println(getPinName(user.pin_tft_mosi)); }
|
||||||
if (user.pin_tft_mosi != -1) { Serial.print("MOSI = "); Serial.print("GPIO "); Serial.println(user.pin_tft_mosi); }
|
if (user.pin_tft_miso != -1) { Serial.print("MISO = "); Serial.print("GPIO "); Serial.println(getPinName(user.pin_tft_miso)); }
|
||||||
if (user.pin_tft_miso != -1) { Serial.print("MISO = "); Serial.print("GPIO "); Serial.println(user.pin_tft_miso); }
|
if (user.pin_tft_clk != -1) { Serial.print("SCK = "); Serial.print("GPIO "); Serial.println(getPinName(user.pin_tft_clk)); }
|
||||||
if (user.pin_tft_clk != -1) { Serial.print("SCK = "); Serial.print("GPIO "); Serial.println(user.pin_tft_clk); }
|
|
||||||
#else
|
|
||||||
if (user.pin_tft_mosi != -1) { Serial.print("MOSI = "); Serial.print("GPIO "); Serial.print(getPinName(user.pin_tft_mosi)); Serial.println(user.pin_tft_mosi); }
|
|
||||||
if (user.pin_tft_miso != -1) { Serial.print("MISO = "); Serial.print("GPIO "); Serial.print(getPinName(user.pin_tft_miso)); Serial.println(user.pin_tft_miso); }
|
|
||||||
if (user.pin_tft_clk != -1) { Serial.print("SCK = "); Serial.print("GPIO "); Serial.print(getPinName(user.pin_tft_clk)); Serial.println(user.pin_tft_clk); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
if (user.overlap == true)
|
if (user.overlap == true)
|
||||||
@@ -150,8 +144,7 @@ if (user.pin_tch_cs != -1) { Serial.print("Touch SPI frequency = "); Serial.pr
|
|||||||
|
|
||||||
Serial.println("[/code]");
|
Serial.println("[/code]");
|
||||||
|
|
||||||
while(1) yield();
|
delay(3000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void printProcessorName(void)
|
void printProcessorName(void)
|
||||||
@@ -167,7 +160,7 @@ void printProcessorName(void)
|
|||||||
int8_t getPinName(int8_t pin)
|
int8_t getPinName(int8_t pin)
|
||||||
{
|
{
|
||||||
// For ESP32 pin labels on boards use the GPIO number
|
// For ESP32 pin labels on boards use the GPIO number
|
||||||
if (user.esp == 0x32) return pin;
|
if (user.esp == 0x32 || user.esp == 0x2040) return pin;
|
||||||
|
|
||||||
if (user.esp == 0x8266) {
|
if (user.esp == 0x8266) {
|
||||||
// For ESP8266 the pin labels are not the same as the GPIO number
|
// For ESP8266 the pin labels are not the same as the GPIO number
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "TFT_eSPI",
|
"name": "TFT_eSPI",
|
||||||
"version": "2.3.84",
|
"version": "2.3.85",
|
||||||
"keywords": "Arduino, tft, ePaper, display, Pico, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, RM68140, SSD1351, SSD1963, ILI9225, HX8357D",
|
"keywords": "Arduino, tft, ePaper, display, Pico, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, RM68140, SSD1351, SSD1963, ILI9225, HX8357D",
|
||||||
"description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, ESP8266, ESP32 and STM32",
|
"description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, ESP8266, ESP32 and STM32",
|
||||||
"repository":
|
"repository":
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
name=TFT_eSPI
|
name=TFT_eSPI
|
||||||
version=2.3.84
|
version=2.3.85
|
||||||
author=Bodmer
|
author=Bodmer
|
||||||
maintainer=Bodmer
|
maintainer=Bodmer
|
||||||
sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32
|
sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32
|
||||||
|
Reference in New Issue
Block a user