thermo6 2.0.0.0
|
Functions | |
void | thermo6_cfg_setup (thermo6_cfg_t *cfg) |
Config Object Initialization function. | |
THERMO6_RETVAL | thermo6_init (thermo6_t *ctx, thermo6_cfg_t *cfg) |
Initialization function. | |
void | thermo6_default_cfg (thermo6_t *ctx) |
Click Default Configuration function. | |
void | thermo6_generic_write (thermo6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | thermo6_generic_read (thermo6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
float | thermo6_get_temperature_data (thermo6_t *ctx, uint8_t temp_format) |
Temperature function. | |
void | thermo6_set_other_register (thermo6_t *ctx, uint8_t reg, float tx_data) |
Set other register. | |
float | thermo6_get_other_register (thermo6_t *ctx, uint8_t reg) |
Set other register. | |
uint8_t | thermo6_get_over_temp_status (thermo6_t *ctx) |
Read over-temperature status function. | |
void | thermo6_set_register_cfg (thermo6_t *ctx, uint16_t cfg_data) |
Write configuration function. | |
void thermo6_cfg_setup | ( | thermo6_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void thermo6_default_cfg | ( | thermo6_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Thermo6 click.
** Config register - THERMO6_CFG_CONVERSION_RATE_8 - THERMO6_CFG_PEC_ENABLE - THERMO6_CFG_TIMEOUT_ENABLE - THERMO6_CFG_RESOLUTION_12 - THERMO6_CFG_NORMAL_FORMAT - THERMO6_CFG_POWER_UP - THERMO6_CFG_COMPARATOR_MODE - THERMO6_CFG_FAULT_QUEUE_1
void thermo6_generic_read | ( | thermo6_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 thermo6_generic_write | ( | thermo6_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 thermo6_get_other_register | ( | thermo6_t * | ctx, |
uint8_t | reg ) |
Set other register.
ctx | Click object. |
reg | Select register (REG_TEMP_HYST or REG_TEMP_OS) |
@description Reads current overtemperature shutdown threshold or hysteresis.
uint8_t thermo6_get_over_temp_status | ( | thermo6_t * | ctx | ) |
Read over-temperature status function.
ctx | Click object. |
@description Reads configuration register's B15, that indicates that the over-temperature value in the TOS register has been exceeded.
float thermo6_get_temperature_data | ( | thermo6_t * | ctx, |
uint8_t | temp_format ) |
Temperature function.
ctx | Click object. |
temp_format | Temperature format (FORMAT_CELSIUS, FORMAT_FAHRENHEIT or FORMAT_KELVIN). |
@description Reads sensor and performs calculations in order to return result value representing current temperature.
THERMO6_RETVAL thermo6_init | ( | thermo6_t * | ctx, |
thermo6_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.
void thermo6_set_other_register | ( | thermo6_t * | ctx, |
uint8_t | reg, | ||
float | tx_data ) |
Set other register.
ctx | Click object. |
reg | Select register (REG_TEMP_HYST or REG_TEMP_OS) |
tx_data | Data for write in the register |
@description Sets new (shutdown threshold or hysteresis) value.
void thermo6_set_register_cfg | ( | thermo6_t * | ctx, |
uint16_t | cfg_data ) |
Write configuration function.
ctx | Click object. |
cfg_data | 16-bit data that defines wanted configuration |
@description writes 16-bit data into configuration register.