temphum9
2.0.0.0
|
Functions | |
void | temphum9_cfg_setup (temphum9_cfg_t *cfg) |
Config Object Initialization function. More... | |
TEMPHUM9_RETVAL | temphum9_init (temphum9_t *ctx, temphum9_cfg_t *cfg) |
Initialization function. More... | |
void | temphum9_default_cfg (temphum9_t *ctx) |
Click Default Configuration function. More... | |
void | temphum9_generic_write (temphum9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | temphum9_generic_read (temphum9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | temphum9_read_register (temphum9_t *ctx, uint16_t register_address, uint8_t n_data_, uint16_t *register_buffer) |
Readinig register content. More... | |
void | temphum9_send_command (temphum9_t *ctx, uint16_t command) |
Issuing a command. More... | |
float | temphum9_get_temperature (temphum9_t *ctx, uint8_t data_mode) |
Calculating temperature. More... | |
float | temphum9_get_relative_humidity (temphum9_t *ctx, uint8_t data_mode) |
Calculating relative humidity. More... | |
void | temhum9_get_temperature_and_humidity (temphum9_t *ctx, uint8_t data_mode, float *measurement_data) |
Calculating temperature and relative humidity. More... | |
void temhum9_get_temperature_and_humidity | ( | temphum9_t * | ctx, |
uint8_t | data_mode, | ||
float * | measurement_data | ||
) |
Calculating temperature and relative humidity.
ctx | Click object. |
data | mode to be used for measurement (normal or low power mode) |
measurement_data | measurend data is stored into this array This function performs temperature and relative humidity measurement and calculates temperature and relative humidity |
void temphum9_cfg_setup | ( | temphum9_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void temphum9_default_cfg | ( | temphum9_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for TempHum9 click.
void temphum9_generic_read | ( | temphum9_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 |
This function reads data from the desired register.
void temphum9_generic_write | ( | temphum9_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. |
This function writes data to the desired register.
float temphum9_get_relative_humidity | ( | temphum9_t * | ctx, |
uint8_t | data_mode | ||
) |
Calculating relative humidity.
ctx | Click object. |
data | mode to be used for measurement (normal or low power mode) |
This function performs relative humidity measurement and calculates relative humidity
float temphum9_get_temperature | ( | temphum9_t * | ctx, |
uint8_t | data_mode | ||
) |
Calculating temperature.
ctx | Click object. |
data | mode to be used for measurement (normal or low power mode) |
This function performs temperature measurement and calculates temperature
TEMPHUM9_RETVAL temphum9_init | ( | temphum9_t * | ctx, |
temphum9_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void temphum9_read_register | ( | temphum9_t * | ctx, |
uint16_t | register_address, | ||
uint8_t | n_data_, | ||
uint16_t * | register_buffer | ||
) |
Readinig register content.
ctx | Click object. |
register_address | ddress of a register to read (command) |
n_data | single for one 16-bit register or dual for two 16-bit registers |
register_buffer | read data is stored into this array |
This function reads one or two 16-bit registers
void temphum9_send_command | ( | temphum9_t * | ctx, |
uint16_t | command | ||
) |
Issuing a command.
ctx | Click object. |
command | command to be sent to device |
This function issues (sends) command to device