File tree Expand file tree Collapse file tree 1 file changed +21
-24
lines changed
Expand file tree Collapse file tree 1 file changed +21
-24
lines changed Original file line number Diff line number Diff line change 3535 #define LAT 9
3636 #define OE 10
3737 #define CLK 11
38+
39+ #define WIDTH 128
40+ #define HEIGHT 64
3841#elif defined(TRONBYT_S3)
3942 #define R1 4
4043 #define G1 6
116119 #define BL2 23
117120 #endif
118121
119- #define CH_A 26
120- #define CH_B 5
121- #define CH_C 25
122- #define CH_D 18
123- #define CH_E -1 // assign to pin 14 if using more than two panels
122+ #define CH_A 26
123+ #define CH_B 5
124+ #define CH_C 25
125+ #define CH_D 18
126+ #define CH_E -1 // assign to pin 14 if using more than two panels
124127
125- #define LAT 19
126- #define OE 32
127- #define CLK 33
128+ #define LAT 19
129+ #define OE 32
130+ #define CLK 33
131+ #endif
132+
133+ #ifndef WIDTH
134+ #define WIDTH 64
135+ #endif
136+
137+ #ifndef HEIGHT
138+ #define HEIGHT 32
128139#endif
129140
130141static MatrixPanel_I2S_DMA *_matrix;
@@ -142,21 +153,8 @@ int display_initialize() {
142153 bool invert_clock_phase = true ;
143154 #endif
144155
145- #ifdef TRONBYT_S3_WIDE
146- HUB75_I2S_CFG mxconfig (128 , // width
147- 64 , // height
148- 1 , // chain length
149- pins, // pin mapping
150- HUB75_I2S_CFG::FM6126A, // driver chip
151- HUB75_I2S_CFG::TYPE138, // line driver
152- true , // double-buffering
153- HUB75_I2S_CFG::HZ_10M, // clock speed
154- 1 , // latch blanking
155- invert_clock_phase // invert clock phase
156- );
157- #else
158- HUB75_I2S_CFG mxconfig (64 , // width
159- 32 , // height
156+ HUB75_I2S_CFG mxconfig (WIDTH, // width
157+ HEIGHT, // height
160158 1 , // chain length
161159 pins, // pin mapping
162160 HUB75_I2S_CFG::FM6126A, // driver chip
@@ -166,7 +164,6 @@ int display_initialize() {
166164 1 , // latch blanking
167165 invert_clock_phase // invert clock phase
168166 );
169- #endif
170167
171168 _matrix = new MatrixPanel_I2S_DMA (mxconfig);
172169
You can’t perform that action at this time.
0 commit comments