changed if to while in Handler0

pico-i2c-isr
alanbjohnston 3 years ago committed by GitHub
parent 152300f8ae
commit 9aeb80d8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3658,11 +3658,12 @@ bool TimerHandler0(struct repeating_timer *t) {
digitalWrite(BPSK_CONTROL_A, HIGH);
// Serial.print("-");
if (mode == FSK) {
if (!i2c_busy_now2) {
// if (!i2c_busy_now2) {
while (i2c_busy_now2) { }
i2c_busy_now = true;
clockgen.enableOutputOnly(1);
i2c_busy_now = false;
} else
// } else
;// Serial.print("-");
}
} else {
@ -3672,11 +3673,12 @@ bool TimerHandler0(struct repeating_timer *t) {
digitalWrite(BPSK_CONTROL_B, HIGH);
// Serial.print("_");
if (mode == FSK) {
if (!i2c_busy_now2) {
// if (!i2c_busy_now2) {
while (i2c_busy_now2) { }
i2c_busy_now = true;
clockgen.enableOutputOnly(0);
i2c_busy_now = false;
} else
// } else
;// Serial.print("-");
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.