Skip to content

Commit 0015d9d

Browse files
committed
TEMP: disable wiringPules (need porting)
1 parent b803536 commit 0015d9d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cores/arduino/wiring_pulse.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#include "wiring_private.h"
2424
#include "pins_arduino.h"
2525

26+
// TODO: port to 4809
27+
28+
#if 0
29+
2630
/* Measures the length (in microseconds) of a pulse on the pin; state is HIGH
2731
* or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds
2832
* to 3 minutes in length, but must be called at least a few dozen microseconds
@@ -41,7 +45,7 @@ unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout)
4145

4246
// convert the timeout from microseconds to a number of times through
4347
// the initial loop; it takes approximately 16 clock cycles per iteration
44-
unsigned long maxloops = microsecondsToClockCycles(timeout)/16;
48+
unsigned long maxloops = microsecondsToClockCycles(timeout, F_CPU)/16;
4549

4650
unsigned long width = countPulseASM(portInputRegister(port), bit, stateMask, maxloops);
4751

@@ -91,3 +95,5 @@ unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout)
9195
}
9296
return micros() - start;
9397
}
98+
99+
#endif

0 commit comments

Comments
 (0)