dht222 2.0.0.0
|
Functions | |
void | dht222_cfg_setup (dht222_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | dht222_init (dht222_t *ctx, dht222_cfg_t *cfg) |
Initialization function. | |
err_t | dht222_read_reg (dht222_t *ctx, uint8_t address, uint8_t *data_out, uint8_t len) |
Generic read function. | |
err_t | dht222_write_reg (dht222_t *ctx, uint8_t address, uint8_t *data_in, uint8_t len) |
Generic write function. | |
err_t | dht222_get_temperature (dht222_t *ctx, uint16_t *temperature) |
Reads temperature from AM2322 sensor. | |
err_t | dht222_get_humidity (dht222_t *ctx, uint16_t *humidity) |
Reads humidity from AM2322 sensor. | |
err_t | dht222_get_temp_hum (dht222_t *ctx, uint16_t *temperature, uint16_t *humidity) |
Reads temperature and humidity from AM2322 sensor. | |
void dht222_cfg_setup | ( | dht222_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
err_t dht222_get_humidity | ( | dht222_t * | ctx, |
uint16_t * | humidity ) |
Reads humidity from AM2322 sensor.
ctx | Click object |
humidity | 16-bit humidity data |
The function reads the humidity data from the sensor AM2322 on the DHT22 2 Click.
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht222_get_temp_hum | ( | dht222_t * | ctx, |
uint16_t * | temperature, | ||
uint16_t * | humidity ) |
Reads temperature and humidity from AM2322 sensor.
ctx | Click object |
temperature | 16-bit temperature data |
humidity | 16-bit humidity data |
The function reads the temperature and humidity data from the sensor AM2322 on the DHT22 2 Click.
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht222_get_temperature | ( | dht222_t * | ctx, |
uint16_t * | temperature ) |
Reads temperature from AM2322 sensor.
ctx | Click object |
temperature | 16-bit temperature data |
The function reads the temperature data from the sensor AM2322 on the DHT22 2 Click.
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t dht222_init | ( | dht222_t * | ctx, |
dht222_cfg_t * | cfg ) |
Initialization function.
ctx | Click object |
cfg | Click configuration structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t dht222_read_reg | ( | dht222_t * | ctx, |
uint8_t | address, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_out | Output data buf |
len | Number of the bytes to be read |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t dht222_write_reg | ( | dht222_t * | ctx, |
uint8_t | address, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_in | Data buf to be written. |
len | Number of the bytes in data buf. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.