From e2af3e095111ed9389483fd20fde30dc4560f385 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 29 Mar 2020 20:08:30 +0200 Subject: [PATCH] M5 TFT display support (experimental) --- platformio.ini | 6 ++++-- src/hal/m5core.h | 1 - src/hal/m5fire.h | 10 ++-------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/platformio.ini b/platformio.ini index c47248c8..f2d0801e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -7,7 +7,7 @@ ; ---> SELECT THE TARGET PLATFORM HERE! <--- [board] -halfile = generic.h +;halfile = generic.h ;halfile = ebox.h ;halfile = eboxtube.h ;halfile = ecopower.h @@ -32,7 +32,7 @@ halfile = generic.h ;halfile = tinypico.h ;halfile = tinypicomatrix.h ;halfile = m5core.h -;halfile = m5fire.h +halfile = m5fire.h [platformio] ; upload firmware to board with usb cable @@ -98,6 +98,8 @@ build_flags_basic = '-DCORE_DEBUG_LEVEL=${common.debug_level}' '-DLOG_LOCAL_LEVEL=${common.debug_level}' '-DPROGVERSION="${common.release_version}"' + '-DUSER_SETUP_LOADED=1' + build_flags_sensors = -Llib/Bosch-BSEC/src/esp32/ -lalgobsec diff --git a/src/hal/m5core.h b/src/hal/m5core.h index 55d0b0fc..d70839ea 100644 --- a/src/hal/m5core.h +++ b/src/hal/m5core.h @@ -48,7 +48,6 @@ // Display Settings #define MY_DISPLAY_WIDTH 320 #define MY_DISPLAY_HEIGHT 240 -#define MY_DISPLAY_INVERT 1 // setting for M5 display #define ILI9341_DRIVER 1 diff --git a/src/hal/m5fire.h b/src/hal/m5fire.h index 53e962df..0c110328 100644 --- a/src/hal/m5fire.h +++ b/src/hal/m5fire.h @@ -49,7 +49,6 @@ // Display Settings #define MY_DISPLAY_WIDTH 320 #define MY_DISPLAY_HEIGHT 240 -#define MY_DISPLAY_INVERT 1 // setting for M5 display #define ILI9341_DRIVER 1 @@ -63,9 +62,7 @@ #define TFT_RST GPIO_NUM_33 // Reset #define TFT_BL GPIO_NUM_32 // LED back-light -//#define USE_HSPI_PORT -#define TFT_SDA_READ -#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +//#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 // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH @@ -78,9 +75,6 @@ #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 - -// Optional reduced SPI frequency for reading TFT -#define SPI_READ_FREQUENCY 5000000 +#define SPI_FREQUENCY 40000000 #endif \ No newline at end of file