dht222
2.0.0.0
|
Functions | |
void | dht222_cfg_setup (dht222_cfg_t *cfg) |
Config Object Initialization function. More... | |
DHT222_RETVAL | dht222_init (dht222_t *ctx, dht222_cfg_t *cfg) |
Initialization function. More... | |
void | dht222_generic_write (dht222_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | dht222_generic_read (dht222_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint8_t | dht222_read_byte (dht222_t *ctx, uint8_t address) |
Generic read 8-bit data function. More... | |
uint16_t | dht222_read_data (dht222_t *ctx, uint8_t address) |
Generic read 16-bit data function. More... | |
uint32_t | dht222_read_all_data (dht222_t *ctx, uint8_t address) |
Reads 32-bit value from given address. More... | |
uint16_t | dht222_get_temperature (dht222_t *ctx) |
Reads temperature from AM2322 sensor. More... | |
uint16_t | dht222_get_humidity (dht222_t *ctx) |
Reads humidity from AM2322 sensor. More... | |
uint16_t | dht222_get_model (dht222_t *ctx) |
Get model of AM2322 sensor. More... | |
uint16_t | dht222_get_users_reg1 (dht222_t *ctx) |
Get users register 1 of AM2322 sensor. More... | |
uint16_t | dht222_get_users_reg2 (dht222_t *ctx) |
Get users register 2 of AM2322 sensor. More... | |
uint8_t | dht222_get_version (dht222_t *ctx) |
Get version of AM2322 sensor. More... | |
uint32_t | dht222_get_id (dht222_t *ctx) |
Get ID of AM2322 sensor. More... | |
void dht222_cfg_setup | ( | dht222_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void dht222_generic_read | ( | dht222_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void dht222_generic_write | ( | dht222_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint16_t dht222_get_humidity | ( | dht222_t * | ctx | ) |
Reads humidity from AM2322 sensor.
ctx | Click object |
@description The function calculate the humidity data from sensor data reading from the sensor AM2322 on the DHT22 2 Click.
uint32_t dht222_get_id | ( | dht222_t * | ctx | ) |
Get ID of AM2322 sensor.
ctx | Click object |
@description Function read from the ID register of AM2322 sensor and return 16-bit ID data.
uint16_t dht222_get_model | ( | dht222_t * | ctx | ) |
Get model of AM2322 sensor.
@description Function read from the model register of AM2322 sensor and return 16-bit model data.
uint16_t dht222_get_temperature | ( | dht222_t * | ctx | ) |
Reads temperature from AM2322 sensor.
ctx | Click object |
@description The function calculate the temperature data from sensor data reading from the sensor AM2322 on the DHT22 2 Click.
uint16_t dht222_get_users_reg1 | ( | dht222_t * | ctx | ) |
Get users register 1 of AM2322 sensor.
ctx | Click object |
@description Function read from the users register 1 of AM2322 sensor and return 16-bit users register 1 data.
uint16_t dht222_get_users_reg2 | ( | dht222_t * | ctx | ) |
Get users register 2 of AM2322 sensor.
ctx | Click object |
@description Function read from the users register 2 of AM2322 sensor and return 16-bit users register 2 data.
uint8_t dht222_get_version | ( | dht222_t * | ctx | ) |
Get version of AM2322 sensor.
ctx | Click object |
@description Function read from the version register of AM2322 sensor and return 16-bit version data.
DHT222_RETVAL dht222_init | ( | dht222_t * | ctx, |
dht222_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object |
dht222 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint32_t dht222_read_all_data | ( | dht222_t * | ctx, |
uint8_t | address | ||
) |
Reads 32-bit value from given address.
ctx | Click object |
address | 8-bit address of data that has to be read |
@description Function read 32-bit data from 8-bit register address.
uint8_t dht222_read_byte | ( | dht222_t * | ctx, |
uint8_t | address | ||
) |
Generic read 8-bit data function.
ctx | Click object |
address | 8-bit address of data that has to be read |
@description Function read 8-bit data from 8-bit register address.
uint16_t dht222_read_data | ( | dht222_t * | ctx, |
uint8_t | address | ||
) |
Generic read 16-bit data function.
ctx | Click object |
address | 8-bit address of data that has to be read |
@description Function read 16-bit data from 8-bit register address.