|
| 1 | +#ifndef Pins_Arduino_h |
| 2 | +#define Pins_Arduino_h |
| 3 | + |
| 4 | +#include <stdint.h> |
| 5 | + |
| 6 | +// Huidu HD-WF2 - esp32-s3 HUB75 driver board |
| 7 | +// https://www.hdwell.com/Product/index46.html |
| 8 | +// https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA/discussions/667 |
| 9 | + |
| 10 | +#define USB_VID 0x303a |
| 11 | +#define USB_PID 0x1001 |
| 12 | + |
| 13 | +#define WF2_X1_R1_PIN 2 |
| 14 | +#define WF2_X1_R2_PIN 3 |
| 15 | +#define WF2_X1_G1_PIN 6 |
| 16 | +#define WF2_X1_G2_PIN 7 |
| 17 | +#define WF2_X1_B1_PIN 10 |
| 18 | +#define WF2_X1_B2_PIN 11 |
| 19 | +#define WF2_X1_E_PIN 21 |
| 20 | + |
| 21 | +#define WF2_X2_R1_PIN 4 |
| 22 | +#define WF2_X2_R2_PIN 5 |
| 23 | +#define WF2_X2_G1_PIN 8 |
| 24 | +#define WF2_X2_G2_PIN 9 |
| 25 | +#define WF2_X2_B1_PIN 12 |
| 26 | +#define WF2_X2_B2_PIN 13 |
| 27 | +#define WF2_X2_E_PIN -1 // Currently unknown, so X2 port will not work (yet) with 1/32 scan panels |
| 28 | + |
| 29 | +#define WF2_A_PIN 39 |
| 30 | +#define WF2_B_PIN 38 |
| 31 | +#define WF2_C_PIN 37 |
| 32 | +#define WF2_D_PIN 36 |
| 33 | +#define WF2_OE_PIN 35 |
| 34 | +#define WF2_CLK_PIN 34 |
| 35 | +#define WF2_LAT_PIN 33 |
| 36 | + |
| 37 | +#define WF2_BUTTON_TEST 17 // Test key button on PCB, 1=normal, 0=pressed |
| 38 | +#define WF2_LED_RUN_PIN 40 // Status LED on PCB |
| 39 | +#define WF2_BM8563_I2C_SDA 41 // RTC BM8563 I2C port |
| 40 | +#define WF2_BM8563_I2C_SCL 42 |
| 41 | +#define WF2_USB_DN_PIN 19 // USB D- |
| 42 | +#define WF2_USB_DP_PIN 20 // USB D+ |
| 43 | + |
| 44 | +#define WF2_PCB1_PIN 45 // open pad on PCB |
| 45 | +#define WF2_PCB2_PIN 46 // open pad on PCB |
| 46 | + |
| 47 | +#define LED_BUILTIN WF2_LED_RUN_PIN |
| 48 | +#define BUILTIN_LED LED_BUILTIN // backward compatibility |
| 49 | + |
| 50 | + |
| 51 | +constexpr uint8_t TX = 43; |
| 52 | +constexpr uint8_t RX = 44; |
| 53 | + |
| 54 | +constexpr uint8_t SDA = WF2_BM8563_I2C_SDA; |
| 55 | +constexpr uint8_t SCL = WF2_BM8563_I2C_SCL; |
| 56 | + |
| 57 | +constexpr uint8_t T1 = WF2_X1_R1_PIN; |
| 58 | +constexpr uint8_t T2 = WF2_X1_R2_PIN; |
| 59 | +constexpr uint8_t T3 = WF2_X1_G1_PIN; |
| 60 | +constexpr uint8_t T4 = WF2_X1_G2_PIN; |
| 61 | +constexpr uint8_t T5 = WF2_X1_B1_PIN; |
| 62 | +constexpr uint8_t T6 = WF2_X1_B2_PIN; |
| 63 | +constexpr uint8_t T7 = WF2_X1_E_PIN; |
| 64 | +constexpr uint8_t T8 = WF2_A_PIN; |
| 65 | +constexpr uint8_t T9 = WF2_B_PIN; |
| 66 | +constexpr uint8_t T10 = WF2_C_PIN; |
| 67 | +constexpr uint8_t T11 = WF2_D_PIN; |
| 68 | +constexpr uint8_t T12 = WF2_OE_PIN; |
| 69 | +constexpr uint8_t T13 = WF2_CLK_PIN; |
| 70 | +constexpr uint8_t T14 = WF2_LAT_PIN; |
| 71 | + |
| 72 | +#endif /* Pins_Arduino_h */ |
0 commit comments