aboutsummaryrefslogtreecommitdiff
path: root/extmod/machine_pulse.c
AgeCommit message (Collapse)Author
2019-07-01esp8266: Provide custom machine_time_pulse_us that feeds soft WDT.Damien George
So that the timeout for machine.time_pulse_us() can be large. Fixes issue #2775.
2017-02-05extmod/machine_pulse: Make time_pulse_us() not throw exceptions.Paul Sokolovsky
machine.time_pulse_us() is intended to provide very fine timing, including while working with signal bursts, where each transition is tracked in row. Throwing and handling an exception may take too much time and "signal loss". So instead, in case of a timeout, just return negative value. Cases of timeout while waiting for initial signal stabilization, and during actual timing, are recognized. The documentation is updated accordingly, and rewritten somewhat to clarify the function behavior.
2016-10-07extmod: Use mp_raise_OSError helper function.Damien George
2016-05-31extmod/machine: Add MICROPY_PY_MACHINE_PULSE config for time_pulse_us.Damien George
Since not all ports that enable the machine module have the pin HAL functions.
2016-05-31extmod: Add machine time_pulse_us function (at C and Python level).Damien George
The C implementation is taken from the DHT driver.