Merge pull request #158 from netmindz/HD-WF2

Add support for HD-WF2
This commit is contained in:
netmindz
2024-08-26 13:27:28 +01:00
committed by GitHub
2 changed files with 127 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ default_envs =
esp32_pico_4MB_M
esp32_4MB_PSRAM_S
; esp32_4MB_PSRAM_REV3_S ;; experimental, optimized for WROVER-E with "revision3" chip
esp32S3_4MB_S
esp32S3_8MB_S ;; experimental, optimized for speed
esp32S3_8MB_M
esp32S3_4MB_PSRAM_S ;; for lolin s3 mini, S3 zero, S3 super mini - optimized for speed
@@ -1852,6 +1853,39 @@ lib_deps = ${esp32_4MB_V4_M_base.esp32_lib_deps}
# ------------------------------------------------------------------------------
# esp32-S3 environments
# ------------------------------------------------------------------------------
[env:esp32S3_4MB_S]
extends = esp32_4MB_V4_M_base
board = esp32-s3-devkitc-1
build_unflags =
-D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?)
-D USE_ALT_DISPLAY ;; four line display seems to have problems with I2C - it hangs during usermod setup
-D USERMOD_FOUR_LINE_DISPLAY ;; see above
-D USERMOD_ROTARY_ENCODER_UI ;; see above
-D WLED_ENABLE_DMX ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX)
build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-indentation -Wno-format-truncation
${common_mm.build_flags_S}
${common_mm.HUB75_build_flags}
${common_mm.animartrix_build_flags}
; -DBOARD_HAS_PSRAM -D WLED_USE_PSRAM_JSON -D WLED_USE_PSRAM ;; un-comment in case your board supports PSRAM
-D WLED_RELEASE_NAME=esp32S3_4MB_S
-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 ;; for Serial-to-USB chip
;;-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=1 ;; for Hardware-CDC USB mode
;;-D WLED_DISABLE_ADALIGHT ;; disables serial protocols - recommended for Hardware-CDC USB (Serial RX will receive junk commands when RX pin is unconnected, unless its pulled down by resistor)
-D WLED_WATCHDOG_TIMEOUT=0 -D CONFIG_ASYNC_TCP_USE_WDT=0
; -D U8X8_HAVE_2ND_HW_I2C ;; experimental - tells U8g2 lib that a second HW I2C unit exists
-D WLED_DISABLE_LOXONE ; FLASH 1272 bytes
-D WLED_DISABLE_ALEXA ; RAM 116 bytes; FLASH 13524 bytes
; -D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes
; -D WLED_DISABLE_HUESYNC ;RAM 122 bytes; FLASH 6308 bytes
; -D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes
;;-D WLEDMM_FASTPATH ; WLEDMM experimental option. Reduces audio lag (latency), and allows for faster LED framerates. May break compatibility with previous versions.
; -D WLED_DEBUG
; -D SR_DEBUG
; -D MIC_LOGGER
lib_deps = ${esp32s3.lib_deps} ${common_mm.lib_deps_S}
${common_mm.HUB75_lib_deps}
${common_mm.animartrix_lib_deps}
[env:esp32S3_8MB_M]
@@ -1866,6 +1900,8 @@ build_unflags =
build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-indentation -Wno-format-truncation
${common_mm.build_flags_S} ${common_mm.build_flags_M}
${common_mm.HUB75_build_flags}
${common_mm.animartrix_build_flags}
; -DBOARD_HAS_PSRAM -D WLED_USE_PSRAM_JSON -D WLED_USE_PSRAM ;; un-comment in case your board supports PSRAM
-D WLED_RELEASE_NAME=esp32S3_8MB_M
-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 ;; for Serial-to-USB chip
@@ -1893,6 +1929,9 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-inden
; -D SR_DEBUG
; -D MIC_LOGGER
lib_deps = ${esp32s3.lib_deps} ${common_mm.lib_deps_S} ${common_mm.lib_deps_V4_M}
${common_mm.HUB75_lib_deps}
${common_mm.animartrix_lib_deps}
;lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation
board_build.partitions = tools/WLED_ESP32_8MB.csv
board_build.flash_mode = qio
@@ -2173,6 +2212,44 @@ monitor_filters = esp32_exception_decoder
; RAM: [== ] 21.8% (used 71304 bytes from 327680 bytes)
; Flash: [======== ] 84.0% (used 1596970 bytes from 1900544 bytes)
[env:HD-WF1]
extends = esp32_4MB_V4_S_base
platform = ${esp32s2.platform} ;; using 5.2.0, due to massive connectivity problems on -S2 with 5.3.0
platform_packages = ${esp32s2.platform_packages}
board = nodemcu-32s2
upload_speed = 256000 ;; 921600
build_unflags = ${common.build_unflags}
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_DFU_ON_BOOT=0
-D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?)
-D WLED_ENABLE_DMX ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX)
-D WLED_ENABLE_DMX_INPUT ;; needs more testing
-DWLEDMM_FASTPATH ;; needs more testing on -S2
-DBOARD_HAS_PSRAM
build_flags = ${common.build_flags} ${esp32s2.build_flags}
;; ${Debug_Flags.build_flags}
-D WLED_WATCHDOG_TIMEOUT=0 -D CONFIG_ASYNC_TCP_USE_WDT=0
${common_mm.build_flags_S}
${common_mm.HUB75_build_flags}
-Wno-misleading-indentation -Wno-format-truncation
-D WLED_RELEASE_NAME=esp32s2_HD_WF1_4MB_M
-DLOLIN_WIFI_FIX -DWLEDMM_WIFI_POWERON_HACK ;; seems to work much better with this
-DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=1
-D WLED_DISABLE_ADALIGHT ;; disables serial protocols, as the board only has CDC USB
-D WLED_DISABLE_INFRARED ;; save flash space
-D WLED_DISABLE_ALEXA ;; save flash space
-D WLED_DISABLE_HUESYNC ;; save flash space
-D WLED_DISABLE_LOXONE ;; save flash space
-D WLEDMM_SAVE_FLASH
lib_deps = ${esp32s2.lib_deps} ${common_mm.lib_deps_S}
${common_mm.HUB75_lib_deps}
lib_ignore =
IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation
OneWire ; not needed as we don't include USERMOD_DALLASTEMPERATURE
monitor_filters = esp32_exception_decoder
# ------------------------------------------------------------------------------
# esp32-C3 environments

View File

@@ -557,7 +557,7 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
}
if(mxconfig.mx_height >= 64 && (bc.pins[0] > 1)) {
USER_PRINT("WARNING, only single panel can be used of 64 pixel boards due to memory")
USER_PRINT("WARNING, only single panel can be used of 64 pixel boards due to memory");
mxconfig.chain_length = 1;
}
@@ -588,6 +588,55 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
mxconfig.gpio.d = 35;
mxconfig.gpio.e = 21;
#elif defined(CONFIG_IDF_TARGET_ESP32S3) // ESP32-S3
// Huidu HD-WF2 ESP32-S3
// https://www.aliexpress.com/item/1005002258734810.html
// https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA/issues/433
USER_PRINTLN("MatrixPanel_I2S_DMA - HD-WF2 S3 config");
mxconfig.gpio.r1 = 2;
mxconfig.gpio.g1 = 6;
mxconfig.gpio.b1 = 10;
mxconfig.gpio.r2 = 3;
mxconfig.gpio.g2 = 7;
mxconfig.gpio.b2 = 11;
mxconfig.gpio.lat = 33;
mxconfig.gpio.oe = 35;
mxconfig.gpio.clk = 34;
mxconfig.gpio.a = 39;
mxconfig.gpio.b = 38;
mxconfig.gpio.c = 37;
mxconfig.gpio.d = 36;
mxconfig.gpio.e = 21;
#elif defined(CONFIG_IDF_TARGET_ESP32S2) // ESP32-S2
// Huidu HD-WF1 ESP32-S2
// https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA/issues/433
USER_PRINTLN("MatrixPanel_I2S_DMA - HD-WF1 S2 config");
mxconfig.gpio.r1 = 2;
mxconfig.gpio.g1 = 6;
mxconfig.gpio.b1 = 3;
mxconfig.gpio.r2 = 4;
mxconfig.gpio.g2 = 8;
mxconfig.gpio.b2 = 5;
mxconfig.gpio.lat = 33;
mxconfig.gpio.oe = 35;
mxconfig.gpio.clk = 34;
mxconfig.gpio.a = 39;
mxconfig.gpio.b = 38;
mxconfig.gpio.c = 37;
mxconfig.gpio.d = 36;
mxconfig.gpio.e = 12;
#elif defined(ESP32_FORUM_PINOUT) // Common format for boards designed for SmartMatrix
USER_PRINTLN("MatrixPanel_I2S_DMA - ESP32_FORUM_PINOUT");