The DHT11/DHT21/DHT22 cannot be sampled more than once a second. Previously,
a global cache was added to the SAUL adaption of the dht driver to answer with
stored values for one second after the last read. This however had two
disadvantages:
- The global cache was shared for all DHTXX devices connected. As a result
incorrect values were delivered when reading out multiple sensors over SAUL
with less than 1 second delay in between
- A user of the low level API will had to implement the same caching strategy,
resulting in code duplication
By moving the hold logic to the driver, both limitations can be overcome.
Previously the DHT11/DHT21/DHT22 driver ended up in an infinite loop locking up
RIOT when a communication error occurred. This commit adds a simple timeout to
the communication in order to prevent these lock ups.
- added default dht_params.h file
- added dht_auto_init(void) function
- changed init function to init(dev, params)
- s/gpio/pin/ in device descriptor
- moved FEATURE_REQUIRED to drivers/Makefile.dep