temphum 2.0.0.0
|
Functions | |
void | temphum_cfg_setup (temphum_cfg_t *cfg) |
Config Object Initialization function. | |
TEMPHIM_RETVAL | temphum_init (temphum_t *ctx, temphum_cfg_t *cfg) |
Initialization function. | |
void | temphum_default_cfg (temphum_t *ctx) |
Click Default Configuration function. | |
void | temphum_generic_write (temphum_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | temphum_generic_read (temphum_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | temphum_get_hum_data (temphum_t *ctx) |
Gets humidity data function. | |
uint16_t | temphum_get_temp_data (temphum_t *ctx) |
Gets temperature data function. | |
void | temphum_get_temp_hum (temphum_t *ctx, float *temperature, float *humidity) |
Gets temperature and humidity function. | |
float | temphum_get_temperature (temphum_t *ctx) |
Gets temperature in degrees Celsius function. | |
float | temphum_get_humidity (temphum_t *ctx) |
Gets humidity in degrees Celsius function. | |
void temphum_cfg_setup | ( | temphum_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void temphum_default_cfg | ( | temphum_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for TempHum click.
void temphum_generic_read | ( | temphum_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 temphum_generic_write | ( | temphum_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 temphum_get_hum_data | ( | temphum_t * | ctx | ) |
Gets humidity data function.
ctx | Click object. |
@description Function get humidity data by reading from two target 8-bit register address of HTS221 sensor on Temp&Hum Click.
float temphum_get_humidity | ( | temphum_t * | ctx | ) |
Gets humidity in degrees Celsius function.
ctx | Click object. |
@description Function get humidity value in percentage [ % ] from HTS221 sensor on Temp&Hum Click.
uint16_t temphum_get_temp_data | ( | temphum_t * | ctx | ) |
Gets temperature data function.
ctx | Click object. |
@description Function gets temperature data by reading from two target 8-bit register address of HTS221 sensor on Temp&Hum Click.
void temphum_get_temp_hum | ( | temphum_t * | ctx, |
float * | temperature, | ||
float * | humidity ) |
Gets temperature and humidity function.
temperature | pointer to float value of temperature [ �C ] |
humidity | pointer to float value of humidity [ % ] |
@description Function gets temperature value in degrees Celsius [ �C ] and humidity value in percentage [ % ] by reading from the two target 8-bit register address of HTS221 sensor on Temp&Hum Click and converts it by performing linear interpolation on read data.
float temphum_get_temperature | ( | temphum_t * | ctx | ) |
Gets temperature in degrees Celsius function.
ctx | Click object. |
@description Function get temperature value in degrees Celsius [ �C ] from HTS221 sensor on Temp&Hum Click.
TEMPHIM_RETVAL temphum_init | ( | temphum_t * | ctx, |
temphum_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.