diff --git a/boards/JC4827W543C.json b/boards/JC4827W543C.json new file mode 100644 index 0000000..167333f --- /dev/null +++ b/boards/JC4827W543C.json @@ -0,0 +1,40 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "partitions": "default_16MB.csv", + "memory_type": "qio_opi" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=1", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=0" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "esp32s3_wroom_1_N16R8" + }, + "connectivity": ["bluetooth", "wifi"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "Guition JC4827W543C (16 MB FLASH, 8 MB PSRAM)", + "upload": { + "flash_size": "16MB", + "maximum_ram_size": 327680, + "maximum_size": 16777216, + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://aliexpress.com/item/1005006625303218.html", + "vendor": "Guition" +} diff --git a/platformio.ini b/platformio.ini index 8b36726..50ce1bf 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,7 +13,7 @@ default_envs = native-mui [device-ui_base] lib_deps = - https://github.com/meshtastic/device-ui/archive/7473151c8a4c2248200c6e864142a5227f221aa8.zip + https://github.com/meshtastic/device-ui/archive/d9eef22c0d1ddcf39f3dedaf426ac0efa34eb0fb.zip nanopb/Nanopb@^0.4.91 @@ -37,7 +37,7 @@ build_flags = -std=c++17 -Os -I src/mesh/generated lib_deps = ${device-ui_base.lib_deps} - lovyan03/LovyanGFX@1.2.0 + https://github.com/lovyan03/LovyanGFX/archive/80788f07120871f595f2e1f8581f3fa881405ff6.zip ; develop branch [env:wt32-sc01-plus-mui] board = wt32-sc01-plus @@ -248,6 +248,43 @@ lib_deps = ${env.lib_deps} LittleFS +[env:JC4827W543C-mui] +board = JC4827W543C +board_build.partitions = default_16MB.csv +upload_protocol = esptool +build_flags = ${env.build_flags} + -D ARCH_ESP32 + -D JC4827W543C + -D USE_ILOG + -D LV_USE_LOG=0 + -D WAIT_FOR_SERIAL0 + ;-D WAKE_ON_SERIAL + -D USE_SERIAL1 + -D SERIAL_RX=17 + -D SERIAL_TX=18 + -D BUTTON_PIN=0 +; -D INPUTDRIVER_BUTTON_TYPE=0 +; -D HAS_SDCARD + -D MAP_FULL_REDRAW + -D HAS_TFT=1 + -D RAM_SIZE=6144 + -D LV_CACHE_DEF_SIZE=3145728 + -D LV_USE_SYSMON=0 + -D LV_USE_PROFILER=0 + -D LV_USE_PERF_MONITOR=0 + -D LV_USE_MEM_MONITOR=0 + -D DISPLAY_SET_RESOLUTION + -D LGFX_DRIVER=LGFX_JC4827W543C + -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_JC4827W543C.h\" + -D VIEW_320x240 + -I lib + -I lib/mesh/generated + -I variants/JC4827W543 +build_src_filter = ${env.build_src_filter} + +<../lib/mesh> +lib_deps = ${env.lib_deps} + LittleFS + [env:t-hmi-mui] board = lilygo-t-hmi board_build.partitions = default_16MB.csv diff --git a/variants/JC4827W543/pins_arduino.h b/variants/JC4827W543/pins_arduino.h new file mode 100644 index 0000000..469c7d9 --- /dev/null +++ b/variants/JC4827W543/pins_arduino.h @@ -0,0 +1,63 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include "soc/soc_caps.h" +#include + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +static const uint8_t SPI_MOSI = 13; +static const uint8_t SPI_SCK = 12; +static const uint8_t SPI_MISO = 11; +static const uint8_t SPI_CS = 45; +static const uint8_t SDCARD_CS = 10; + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 8; +static const uint8_t SCL = 4; + +static const uint8_t SS = 45; +static const uint8_t MOSI = 13; +static const uint8_t MISO = 11; +static const uint8_t SCK = 12; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +#endif /* Pins_Arduino_h */