feat(board): Update 3rd party board Huidu HD-WF2/HD-WF4 (#10957)

* feat(board): Update 3rd party board Huidu HD-WF2/HD-WF4

Followup #10779

 - fixed flash mode to 'dio'
 - removed psram flags
 - corrected gpio mapping defines

* ci(pre-commit): Apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
vortigont 2025-02-13 21:03:21 +09:00 committed by GitHub
parent fb6b788b30
commit 6fb55a7f68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 78 deletions

View file

@ -48923,20 +48923,6 @@ huidu_hd_wf2.menu.CPUFreq.80.build.f_cpu=80000000L
huidu_hd_wf2.menu.CPUFreq.40=40MHz huidu_hd_wf2.menu.CPUFreq.40=40MHz
huidu_hd_wf2.menu.CPUFreq.40.build.f_cpu=40000000L huidu_hd_wf2.menu.CPUFreq.40.build.f_cpu=40000000L
huidu_hd_wf2.menu.PSRAM.enabled=QSPI Flash fix
huidu_hd_wf2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
huidu_hd_wf2.menu.PSRAM.enabled.build.psram_type=qspi
huidu_hd_wf2.menu.FlashMode.qio=QIO 80MHz
huidu_hd_wf2.menu.FlashMode.qio.build.flash_mode=dio
huidu_hd_wf2.menu.FlashMode.qio.build.boot=qio
huidu_hd_wf2.menu.FlashMode.qio.build.boot_freq=80m
huidu_hd_wf2.menu.FlashMode.qio.build.flash_freq=80m
huidu_hd_wf2.menu.FlashMode.qio120=QIO 120MHz
huidu_hd_wf2.menu.FlashMode.qio120.build.flash_mode=dio
huidu_hd_wf2.menu.FlashMode.qio120.build.boot=qio
huidu_hd_wf2.menu.FlashMode.qio120.build.boot_freq=120m
huidu_hd_wf2.menu.FlashMode.qio120.build.flash_freq=80m
huidu_hd_wf2.menu.FlashMode.dio=DIO 80MHz huidu_hd_wf2.menu.FlashMode.dio=DIO 80MHz
huidu_hd_wf2.menu.FlashMode.dio.build.flash_mode=dio huidu_hd_wf2.menu.FlashMode.dio.build.flash_mode=dio
huidu_hd_wf2.menu.FlashMode.dio.build.boot=dio huidu_hd_wf2.menu.FlashMode.dio.build.boot=dio
@ -49076,20 +49062,6 @@ huidu_hd_wf4.menu.CPUFreq.80.build.f_cpu=80000000L
huidu_hd_wf4.menu.CPUFreq.40=40MHz huidu_hd_wf4.menu.CPUFreq.40=40MHz
huidu_hd_wf4.menu.CPUFreq.40.build.f_cpu=40000000L huidu_hd_wf4.menu.CPUFreq.40.build.f_cpu=40000000L
huidu_hd_wf4.menu.PSRAM.enabled=QSPI Flash fix
huidu_hd_wf4.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
huidu_hd_wf4.menu.PSRAM.enabled.build.psram_type=qspi
huidu_hd_wf4.menu.FlashMode.qio=QIO 80MHz
huidu_hd_wf4.menu.FlashMode.qio.build.flash_mode=dio
huidu_hd_wf4.menu.FlashMode.qio.build.boot=qio
huidu_hd_wf4.menu.FlashMode.qio.build.boot_freq=80m
huidu_hd_wf4.menu.FlashMode.qio.build.flash_freq=80m
huidu_hd_wf4.menu.FlashMode.qio120=QIO 120MHz
huidu_hd_wf4.menu.FlashMode.qio120.build.flash_mode=dio
huidu_hd_wf4.menu.FlashMode.qio120.build.boot=qio
huidu_hd_wf4.menu.FlashMode.qio120.build.boot_freq=120m
huidu_hd_wf4.menu.FlashMode.qio120.build.flash_freq=80m
huidu_hd_wf4.menu.FlashMode.dio=DIO 80MHz huidu_hd_wf4.menu.FlashMode.dio=DIO 80MHz
huidu_hd_wf4.menu.FlashMode.dio.build.flash_mode=dio huidu_hd_wf4.menu.FlashMode.dio.build.flash_mode=dio
huidu_hd_wf4.menu.FlashMode.dio.build.boot=dio huidu_hd_wf4.menu.FlashMode.dio.build.boot=dio

View file

@ -58,19 +58,4 @@ static const uint8_t MOSI = 11;
static const uint8_t MISO = 13; static const uint8_t MISO = 13;
static const uint8_t SCK = 12; static const uint8_t SCK = 12;
static const uint8_t T1 = WF2_X1_R1_PIN;
static const uint8_t T2 = WF2_X1_R2_PIN;
static const uint8_t T3 = WF2_X1_G1_PIN;
static const uint8_t T4 = WF2_X1_G2_PIN;
static const uint8_t T5 = WF2_X1_B1_PIN;
static const uint8_t T6 = WF2_X1_B2_PIN;
static const uint8_t T7 = WF2_A_PIN;
static const uint8_t T8 = WF2_B_PIN;
static const uint8_t T9 = WF2_C_PIN;
static const uint8_t T10 = WF2_D_PIN;
static const uint8_t T11 = WF2_X1_E_PIN;
static const uint8_t T12 = WF2_OE_PIN;
static const uint8_t T13 = WF2_CLK_PIN;
static const uint8_t T14 = WF2_LAT_PIN;
#endif /* Pins_Arduino_h */ #endif /* Pins_Arduino_h */

View file

@ -19,7 +19,7 @@
#define WF4_CLK_PIN 34 #define WF4_CLK_PIN 34
#define WF4_LAT_PIN 33 #define WF4_LAT_PIN 33
// X1 // X1 HUB75
#define WF4_X1_R1_PIN 2 #define WF4_X1_R1_PIN 2
#define WF4_X1_R2_PIN 3 #define WF4_X1_R2_PIN 3
#define WF4_X1_G1_PIN 6 #define WF4_X1_G1_PIN 6
@ -28,7 +28,7 @@
#define WF4_X1_B2_PIN 11 #define WF4_X1_B2_PIN 11
#define WF4_X1_CS_PIN 45 // CS gpio must be set HIGH to enable X1 output #define WF4_X1_CS_PIN 45 // CS gpio must be set HIGH to enable X1 output
// X2 // X2 HUB75
#define WF4_X2_R1_PIN 4 #define WF4_X2_R1_PIN 4
#define WF4_X2_R2_PIN 5 #define WF4_X2_R2_PIN 5
#define WF4_X2_G1_PIN 8 #define WF4_X2_G1_PIN 8
@ -37,7 +37,7 @@
#define WF4_X2_B2_PIN 13 #define WF4_X2_B2_PIN 13
#define WF4_X2_CS_PIN WF4_X1_CS_PIN // CS gpio must be set HIGH to enable X2 output #define WF4_X2_CS_PIN WF4_X1_CS_PIN // CS gpio must be set HIGH to enable X2 output
// X3 // X3 HUB75
#define WF4_X3_R1_PIN 2 #define WF4_X3_R1_PIN 2
#define WF4_X3_R2_PIN 3 #define WF4_X3_R2_PIN 3
#define WF4_X3_G1_PIN 6 #define WF4_X3_G1_PIN 6
@ -46,7 +46,7 @@
#define WF4_X3_B2_PIN 11 #define WF4_X3_B2_PIN 11
#define WF4_X3_CS_PIN 14 // CS gpio must be set HIGH to enable X3 output #define WF4_X3_CS_PIN 14 // CS gpio must be set HIGH to enable X3 output
// X4 // X4 HUB75
#define WF4_X4_R1_PIN 4 #define WF4_X4_R1_PIN 4
#define WF4_X4_R2_PIN 5 #define WF4_X4_R2_PIN 5
#define WF4_X4_G1_PIN 8 #define WF4_X4_G1_PIN 8
@ -55,14 +55,30 @@
#define WF4_X4_B2_PIN 13 #define WF4_X4_B2_PIN 13
#define WF4_X4_CS_PIN WF4_X3_CS_PIN // CS gpio must be set HIGH to enable X4 output #define WF4_X4_CS_PIN WF4_X3_CS_PIN // CS gpio must be set HIGH to enable X4 output
//#define WF4_P1_PIN UART // P1 is a UART connector
#define WF4_P1_RX_PIN 44
#define WF4_P1_TX_PIN 43
// P2: PCB holes gpio/gnd
#define WF4_P2_DATA_PIN 0 // GPIO0 boot #define WF4_P2_DATA_PIN 0 // GPIO0 boot
#define WF4_P5_DATA_PIN 16 // temperature
//#define WF4_P7_PIN VCC/GND // P5: temperature sensor connector
#define WF4_P11_DATA_PIN 15 // IR #define WF4_P5_DATA_PIN 16
// P7: VCC/GPIO holes on PCB
#define WF4_P7_DATA_PIN 1
// P11: IR connector
#define WF4_P11_DATA_PIN 15
// P12: two gpio's, Vcc, GND
#define WF4_P12_DATA1_PIN 47 #define WF4_P12_DATA1_PIN 47
#define WF4_P12_DATA2_PIN 18 #define WF4_P12_DATA2_PIN 18
#define WF4_S1_DATA_PIN 17 // Button
// S1 Button
#define WF4_S1_DATA_PIN 17
// S2-S3 PCB holes
#define WF4_S2_DATA_PIN 48 #define WF4_S2_DATA_PIN 48
#define WF4_S3_DATA_PIN 26 #define WF4_S3_DATA_PIN 26
#define WF4_S4_DATA_PIN 46 #define WF4_S4_DATA_PIN 46
@ -71,36 +87,25 @@
#define WF4_LED_RUN_PIN 40 // Status LED on PCB #define WF4_LED_RUN_PIN 40 // Status LED on PCB
#define WF4_BM8563_I2C_SDA 41 // RTC BM8563 I2C port #define WF4_BM8563_I2C_SDA 41 // RTC BM8563 I2C port
#define WF4_BM8563_I2C_SCL 42 #define WF4_BM8563_I2C_SCL 42
#define WF4_USB_DM_PIN 19 #define WF4_USB_DN_PIN 19 // USB-A D-
#define WF4_USB_DP_PIN 20 #define WF4_USB_DP_PIN 20 // USB-A D+
#define LED_BUILTIN WF4_LED_RUN_PIN #define LED_BUILTIN WF4_LED_RUN_PIN
#define BUILTIN_LED LED_BUILTIN // backward compatibility #define BUILTIN_LED LED_BUILTIN // backward compatibility
static const uint8_t TX = 43; static const uint8_t TX = WF4_P1_TX_PIN;
static const uint8_t RX = 44; static const uint8_t RX = WF4_P1_RX_PIN;
static const uint8_t SDA = WF4_BM8563_I2C_SDA; static const uint8_t SDA = WF4_BM8563_I2C_SDA;
static const uint8_t SCL = WF4_BM8563_I2C_SCL; static const uint8_t SCL = WF4_BM8563_I2C_SCL;
static const uint8_t SS = 10; // there is no dedicated SPI connector on board, but SPI could be accessed via PCB holes
static const uint8_t MOSI = 11; static const uint8_t SS = WF4_S2_DATA_PIN;
static const uint8_t MISO = 13; static const uint8_t MOSI = WF4_S3_DATA_PIN;
static const uint8_t SCK = 12; static const uint8_t MISO = WF4_S4_DATA_PIN;
static const uint8_t SCK = WF4_P7_DATA_PIN;
static const uint8_t T1 = WF4_X1_R1_PIN; // touch pins are mostly busy with HUB75 ports
static const uint8_t T2 = WF4_X1_R2_PIN; static const uint8_t T1 = WF4_P7_DATA_PIN;
static const uint8_t T3 = WF4_X1_G1_PIN;
static const uint8_t T4 = WF4_X1_G2_PIN;
static const uint8_t T5 = WF4_X1_B1_PIN;
static const uint8_t T6 = WF4_X1_B2_PIN;
static const uint8_t T7 = WF4_A_PIN;
static const uint8_t T8 = WF4_B_PIN;
static const uint8_t T9 = WF4_C_PIN;
static const uint8_t T10 = WF4_D_PIN;
static const uint8_t T11 = WF4_E_PIN;
static const uint8_t T12 = WF4_OE_PIN;
static const uint8_t T13 = WF4_CLK_PIN;
static const uint8_t T14 = WF4_LAT_PIN;
#endif /* Pins_Arduino_h */ #endif /* Pins_Arduino_h */