File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
libraries/rp2040/examples/RestartReason Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,18 @@ void delayCount(void) {
1111 int t = 1 ;
1212 while (1 ) {
1313 Serial.print (" ." );
14- if (t % 50 == 0 )
14+ if (t % 50 == 0 ) {
1515 Serial.println ();
16+ }
1617 delay (1000 );
1718 }
1819}
1920
2021void setup () {
2122 Serial.begin (115200 );
22- while (!Serial)
23+ while (!Serial) {
2324 delay (10 );
25+ }
2426 delay (1000 );
2527 Serial.println (" Reset reason:" );
2628
@@ -29,8 +31,9 @@ void setup() {
2931
3032 EEPROM.begin (512 );
3133 byte test = EEPROM.read (0 );
32- if (test >= NTESTS) // un-initialised EEPROM read is random
34+ if (test >= NTESTS) { // un-initialised EEPROM read is random
3335 test = -1 ;
36+ }
3437 test = (test + 1 ) % NTESTS; // Go to next test, but limit to NTESTS-1
3538 Serial.printf (" Test %i: %s\n " , test, testText[test]);
3639 EEPROM.write (0 , test);
You can’t perform that action at this time.
0 commit comments