MCPcopy Create free account
hub / github.com/2dom/PxMatrix / displayTestPattern

Method displayTestPattern

PxMatrix.h:1191–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1189}
1190
1191void PxMATRIX::displayTestPattern(uint16_t show_time) {
1192
1193 if ((millis()-_test_last_call)>500)
1194 {
1195 flushDisplay();
1196 for (int ii=0;ii<=_test_pixel_counter;ii++)
1197 SPI_BYTE(0xFF);
1198 _test_last_call=millis();
1199 _test_pixel_counter++;
1200 }
1201
1202 if (_test_pixel_counter>_send_buffer_size)
1203
1204 {
1205 _test_pixel_counter=0;
1206 _test_line_counter++;
1207 flushDisplay();
1208 }
1209
1210 if (_test_line_counter> (_height/2))
1211 _test_line_counter=0;
1212
1213 digitalWrite(_A_PIN,HIGH);
1214 delayMicroseconds(1);
1215 digitalWrite(_B_PIN,HIGH);
1216 delayMicroseconds(1);
1217 digitalWrite(_C_PIN,HIGH);
1218 delayMicroseconds(1);
1219 digitalWrite(_D_PIN,HIGH);
1220 delayMicroseconds(1);
1221 digitalWrite(_E_PIN,HIGH);
1222 delayMicroseconds(1);
1223
1224 digitalWrite(_A_PIN,LOW);
1225 delayMicroseconds(1);
1226 digitalWrite(_B_PIN,LOW);
1227 delayMicroseconds(1);
1228 digitalWrite(_C_PIN,LOW);
1229 delayMicroseconds(1);
1230 digitalWrite(_D_PIN,LOW);
1231 delayMicroseconds(1);
1232 digitalWrite(_E_PIN,LOW);
1233 delayMicroseconds(1);
1234 set_mux(_test_line_counter);
1235
1236 latch(show_time);
1237}
1238
1239void PxMATRIX::displayTestPixel(uint16_t show_time) {
1240 if ((millis()-_test_last_call)>500)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected