Skip to content

Commit

Permalink
Merge branch 'dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
BitMaker-hub authored Apr 9, 2024
2 parents 976c21e + c13960a commit a8a4eb0
Show file tree
Hide file tree
Showing 11 changed files with 1,919 additions and 4 deletions.
46 changes: 46 additions & 0 deletions boards/lilygo-t-hmi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"build": {
"arduino":{
"ldscript": "esp32s3_out.ld",
"memory_type": "qio_opi",
"partitions": "default_16MB.csv"
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_MODE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0X303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "esp32s3"
},
"connectivity": [
"wifi",
"bluetooth"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "LILYGO T-HMI",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 921600
},
"url": "https://www.adafruit.com/product/5290",
"vendor": "LILYGO"
}
5 changes: 3 additions & 2 deletions lib/TFT_eSPI/User_Setup_Select.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@
#ifdef NERMINER_S3_AMOLED
#include <User_Setups/Setup206_LilyGo_T_Display_S3.h> //Just a stub. No driver implementation for S3 AMOLED in TFT_eSPI
#endif
//#include <User_Setups/Setup207_LilyGo_T_HMI.h> // For the LilyGo T-HMI S3 based ESP32S3 with ST7789 240 x 320 TFT

#ifdef NERDMINER_T_HMI
#include <User_Setups/Setup207_LilyGo_T_HMI.h> // For the LilyGo T-HMI S3 based ESP32S3 with ST7789 240 x 320 TFT
#endif
//#include <User_Setups/Setup208_ESP32_S3_Box_Lite.h> // For the ESP32 S3 Box Lite (may also work with ESP32 S3 Box)

//#include <User_Setups/Setup209_LilyGo_T_Dongle_S3.h> // For the LilyGo T-Dongle S3 based ESP32 with ST7735 80 x 160 TFT
Expand Down
36 changes: 35 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[platformio]
globallib_dir = lib

default_envs = wt32-sc01, wt32-sc01-plus, han_m5stack, M5Stick-C, esp32cam, ESP32-2432S028R, ESP32_2432S028_2USB, NerminerV2, Lilygo-T-Embed, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-GEEK, NerminerV2-S3-AMOLED, NerminerV2-S3-AMOLED-TOUCH, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S2-mini-wemos, ESP32-S3-mini-weact, ESP32-D0WD-V3-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini
default_envs = NerdminerV2-T-HMI, wt32-sc01, wt32-sc01-plus, han_m5stack, M5Stick-C, esp32cam, ESP32-2432S028R, ESP32_2432S028_2USB, NerminerV2, Lilygo-T-Embed, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-GEEK, NerminerV2-S3-AMOLED, NerminerV2-S3-AMOLED-TOUCH, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S2-mini-wemos, ESP32-S3-mini-weact, ESP32-D0WD-V3-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini

[env:M5Stick-C]
platform = espressif32
Expand Down Expand Up @@ -722,6 +722,40 @@ lib_ignore =

;--------------------------------------------------------------------

[env:NerdminerV2-T-HMI]
platform = espressif32
board = lilygo-t-hmi
framework = arduino
board_build.partitions = default_16MB.csv
monitor_filters =
esp32_exception_decoder
time
log2file

monitor_speed = 115200
upload_speed = 921600
upload_port = /dev/ttyACM0

build_flags =
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D BOARD_HAS_PSRAM
-D NERDMINER_T_HMI=1
-D USER_SETUP_LOADED=1
-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup207_LilyGo_T_HMI.h

board_build.arduino.memory_type = qio_opi
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:NerdminerV2-T-Display_V1]
platform = espressif32
board = ttgo-lora32-v1
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/devices/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
#include "wt32.h"
#elif defined(NERMINER_S3_GEEK)
#include "waveshareS3Geek.h"
#elif defined(NERDMINER_T_HMI)
#include "lilygoT_HMI.h"


#else
#error "No device defined"
Expand Down
42 changes: 42 additions & 0 deletions src/drivers/devices/lilygoT_HMI.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#ifndef _NERD_MINER_T_HMI_H
#define _NERD_MINER_T_HMI_H

#define T_HMI_DISPLAY

#define PWR_EN_PIN (10)
#define PWR_ON_PIN (14)
#define BAT_ADC_PIN (5)
#define BUTTON1_PIN (0)
#define BUTTON2_PIN (21)

#define PIN_BUTTON_1 BUTTON1_PIN
// #define PIN_BUTTON_2 BUTTON2_PIN


// touch screen
#define TOUCHSCREEN_SCLK_PIN (1)
#define TOUCHSCREEN_MISO_PIN (4)
#define TOUCHSCREEN_MOSI_PIN (3)
#define TOUCHSCREEN_CS_PIN (2)
#define TOUCHSCREEN_IRQ_PIN (9)
#define TOUCH_CLK TOUCHSCREEN_SCLK_PIN
#define TOUCH_MISO TOUCHSCREEN_MISO_PIN
#define TOUCH_MOSI TOUCHSCREEN_MOSI_PIN
#define ETOUCH_CS TOUCHSCREEN_CS_PIN


// lcd
#define PCLK_PIN (8)
#define CS_PIN (6)
#define DC_PIN (7)
#define RST_PIN (-1)
#define BK_LIGHT_PIN (38)
#define LED_PIN (8)

#ifndef TFT_BL
// XXX - defined in User_Setups/Setup207_LilyGo_T_HMI.h:37
#define TFT_BL (38) // LED back-light
#endif


#endif
4 changes: 4 additions & 0 deletions src/drivers/displays/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ DisplayDriver *currentDisplayDriver = &tDisplayV1Driver;
DisplayDriver *currentDisplayDriver = &m5stickCDriver;
#endif

#ifdef T_HMI_DISPLAY
DisplayDriver *currentDisplayDriver = &t_hmiDisplayDriver;
#endif


// Initialize the display
void initDisplay()
Expand Down
1 change: 1 addition & 0 deletions src/drivers/displays/displayDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ extern DisplayDriver esp32_2432S028RDriver;
extern DisplayDriver t_qtDisplayDriver;
extern DisplayDriver tDisplayV1Driver;
extern DisplayDriver m5stickCDriver;
extern DisplayDriver t_hmiDisplayDriver;

#define SCREENS_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

Expand Down
Loading

0 comments on commit a8a4eb0

Please sign in to comment.