temphum2
2.0.0.0
|
Functions | |
void | temphum2_cfg_setup (temphum2_cfg_t *cfg) |
Config Object Initialization function. More... | |
TEMPHUM2_RETVAL | temphum2_init (temphum2_t *ctx, temphum2_cfg_t *cfg) |
Initialization function. More... | |
void | temphum2_default_cfg (temphum2_t *ctx) |
Click Default Configuration function. More... | |
void | temphum2_generic_write (temphum2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | temphum2_generic_read (temphum2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint8_t | temphum2_read_firmware_revision (temphum2_t *ctx) |
This function for reads Firmware Revision. More... | |
void | temhum2_get_eletronic_id (temphum2_t *ctx, uint8_t *electronic_id) |
This function for reads Eletronic ID. More... | |
uint8_t | temphum2_get_query_device (temphum2_t *ctx) |
This function for reads Query Device. More... | |
void | temphum2_set_mode (uint8_t select_mode, uint8_t speed_mode) |
Functions for set measurement mode. More... | |
void | temphum2_get_measurement (temphum2_t *ctx, float *data_buffer) |
Functions for mesurement. More... | |
void temhum2_get_eletronic_id | ( | temphum2_t * | ctx, |
uint8_t * | electronic_id | ||
) |
This function for reads Eletronic ID.
ctx | Click object. |
electronicI_id | buffer that will be written 8 elements Eletronic ID |
void temphum2_cfg_setup | ( | temphum2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void temphum2_default_cfg | ( | temphum2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
Set: TEMPHUM2_NO_HOLD_MODE
void temphum2_generic_read | ( | temphum2_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 temphum2_generic_write | ( | temphum2_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.
void temphum2_get_measurement | ( | temphum2_t * | ctx, |
float * | data_buffer | ||
) |
Functions for mesurement.
ctx | Click object. |
data_buffer | buffer that will be written Temperature and Humidity data |
Data: data_buffer[ 0 ] - Temperature data_buffer[ 1 ] - Humidity
uint8_t temphum2_get_query_device | ( | temphum2_t * | ctx | ) |
This function for reads Query Device.
ctx | Click object. |
TEMPHUM2_RETVAL temphum2_init | ( | temphum2_t * | ctx, |
temphum2_cfg_t * | cfg | ||
) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint8_t temphum2_read_firmware_revision | ( | temphum2_t * | ctx | ) |
This function for reads Firmware Revision.
ctx | Click object. |
void temphum2_set_mode | ( | uint8_t | select_mode, |
uint8_t | speed_mode | ||
) |
Functions for set measurement mode.
select_mode | TEMPHUM2_NO_HOLD_MODE(default) or TEMPHUM2_HOLD_MODE |
speend_mode | TEMPHUM2_NORMAL_MODE(default) or TEMPHUM2_FAST_MODE |