thermo8 2.0.0.0
|
Functions | |
void | thermo8_cfg_setup (thermo8_cfg_t *cfg) |
Config Object Initialization function. | |
THERMO8_RETVAL | thermo8_init (thermo8_t *ctx, thermo8_cfg_t *cfg) |
Initialization function. | |
void | thermo8_default_cfg (thermo8_t *ctx) |
Click Default Configuration function. | |
void | thermo8_generic_write (thermo8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | thermo8_generic_read (thermo8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | thermo8_ale_get (thermo8_t *ctx) |
Function for returning the state of the alert pin. | |
void | thermo8_write_reg (thermo8_t *ctx, uint8_t r_addr, uint16_t r_data) |
Function for writing to 16 bit registers. | |
uint16_t | thermo8_read_reg (thermo8_t *ctx, uint8_t r_addr) |
Function for reading from 16 bit registers. | |
void | thermo8_write_reg_8 (thermo8_t *ctx, uint8_t r_addr, uint8_t r_data) |
Function for single byte writes. | |
uint8_t | thermo8_read_reg_8 (thermo8_t *ctx, uint8_t r_addr) |
Function for single byte read's. | |
float | thermo8_get_temperature (thermo8_t *ctx) |
Function will return the temperature value in �C. | |
void | thermo8_set_resolution (thermo8_t *ctx, uint8_t r_cfg) |
Function will set the conversion resoult temperature step depending on the passed constant. | |
uint16_t | thermo8_get_dev_id (thermo8_t *ctx) |
Function will return the device ID. | |
uint16_t | thermo8_get_man_id (thermo8_t *ctx) |
Function will return the manufacturer ID. | |
void | thermo8_sleep (thermo8_t *ctx) |
Function will place Thermo 8 to the low power mode. | |
void | thermo8_wake_up (thermo8_t *ctx) |
Function for waking up the click board from the sleep mode. | |
void | thermo8_limit_set (thermo8_t *ctx, uint8_t limit_reg_addr, float limit) |
Function for setting the temperature alarm levels for the lower, upper and critical alert levels. | |
uint8_t | thermo8_get_alert_stat (thermo8_t *ctx) |
Function will return all alert states. | |
void | thermo8_alert_enable (thermo8_t *ctx, uint8_t thys, uint8_t alert_cfg) |
Function for setting the Tupper and Tlower hysterezis level as well as the alert mode. | |
void | thermo8_tcrit_lock (thermo8_t *ctx) |
Function for locking the critical temperature setting register. | |
void | thermo8_tcrit_unlock (thermo8_t *ctx) |
Function for unlocking the critical temperature setting register. | |
void | thermo8_win_lock (thermo8_t *ctx) |
Function for locking the Tupper and Tlower registers. | |
void | thermo8_win_unlock (thermo8_t *ctx) |
Function for unlocking the Tupper and Tlower registers. | |
uint8_t thermo8_ale_get | ( | thermo8_t * | ctx | ) |
Function for returning the state of the alert pin.
ctx | Click object. |
@description This function returning the state of the alert pin.
void thermo8_alert_enable | ( | thermo8_t * | ctx, |
uint8_t | thys, | ||
uint8_t | alert_cfg ) |
Function for setting the Tupper and Tlower hysterezis level as well as the alert mode.
ctx | Click object. |
thys | Hysterezis level. |
alert_cfg | Set the alert trigger. |
@description This functionsetting the Tupper and Tlower hysterezis level as well as the alert mode.
void thermo8_cfg_setup | ( | thermo8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void thermo8_default_cfg | ( | thermo8_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Thermo8 click.
void thermo8_generic_read | ( | thermo8_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 thermo8_generic_write | ( | thermo8_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.
uint8_t thermo8_get_alert_stat | ( | thermo8_t * | ctx | ) |
Function will return all alert states.
ctx | Click object. |
@description This function will return all alert states. The alert can be tested with the predefined constants.
uint16_t thermo8_get_dev_id | ( | thermo8_t * | ctx | ) |
Function will return the device ID.
ctx | Click object. |
@description This function returns the device ID.
uint16_t thermo8_get_man_id | ( | thermo8_t * | ctx | ) |
Function will return the manufacturer ID.
ctx | Click object. |
@description This function returns the manufacturer ID.
float thermo8_get_temperature | ( | thermo8_t * | ctx | ) |
Function will return the temperature value in �C.
ctx | Click object. |
@description This function returns the temperature value in �C.
THERMO8_RETVAL thermo8_init | ( | thermo8_t * | ctx, |
thermo8_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 thermo8_limit_set | ( | thermo8_t * | ctx, |
uint8_t | limit_reg_addr, | ||
float | limit ) |
Function for setting the temperature alarm levels for the lower, upper and critical alert levels.
ctx | Click object. |
limit_reg_addr | Limit register address constant. |
limit | The temperature value that you want to limit the alert to. |
@description This function setting the temperature alarm levels for the lower, upper and critical alert levels.
uint16_t thermo8_read_reg | ( | thermo8_t * | ctx, |
uint8_t | r_addr ) |
Function for reading from 16 bit registers.
ctx | Click object. |
r_addr | Register address. |
@description This function for reading from 16 bit registers.
uint8_t thermo8_read_reg_8 | ( | thermo8_t * | ctx, |
uint8_t | r_addr ) |
Function for single byte read's.
ctx | Click object. |
r_addr | Register address. |
@description This function for single byte read's.
void thermo8_set_resolution | ( | thermo8_t * | ctx, |
uint8_t | r_cfg ) |
Function will set the conversion resoult temperature step depending on the passed constant.
ctx | Click object. |
r_cfg | Register address. |
@description This function sets the conversion resoult temperature step depending on the passed constant.
void thermo8_sleep | ( | thermo8_t * | ctx | ) |
Function will place Thermo 8 to the low power mode.
ctx | Click object. |
@description This function place Thermo 8 to the low power mode. To read the data from the sensor you will need to call the thermo8_wakeup() function.
void thermo8_tcrit_lock | ( | thermo8_t * | ctx | ) |
Function for locking the critical temperature setting register.
ctx | Click object. |
@description This function locking the critical temperature setting register. By default at powerup the register is unlocked.
void thermo8_tcrit_unlock | ( | thermo8_t * | ctx | ) |
Function for unlocking the critical temperature setting register.
ctx | Click object. |
@description This function unlocking the critical temperature setting register.
void thermo8_wake_up | ( | thermo8_t * | ctx | ) |
Function for waking up the click board from the sleep mode.
ctx | Click object. |
@description This function waking up the click board from the sleep mode.
void thermo8_win_lock | ( | thermo8_t * | ctx | ) |
Function for locking the Tupper and Tlower registers.
ctx | Click object. |
@description locking the Tupper and Tlower registers. By default at powerup the registers are unlocked.
void thermo8_win_unlock | ( | thermo8_t * | ctx | ) |
Function for unlocking the Tupper and Tlower registers.
ctx | Click object. |
@description This function unlocking the Tupper and Tlower registers.
void thermo8_write_reg | ( | thermo8_t * | ctx, |
uint8_t | r_addr, | ||
uint16_t | r_data ) |
Function for writing to 16 bit registers.
ctx | Click object. |
r_addr | Register address. |
r_data | Data to be written. |
@description This function for writing to 16 bit registers.
void thermo8_write_reg_8 | ( | thermo8_t * | ctx, |
uint8_t | r_addr, | ||
uint8_t | r_data ) |
Function for single byte writes.
ctx | Click object. |
r_addr | Register address. |
r_data | Data to be written. |
@description This function for single byte writes.