Skip to content

Commit a8121f3

Browse files
Fix pulseIn detection (#293)
Fixes #289
1 parent 38c005c commit a8121f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/rp2040/wiring_pulse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extern "C" unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeo
3838
}
3939

4040
// Wait for assert
41-
while ((!!gpio_get(pin) != !state) && (time_us_64() < abort));
41+
while ((!!gpio_get(pin) != !!state) && (time_us_64() < abort));
4242
uint64_t begin = time_us_64();
4343
if (begin >= abort) {
4444
return 0;

0 commit comments

Comments
 (0)