Merge pull request #295 from paelzer/master
Added support for another ESP32_2432S028 variant.
This commit is contained in:
commit
a9fcf7d5a9
@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
globallib_dir = lib
|
globallib_dir = lib
|
||||||
default_envs = M5Stick-C, esp32cam, ESP32-2432S028R, NerminerV2, Lilygo-T-Embed, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-AMOLED, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S3-mini-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini
|
|
||||||
|
default_envs = M5Stick-C, esp32cam, ESP32-2432S028R, ESP32_2432S028_2USB, NerminerV2, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-AMOLED, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S3-mini-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini
|
||||||
|
|
||||||
|
|
||||||
[env:M5Stick-C]
|
[env:M5Stick-C]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
@ -406,6 +408,56 @@ lib_deps =
|
|||||||
|
|
||||||
;--------------------------------------------------------------------
|
;--------------------------------------------------------------------
|
||||||
|
|
||||||
|
; This env is just for another type of the popular ESP32_2432S028 which need different settings than others
|
||||||
|
; like TFT inversion
|
||||||
|
; and different gamma settings
|
||||||
|
|
||||||
|
[env:ESP32_2432S028_2USB]
|
||||||
|
platform = espressif32
|
||||||
|
board = esp32dev
|
||||||
|
framework = arduino
|
||||||
|
monitor_speed = 115200
|
||||||
|
upload_speed = 921600
|
||||||
|
;build_type = debug
|
||||||
|
board_build.partitions = huge_app.csv
|
||||||
|
build_flags =
|
||||||
|
;-DDEBUG_MEMORY=1
|
||||||
|
-D ESP32_2432S028_2USB=1
|
||||||
|
-DTFT_INVERSION_ON
|
||||||
|
-DUSER_SETUP_LOADED=1
|
||||||
|
-DILI9341_2_DRIVER=1
|
||||||
|
-DTFT_WIDTH=240
|
||||||
|
-DTFT_HEIGHT=320
|
||||||
|
-DTFT_BACKLIGHT_ON=HIGH
|
||||||
|
-DTFT_MOSI=13
|
||||||
|
-DTFT_SCLK=14
|
||||||
|
-DTFT_CS=15
|
||||||
|
-DTFT_DC=2
|
||||||
|
-DTFT_RST=12
|
||||||
|
-DTFT_BL=21
|
||||||
|
-DETOUCH_CS=33
|
||||||
|
-DTOUCH_CLK=25
|
||||||
|
-DTOUCH_MISO=39
|
||||||
|
-DTOUCH_MOSI=32
|
||||||
|
-DTOUCH_IRQ=36
|
||||||
|
-DLOAD_GLCD=1
|
||||||
|
-DLOAD_FONT2=1
|
||||||
|
-DLOAD_GFXFF=1
|
||||||
|
-DSMOOTH_FONT=1
|
||||||
|
-DSPI_FREQUENCY=55000000
|
||||||
|
-DSPI_READ_FREQUENCY=20000000
|
||||||
|
-DSPI_TOUCH_FREQUENCY=2500000
|
||||||
|
lib_deps =
|
||||||
|
https://github.com/takkaO/OpenFontRender
|
||||||
|
bblanchon/ArduinoJson@^6.21.2
|
||||||
|
https://github.com/tzapu/WiFiManager.git#v2.0.16-rc.2
|
||||||
|
mathertel/OneButton @ ^2.0.3
|
||||||
|
arduino-libraries/NTPClient
|
||||||
|
bodmer/TFT_eSPI @ ^2.5.31
|
||||||
|
https://github.com/achillhasler/TFT_eTouch
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------
|
||||||
|
|
||||||
[env:ESP32-2432S028R]
|
[env:ESP32-2432S028R]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include "lilygoS3TEmbed.h"
|
#include "lilygoS3TEmbed.h"
|
||||||
#elif defined(ESP32_2432S028R)
|
#elif defined(ESP32_2432S028R)
|
||||||
#include "esp322432s028r.h"
|
#include "esp322432s028r.h"
|
||||||
|
#elif defined(ESP32_2432S028_2USB) // For another type of ESP32_2432S028 version with 2 USB connectors
|
||||||
|
#include "esp322432s028r.h"
|
||||||
#elif defined(NERMINER_T_QT)
|
#elif defined(NERMINER_T_QT)
|
||||||
#include "lilygoT_QT.h"
|
#include "lilygoT_QT.h"
|
||||||
#elif defined(NERDMINER_T_DISPLAY_V1)
|
#elif defined(NERDMINER_T_DISPLAY_V1)
|
||||||
|
@ -24,6 +24,10 @@ DisplayDriver *currentDisplayDriver = &dongleDisplayDriver;
|
|||||||
DisplayDriver *currentDisplayDriver = &esp32_2432S028RDriver;
|
DisplayDriver *currentDisplayDriver = &esp32_2432S028RDriver;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ESP32_2432S028_2USB
|
||||||
|
DisplayDriver *currentDisplayDriver = &esp32_2432S028RDriver;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef T_QT_DISPLAY
|
#ifdef T_QT_DISPLAY
|
||||||
DisplayDriver *currentDisplayDriver = &t_qtDisplayDriver;
|
DisplayDriver *currentDisplayDriver = &t_qtDisplayDriver;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "displayDriver.h"
|
#include "displayDriver.h"
|
||||||
|
|
||||||
#ifdef ESP32_2432S028R
|
#if defined ESP32_2432S028R || ESP32_2432S028_2USB
|
||||||
|
|
||||||
#include <TFT_eSPI.h>
|
#include <TFT_eSPI.h>
|
||||||
#include <TFT_eTouch.h>
|
#include <TFT_eTouch.h>
|
||||||
@ -32,6 +32,17 @@ void esp32_2432S028R_Init(void)
|
|||||||
{
|
{
|
||||||
tft.init();
|
tft.init();
|
||||||
tft.setRotation(1);
|
tft.setRotation(1);
|
||||||
|
#ifdef ESP32_2432S028_2USB
|
||||||
|
/*
|
||||||
|
In addition to TFT_INVERSION this adjusts the gamma curve to have better
|
||||||
|
picture quality for this type of ESP32_2432S028 TFT with for example two USB connectors
|
||||||
|
*/
|
||||||
|
tft.writecommand(ILI9341_GAMMASET); // Gamma curve selected
|
||||||
|
tft.writedata(2);
|
||||||
|
delay(120);
|
||||||
|
tft.writecommand(ILI9341_GAMMASET); // Gamma curve selected
|
||||||
|
tft.writedata(1);
|
||||||
|
#endif
|
||||||
tft.setSwapBytes(true); // Swap the colour byte order when rendering
|
tft.setSwapBytes(true); // Swap the colour byte order when rendering
|
||||||
hSPI.begin(TOUCH_CLK, TOUCH_MISO, TOUCH_MOSI, ETOUCH_CS);
|
hSPI.begin(TOUCH_CLK, TOUCH_MISO, TOUCH_MOSI, ETOUCH_CS);
|
||||||
touch.init();
|
touch.init();
|
||||||
|
Loading…
Reference in New Issue
Block a user