|
19 | 19 | #define WF4_CLK_PIN 34 |
20 | 20 | #define WF4_LAT_PIN 33 |
21 | 21 |
|
22 | | -// X1 |
| 22 | +// X1 HUB75 |
23 | 23 | #define WF4_X1_R1_PIN 2 |
24 | 24 | #define WF4_X1_R2_PIN 3 |
25 | 25 | #define WF4_X1_G1_PIN 6 |
|
28 | 28 | #define WF4_X1_B2_PIN 11 |
29 | 29 | #define WF4_X1_CS_PIN 45 // CS gpio must be set HIGH to enable X1 output |
30 | 30 |
|
31 | | -// X2 |
| 31 | +// X2 HUB75 |
32 | 32 | #define WF4_X2_R1_PIN 4 |
33 | 33 | #define WF4_X2_R2_PIN 5 |
34 | 34 | #define WF4_X2_G1_PIN 8 |
|
37 | 37 | #define WF4_X2_B2_PIN 13 |
38 | 38 | #define WF4_X2_CS_PIN WF4_X1_CS_PIN // CS gpio must be set HIGH to enable X2 output |
39 | 39 |
|
40 | | -// X3 |
| 40 | +// X3 HUB75 |
41 | 41 | #define WF4_X3_R1_PIN 2 |
42 | 42 | #define WF4_X3_R2_PIN 3 |
43 | 43 | #define WF4_X3_G1_PIN 6 |
|
46 | 46 | #define WF4_X3_B2_PIN 11 |
47 | 47 | #define WF4_X3_CS_PIN 14 // CS gpio must be set HIGH to enable X3 output |
48 | 48 |
|
49 | | -// X4 |
| 49 | +// X4 HUB75 |
50 | 50 | #define WF4_X4_R1_PIN 4 |
51 | 51 | #define WF4_X4_R2_PIN 5 |
52 | 52 | #define WF4_X4_G1_PIN 8 |
|
55 | 55 | #define WF4_X4_B2_PIN 13 |
56 | 56 | #define WF4_X4_CS_PIN WF4_X3_CS_PIN // CS gpio must be set HIGH to enable X4 output |
57 | 57 |
|
58 | | -//#define WF4_P1_PIN UART |
59 | | -#define WF4_P2_DATA_PIN 0 // GPIO0 boot |
60 | | -#define WF4_P5_DATA_PIN 16 // temperature |
61 | | -//#define WF4_P7_PIN VCC/GND |
62 | | -#define WF4_P11_DATA_PIN 15 // IR |
| 58 | +// P1 is a UART connector |
| 59 | +#define WF4_P1_RX_PIN 44 |
| 60 | +#define WF4_P1_TX_PIN 43 |
| 61 | + |
| 62 | +// P2: PCB holes gpio/gnd |
| 63 | +#define WF4_P2_DATA_PIN 0 // GPIO0 boot |
| 64 | + |
| 65 | +// P5: temperature sensor connector |
| 66 | +#define WF4_P5_DATA_PIN 16 |
| 67 | + |
| 68 | +// P7: VCC/GPIO holes on PCB |
| 69 | +#define WF4_P7_DATA_PIN 1 |
| 70 | + |
| 71 | +// P11: IR connector |
| 72 | +#define WF4_P11_DATA_PIN 15 |
| 73 | + |
| 74 | +// P12: two gpio's, Vcc, GND |
63 | 75 | #define WF4_P12_DATA1_PIN 47 |
64 | 76 | #define WF4_P12_DATA2_PIN 18 |
65 | | -#define WF4_S1_DATA_PIN 17 // Button |
66 | | -#define WF4_S2_DATA_PIN 48 |
67 | | -#define WF4_S3_DATA_PIN 26 |
68 | | -#define WF4_S4_DATA_PIN 46 |
| 77 | + |
| 78 | +// S1 Button |
| 79 | +#define WF4_S1_DATA_PIN 17 |
| 80 | + |
| 81 | +// S2-S3 PCB holes |
| 82 | +#define WF4_S2_DATA_PIN 48 |
| 83 | +#define WF4_S3_DATA_PIN 26 |
| 84 | +#define WF4_S4_DATA_PIN 46 |
69 | 85 |
|
70 | 86 | #define WF4_BUTTON_TEST WF4_S1_PIN // Test key button on PCB, 1=normal, 0=pressed |
71 | 87 | #define WF4_LED_RUN_PIN 40 // Status LED on PCB |
72 | 88 | #define WF4_BM8563_I2C_SDA 41 // RTC BM8563 I2C port |
73 | 89 | #define WF4_BM8563_I2C_SCL 42 |
74 | | -#define WF4_USB_DM_PIN 19 |
75 | | -#define WF4_USB_DP_PIN 20 |
| 90 | +#define WF4_USB_DN_PIN 19 // USB-A D- |
| 91 | +#define WF4_USB_DP_PIN 20 // USB-A D+ |
76 | 92 |
|
77 | 93 | #define LED_BUILTIN WF4_LED_RUN_PIN |
78 | 94 | #define BUILTIN_LED LED_BUILTIN // backward compatibility |
79 | 95 |
|
80 | | -static const uint8_t TX = 43; |
81 | | -static const uint8_t RX = 44; |
| 96 | +static const uint8_t TX = WF4_P1_TX_PIN; |
| 97 | +static const uint8_t RX = WF4_P1_RX_PIN; |
82 | 98 |
|
83 | 99 | static const uint8_t SDA = WF4_BM8563_I2C_SDA; |
84 | 100 | static const uint8_t SCL = WF4_BM8563_I2C_SCL; |
85 | 101 |
|
86 | | -static const uint8_t SS = 10; |
87 | | -static const uint8_t MOSI = 11; |
88 | | -static const uint8_t MISO = 13; |
89 | | -static const uint8_t SCK = 12; |
90 | | - |
91 | | -static const uint8_t T1 = WF4_X1_R1_PIN; |
92 | | -static const uint8_t T2 = WF4_X1_R2_PIN; |
93 | | -static const uint8_t T3 = WF4_X1_G1_PIN; |
94 | | -static const uint8_t T4 = WF4_X1_G2_PIN; |
95 | | -static const uint8_t T5 = WF4_X1_B1_PIN; |
96 | | -static const uint8_t T6 = WF4_X1_B2_PIN; |
97 | | -static const uint8_t T7 = WF4_A_PIN; |
98 | | -static const uint8_t T8 = WF4_B_PIN; |
99 | | -static const uint8_t T9 = WF4_C_PIN; |
100 | | -static const uint8_t T10 = WF4_D_PIN; |
101 | | -static const uint8_t T11 = WF4_E_PIN; |
102 | | -static const uint8_t T12 = WF4_OE_PIN; |
103 | | -static const uint8_t T13 = WF4_CLK_PIN; |
104 | | -static const uint8_t T14 = WF4_LAT_PIN; |
| 102 | +// there is no dedicated SPI connector on board, but SPI could be accessed via PCB holes |
| 103 | +static const uint8_t SS = WF4_S2_DATA_PIN; |
| 104 | +static const uint8_t MOSI = WF4_S3_DATA_PIN; |
| 105 | +static const uint8_t MISO = WF4_S4_DATA_PIN; |
| 106 | +static const uint8_t SCK = WF4_P7_DATA_PIN; |
| 107 | + |
| 108 | +// touch pins are mostly busy with HUB75 ports |
| 109 | +static const uint8_t T1 = WF4_P7_DATA_PIN; |
105 | 110 |
|
106 | 111 | #endif /* Pins_Arduino_h */ |
0 commit comments