aboutsummaryrefslogtreecommitdiff
path: root/drivers/dht/dht.c
AgeCommit message (Collapse)Author
2020-04-05all: Use MP_ERROR_TEXT for all error messages.Jim Mussared
2019-01-22drivers/dht: Allow open-drain-high call to be DHT specific if needed.Damien George
Some ports (eg esp8266) need to have specific behaviour for driving a DHT reliably.
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
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-07driver/dht: Use mp_raise_OSError helper function.Damien George
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.
2016-05-26drivers: Add C-level function to read DHT11 and DHT22 devices.Damien George
Uses mp_hal_pin API.