htu21d 2.0.0.0
|
Functions | |
void | htu21d_cfg_setup (htu21d_cfg_t *cfg) |
Config Object Initialization function. | |
HTU21D_RETVAL | htu21d_init (htu21d_t *ctx, htu21d_cfg_t *cfg) |
Initialization function. | |
void | htu21d_generic_write (htu21d_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | htu21d_generic_read (htu21d_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint32_t | htu21d_read_data (htu21d_t *ctx, uint8_t reg_adr) |
Generic read 24-bit data function. | |
void | htu21d_send_cmd (htu21d_t *ctx, uint8_t cmd_byte) |
Send command function. | |
float | htu21d_get_temperature (htu21d_t *ctx) |
Get temperature value function. | |
float | htu21d_get_humidity (htu21d_t *ctx) |
Get humidity value function. | |
void htu21d_cfg_setup | ( | htu21d_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void htu21d_generic_read | ( | htu21d_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
Data 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 htu21d_generic_write | ( | htu21d_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.
float htu21d_get_humidity | ( | htu21d_t * | ctx | ) |
Get humidity value function.
ctx | Click object. |
@description Function read and calculate humidity percentage from the HTU21D sensor.
float htu21d_get_temperature | ( | htu21d_t * | ctx | ) |
Get temperature value function.
ctx | Click object. |
@description Function read and calculate temperature in degrees Celsius from the HTU21D sensor.
HTU21D_RETVAL htu21d_init | ( | htu21d_t * | ctx, |
htu21d_cfg_t * | cfg ) |
Initialization function.
htu21d | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint32_t htu21d_read_data | ( | htu21d_t * | ctx, |
uint8_t | reg_adr ) |
Generic read 24-bit data function.
ctx | Click object. |
reg_adr | Register address. |
@description Function read 24-bit data from register address of HTU21D.
void htu21d_send_cmd | ( | htu21d_t * | ctx, |
uint8_t | cmd_byte ) |
Send command function.
ctx | Click object. |
cmd_byte | Command byte. |
@description Function sends command to HTU21D.