Silence compiler warnings about while-guards clockless_esp8266.h

This commit is contained in:
Zachary Vorhies 2023-10-01 17:50:06 -07:00 committed by GitHub
parent 2874c7c8eb
commit 3f7dabbdb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,19 +54,20 @@ protected:
b <<= 24; b = ~b;
for(FASTLED_REGISTER uint32_t i = BITS; i > 0; --i) {
while((__clock_cycles() - last_mark) < (T1+T2+T3)) {
// the current compiler does like just a ; to end of THIS while loop
// although this change make no sense because below are more of the same while loops without
// compiler warning.
;
}
last_mark = __clock_cycles();
;
}
last_mark = __clock_cycles();
FastPin<DATA_PIN>::hi();
while((__clock_cycles() - last_mark) < T1);
while((__clock_cycles() - last_mark) < T1) {
;
}
if(b & 0x80000000L) { FastPin<DATA_PIN>::lo(); }
b <<= 1;
while((__clock_cycles() - last_mark) < (T1+T2));
while((__clock_cycles() - last_mark) < (T1+T2)) {
;
}
FastPin<DATA_PIN>::lo();
// even with interrupts disabled, the NMI interupt seems to cause