Skip to content

Commit

Permalink
Fix pulseIn detection (#293)
Browse files Browse the repository at this point in the history
Fixes #289
  • Loading branch information
earlephilhower authored Aug 30, 2021
1 parent 38c005c commit a8121f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/rp2040/wiring_pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C" unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeo
}

// Wait for assert
while ((!!gpio_get(pin) != !state) && (time_us_64() < abort));
while ((!!gpio_get(pin) != !!state) && (time_us_64() < abort));
uint64_t begin = time_us_64();
if (begin >= abort) {
return 0;
Expand Down

0 comments on commit a8121f3

Please sign in to comment.