mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-19 17:26:38 +00:00
Add Lanbon L9 for testing
This commit is contained in:
parent
80a9ddb3ea
commit
b55efe007d
@ -25,7 +25,18 @@ void ArduinoGfx::init(int w, int h)
|
||||
{
|
||||
LOG_TRACE(TAG_TFT, F(D_SERVICE_STARTING));
|
||||
|
||||
#if(TFT_WIDTH == 480) && (TFT_HEIGHT == 480) && defined(LILYGO_T_RGB)
|
||||
#if(TFT_WIDTH == 170) && (TFT_HEIGHT == 320)
|
||||
Arduino_DataBus *bus = new Arduino_ESP32PAR8Q(
|
||||
TFT_DC, TFT_CS, TFT_WR, TFT_RD,
|
||||
TFT_D0, TFT_D1, TFT_D2, TFT_D3, TFT_D4, TFT_D5, TFT_D6, TFT_D7);
|
||||
Arduino_GFX *gfx = new Arduino_ST7789(bus,
|
||||
TFT_RST /* RST */, TFT_ROTATION /* rotation */, true /* IPS */,
|
||||
TFT_WIDTH /* width */, TFT_HEIGHT /* height */,
|
||||
35 /* col offset 1 */, 0 /* row offset 1 */,
|
||||
35 /* col offset 2 */, 0 /* row offset 2 */
|
||||
);
|
||||
|
||||
#elif(TFT_WIDTH == 480) && (TFT_HEIGHT == 480) && defined(LILYGO_T_RGB)
|
||||
Wire.begin(8 /* SDA */, 48 /* SCL */, 800000L /* speed */);
|
||||
Arduino_DataBus* bus = new Arduino_XL9535SWSPI(8 /* SDA */, 48 /* SCL */, 2 /* XL PWD */, 3 /* XL CS */,
|
||||
5 /* XL SCK */, 4 /* XL MOSI */);
|
||||
|
68
user_setups/esp32s3/lanbon_l9.ini
Normal file
68
user_setups/esp32s3/lanbon_l9.ini
Normal file
@ -0,0 +1,68 @@
|
||||
;***************************************************;
|
||||
; Lanbon L9 with ST7789 ;
|
||||
;***************************************************;
|
||||
|
||||
[env:lanbon_l9]
|
||||
extends = arduino_esp32s3_v2, flash_16mb
|
||||
board = esp32-s3-devkitc-1
|
||||
board_build.arduino.memory_type = qio_opi
|
||||
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
${esp32s3.build_flags}
|
||||
${esp32s3.ps_ram}
|
||||
-D HASP_MODEL="Lanbon L9"
|
||||
;-D ARDUINO_USB_MODE=0
|
||||
;-DARDUINO_USB_CDC_ON_BOOT
|
||||
;-DUSE_USB_CDC_CONSOLE
|
||||
|
||||
;region -- TFT_eSPI build options ------------------------
|
||||
-D ST7789_DRIVER=1
|
||||
-D HASP_USE_ARDUINOGFX=1
|
||||
-D TFT_WIDTH=170
|
||||
-D TFT_HEIGHT=320
|
||||
-D TFT_ROTATION=0 ; see TFT_ROTATION values
|
||||
; -D TFT_INVERSION_OFF ; for normal colors
|
||||
;-D TFT_INVERSION_ON
|
||||
;-D TFT_RGB_ORDER=0 ; Colour order Blue-Green-Red
|
||||
;-D INVERT_COLORS=1 ; for inverted colors
|
||||
|
||||
-D TFT_RST=-1
|
||||
-D TFT_CS=21
|
||||
-D TFT_DC=17
|
||||
-D TFT_WR=13
|
||||
-D TFT_RD=18
|
||||
-D TFT_D0=6
|
||||
-D TFT_D1=7
|
||||
-D TFT_D2=15
|
||||
-D TFT_D3=16
|
||||
-D TFT_D4=10
|
||||
-D TFT_D5=9
|
||||
-D TFT_D6=46
|
||||
-D TFT_D7=3
|
||||
-D TFT_BCKL=42
|
||||
; Touch Setttings
|
||||
-D TOUCH_WIDTH=170
|
||||
-D TOUCH_HEIGHT=320
|
||||
-D TOUCH_DRIVER=0x911
|
||||
-D TOUCH_SCL=0
|
||||
-D TOUCH_SDA=35
|
||||
-D TOUCH_IRQ=-1
|
||||
-D TOUCH_RST=-1
|
||||
-D I2C_TOUCH_ADDRESS=0x5d ; or 0x14
|
||||
-D I2C_TOUCH_FREQUENCY=400000
|
||||
;endregion
|
||||
|
||||
;region -- Library options -------------------------------
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
${esp32s3.lib_deps}
|
||||
${arduino_esp32s3_v2.lib_deps}
|
||||
${arduinogfx.lib_deps}
|
||||
${goodix.lib_deps}
|
||||
|
||||
lib_ignore =
|
||||
${env.lib_ignore}
|
||||
${esp32s3.lib_ignore}
|
||||
${arduino_esp32s3_v2.lib_ignore}
|
||||
;endregion
|
Loading…
x
Reference in New Issue
Block a user