Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.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.build.flash_mode=dio
huidu_hd_wf2.menu.FlashMode.dio.build.boot=dio
Expand Down Expand Up @@ -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.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.build.flash_mode=dio
huidu_hd_wf4.menu.FlashMode.dio.build.boot=dio
Expand Down
15 changes: 0 additions & 15 deletions variants/huidu_hd_wf2/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,4 @@ static const uint8_t MOSI = 11;
static const uint8_t MISO = 13;
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 */
77 changes: 41 additions & 36 deletions variants/huidu_hd_wf4/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define WF4_CLK_PIN 34
#define WF4_LAT_PIN 33

// X1
// X1 HUB75
#define WF4_X1_R1_PIN 2
#define WF4_X1_R2_PIN 3
#define WF4_X1_G1_PIN 6
Expand All @@ -28,7 +28,7 @@
#define WF4_X1_B2_PIN 11
#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_R2_PIN 5
#define WF4_X2_G1_PIN 8
Expand All @@ -37,7 +37,7 @@
#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

// X3
// X3 HUB75
#define WF4_X3_R1_PIN 2
#define WF4_X3_R2_PIN 3
#define WF4_X3_G1_PIN 6
Expand All @@ -46,7 +46,7 @@
#define WF4_X3_B2_PIN 11
#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_R2_PIN 5
#define WF4_X4_G1_PIN 8
Expand All @@ -55,52 +55,57 @@
#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_P1_PIN UART
#define WF4_P2_DATA_PIN 0 // GPIO0 boot
#define WF4_P5_DATA_PIN 16 // temperature
//#define WF4_P7_PIN VCC/GND
#define WF4_P11_DATA_PIN 15 // IR
// 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

// P5: temperature sensor connector
#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_DATA2_PIN 18
#define WF4_S1_DATA_PIN 17 // Button
#define WF4_S2_DATA_PIN 48
#define WF4_S3_DATA_PIN 26
#define WF4_S4_DATA_PIN 46

// S1 Button
#define WF4_S1_DATA_PIN 17

// S2-S3 PCB holes
#define WF4_S2_DATA_PIN 48
#define WF4_S3_DATA_PIN 26
#define WF4_S4_DATA_PIN 46

#define WF4_BUTTON_TEST WF4_S1_PIN // Test key button on PCB, 1=normal, 0=pressed
#define WF4_LED_RUN_PIN 40 // Status LED on PCB
#define WF4_BM8563_I2C_SDA 41 // RTC BM8563 I2C port
#define WF4_BM8563_I2C_SCL 42
#define WF4_USB_DM_PIN 19
#define WF4_USB_DP_PIN 20
#define WF4_USB_DN_PIN 19 // USB-A D-
#define WF4_USB_DP_PIN 20 // USB-A D+

#define LED_BUILTIN WF4_LED_RUN_PIN
#define BUILTIN_LED LED_BUILTIN // backward compatibility

static const uint8_t TX = 43;
static const uint8_t RX = 44;
static const uint8_t TX = WF4_P1_TX_PIN;
static const uint8_t RX = WF4_P1_RX_PIN;

static const uint8_t SDA = WF4_BM8563_I2C_SDA;
static const uint8_t SCL = WF4_BM8563_I2C_SCL;

static const uint8_t SS = 10;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 13;
static const uint8_t SCK = 12;

static const uint8_t T1 = WF4_X1_R1_PIN;
static const uint8_t T2 = WF4_X1_R2_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;
// there is no dedicated SPI connector on board, but SPI could be accessed via PCB holes
static const uint8_t SS = WF4_S2_DATA_PIN;
static const uint8_t MOSI = WF4_S3_DATA_PIN;
static const uint8_t MISO = WF4_S4_DATA_PIN;
static const uint8_t SCK = WF4_P7_DATA_PIN;

// touch pins are mostly busy with HUB75 ports
static const uint8_t T1 = WF4_P7_DATA_PIN;

#endif /* Pins_Arduino_h */