dht11 base driver modules
More...
dht11 base driver modules
◆ dht11_handle_t
dht11 handle structure definition
◆ dht11_info_t
dht11 info structure definition
◆ dht11_deinit()
close the chip
- Parameters
-
| [in] | *handle | pointer to a dht11 handle structure |
- Returns
- status code
- 0 success
- 1 bus deinit failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 554 of file driver_dht11.c.
◆ dht11_info()
get chip's information
- Parameters
-
| [out] | *info | pointer to a dht11 info structure |
- Returns
- status code
- 0 success
- 2 handle is NULL
- Note
- none
Definition at line 584 of file driver_dht11.c.
◆ dht11_init()
initialize the chip
- Parameters
-
| [in] | *handle | pointer to a dht11 handle structure |
- Returns
- status code
- 0 success
- 1 bus initialization failed
- 2 handle is NULL
- 3 linked functions is NULL
- 4 reset failed
- Note
- none
Definition at line 467 of file driver_dht11.c.
◆ dht11_read_humidity()
| uint8_t dht11_read_humidity |
( |
dht11_handle_t * | handle, |
|
|
uint16_t * | raw, |
|
|
uint8_t * | s ) |
read the humidity data
- Parameters
-
| [in] | *handle | pointer to a dht11 handle structure |
| [out] | *raw | pointer to a raw humidity buffer |
| [out] | *s | pointer to a converted humidity buffer |
- Returns
- status code
- 0 success
- 1 read humidity failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 260 of file driver_dht11.c.
◆ dht11_read_temperature()
| uint8_t dht11_read_temperature |
( |
dht11_handle_t * | handle, |
|
|
uint16_t * | raw, |
|
|
float * | s ) |
read the temperature data
- Parameters
-
| [in] | *handle | pointer to a dht11 handle structure |
| [out] | *raw | pointer to a raw temperature buffer |
| [out] | *s | pointer to a converted temperature buffer |
- Returns
- status code
- 0 success
- 1 read temperature failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 398 of file driver_dht11.c.
◆ dht11_read_temperature_humidity()
| uint8_t dht11_read_temperature_humidity |
( |
dht11_handle_t * | handle, |
|
|
uint16_t * | temperature_raw, |
|
|
float * | temperature_s, |
|
|
uint16_t * | humidity_raw, |
|
|
uint8_t * | humidity_s ) |
read the temperature and humidity data
- Parameters
-
| [in] | *handle | pointer to a dht11 handle structure |
| [out] | *temperature_raw | pointer to a raw temperature buffer |
| [out] | *temperature_s | pointer to a converted temperature buffer |
| [out] | *humidity_raw | pointer to a raw humidity buffer |
| [out] | *humidity_s | pointer to a converted humidity buffer |
- Returns
- status code
- 0 success
- 1 read temperature humidity failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 324 of file driver_dht11.c.