temphum2 2.0.0.0
|
Functions | |
void | temphum2_cfg_setup (temphum2_cfg_t *cfg) |
Config Object Initialization function. | |
TEMPHUM2_RETVAL | temphum2_init (temphum2_t *ctx, temphum2_cfg_t *cfg) |
Initialization function. | |
void | temphum2_default_cfg (temphum2_t *ctx) |
Click Default Configuration function. | |
void | temphum2_generic_write (temphum2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | temphum2_generic_read (temphum2_t *ctx, uint8_t *tx_buf, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | temphum2_read_firmware_revision (temphum2_t *ctx) |
This function for reads Firmware Revision. | |
void | temhum2_get_eletronic_id (temphum2_t *ctx, uint8_t *electronic_id) |
This function for reads Eletronic ID. | |
uint8_t | temphum2_get_query_device (temphum2_t *ctx) |
This function for reads Query Device. | |
void | temphum2_set_mode (uint8_t select_mode, uint8_t speed_mode) |
Functions for set measurement mode. | |
void | temphum2_get_measurement (temphum2_t *ctx, float *data_buffer) |
Functions for mesurement. | |
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. |
@description 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 - TEMPHUM2_NORMAL_MODE Set: TEMPHUM2_REG_WRITE_HEATER_CONTROL - TEMPHUM2_HEATER_ENABLE | TEMPHUM2_HEATER_CURRENT_6_4mA@description This function executes default configuration for TempHum2 click.
void temphum2_generic_read | ( | temphum2_t * | ctx, |
uint8_t * | tx_buf, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
tx_buf | Register buffer. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description 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. |
@description 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. |
@description 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 |