1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

24 Commits

Author SHA1 Message Date
Hugues Larrive
a582da1f31 drivers/dht: busy wait reimplementation
- many backports from @maribu's IRQ based implementation (#18591)
- use of ztimer and errno.h
- separation of dht_read() steps into functions for better readability
- reintroduction of DHT11/DHT22 differentiation
- sensor presence checking in dht_init()
- default input mode changed to open drain
- AVR support without platform-specific handling by avoiding
  ztimer_spin() and using the overflow of an 8-bit variable as a
  pre-timeout to minimize time-consuming ztimer_now() calls
- add a new DHT11_2022 type for 0.01 °C resolution devices
- data caching removed
2023-06-20 12:07:48 +02:00
Wouter Symons
5055d0993e drivers/dht: correct interpreting raw values 2021-11-20 14:55:02 +01:00
Marian Buschsieweke
e03615fd38
drivers/dht: Worked around doxygen bug
Markdown in @retval values is currently broken in Doxygen. This removes use
of markdown there
2020-01-09 17:08:05 +01:00
Marian Buschsieweke
579a67be03
drivers/dht: Move hold logic from SAUL to driver
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.
2019-07-29 10:39:50 +02:00
Marian Buschsieweke
c75bacceba
drivers/dht: Added error handling
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.
2019-07-19 15:57:49 +02:00
9f8386c215 drivers*: add saul doc group to related drivers 2018-08-27 11:32:20 +02:00
94c753c07a drivers: doxygen cleanup 2017-09-01 15:12:20 +02:00
4b7e682048 drivers/dht: remove useless auto_init declaration 2017-08-31 22:05:33 +02:00
f1a93bf36e drivers/dht: some cleanup 2017-06-28 16:57:29 +02:00
317716419c drivers: use const device descriptor 2017-06-21 17:05:45 +02:00
Hauke Petersen
3afc3eb10b drivers/dht: updated auto-init + some enhancements
- unified auto-init to use same style as other SAUl devices
- make use of named return values
- added some asserts
2017-02-07 09:59:23 +01:00
Hauke Petersen
b68b14b49b Merge pull request #4666 from haukepetersen/opt_driver_dhtsaul
drivers/dht: added support for SAUL
2016-03-22 11:06:16 +01:00
Hauke Petersen
08ce2a5090 drivers/dht: adapted to GPIO changes 2016-03-17 14:55:31 +01:00
Hauke Petersen
e51d634aeb drivers: adapted gpio_init(_x)() calls 2016-03-17 14:55:30 +01:00
Hauke Petersen
7c86467ef0 drivers/dht: added SAUL support 2016-03-17 10:39:42 +01:00
Hauke Petersen
6fca96c668 drivers/dht: simplified interface 2016-02-20 18:19:20 +01:00
Hauke Petersen
f5f793c3f2 drivers/dht: made pullup configurable 2016-02-20 18:19:20 +01:00
Hauke Petersen
c46bc68ac5 drivers/dht: optimized DHT driver
- 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
2016-02-20 18:19:20 +01:00
Hauke Petersen
f0b0db8f06 drivers: various doxygen fixes
- fixed group naming scheme to 'drivers_xx'
- introduced a group for actuators (analog to the sensors)
- added missing doxygen to ltc4150 driver
2015-11-23 12:15:50 +01:00
Oleg Hahm
4cfb8140e4 Merge pull request #3978 from LudwigOrtmann/pr/namechange
documentation: update my name (Ortmann -> Knüpfer)
2015-09-28 10:38:41 +02:00
Ludwig Knüpfer
eda6328e21 documentation: update my name (Ortmann -> Knüpfer) 2015-09-27 18:58:30 +02:00
Oleg Hahm
f035bced0c doc: put network devices and sensors in subgroups 2015-09-27 18:25:43 +02:00
Ludwig Ortmann
af5af90cba drivers/dht: add support for DHT21 2015-06-06 17:08:47 +02:00
Ludwig Ortmann
4a05f47bcf drivers/dht: initial import
Unified driver for DHT11 and DHT22.
2015-05-29 06:24:18 +02:00