thermo11 2.0.0.0
|
Functions | |
void | thermo11_cfg_setup (thermo11_cfg_t *cfg) |
Config Object Initialization function. | |
THERMO11_RETVAL | thermo11_init (thermo11_t *ctx, thermo11_cfg_t *cfg) |
Initialization function. | |
void | thermo11_default_cfg (thermo11_t *ctx) |
Click Default Configuration function. | |
void | thermo11_generic_write (thermo11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | thermo11_generic_read (thermo11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
THERMO11_RETVAL | thermo11_write_reg (thermo11_t *ctx, uint8_t reg_addr, uint16_t data_in) |
Repeated Write function. | |
THERMO11_RETVAL | thermo11_read_reg (thermo11_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Repeated Read function. | |
float | thermo11_get_temp (thermo11_t *ctx, uint8_t temp_addr) |
Temperature Get function. | |
THERMO11_RETVAL | thermo11_get_int (thermo11_t *ctx) |
INT Pin Check function. | |
uint8_t | thermo11_sm_bus_alert_cmd (thermo11_t *ctx) |
SMBus Alert Command. | |
void | thermo11_general_call_reset_cmd (thermo11_t *ctx) |
General Call Reset Command. | |
void | thermo11_sw_reset (thermo11_t *ctx) |
Software Reset Command. | |
THERMO11_RETVAL | thermo11_check_status (thermo11_t *ctx) |
Status Check function. | |
THERMO11_RETVAL | thermo11_program_eeprom (thermo11_t *ctx, uint8_t eeprom_addr, uint16_t eeprom_data) |
EEPROM Program function. | |
THERMO11_RETVAL | thermo11_set_temp (thermo11_t *ctx, uint8_t temp_addr, float temp_value) |
Temperature Set function. | |
void thermo11_cfg_setup | ( | thermo11_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
THERMO11_RETVAL thermo11_check_status | ( | thermo11_t * | ctx | ) |
Status Check function.
ctx | Click object. |
@description This function allows user to check status byte which includes the high and low limit alert and data ready status.
void thermo11_default_cfg | ( | thermo11_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
set: THERMO11_CONFIG_REG - THERMO11_CONTINUOUS_CONV_MODE - THERMO11_CONV_TIME_4 - THERMO11_8_AVRG_CONV - THERMO11_ALERT_MODE - THERMO11_INT_PIN_ACT_HIGH - THERMO11_INT_PIN_DRDY_FLAG set: THERMO11_HIGH_LIMIT_REG - 30.5 set: THERMO11_LOW_LIMIT_REG - -5 *@description This function executes default configuration for Thermo11 click.
void thermo11_general_call_reset_cmd | ( | thermo11_t * | ctx | ) |
General Call Reset Command.
ctx | Click object. @description This function allows user to reset the device internal registers to power-up values by sending an General Call Reset command to the device. |
void thermo11_generic_read | ( | thermo11_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 thermo11_generic_write | ( | thermo11_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.
THERMO11_RETVAL thermo11_get_int | ( | thermo11_t * | ctx | ) |
INT Pin Check function.
ctx | Click object. |
@description This function returns the state of the INT (ALERT) pin.
float thermo11_get_temp | ( | thermo11_t * | ctx, |
uint8_t | temp_addr ) |
Temperature Get function.
ctx | Click object. |
temp_addr | Address of the desired temperature register |
@description This function returns the temperature value converted to the Celsius degrees.
THERMO11_RETVAL thermo11_init | ( | thermo11_t * | ctx, |
thermo11_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.
THERMO11_RETVAL thermo11_program_eeprom | ( | thermo11_t * | ctx, |
uint8_t | eeprom_addr, | ||
uint16_t | eeprom_data ) |
EEPROM Program function.
ctx | Click object. |
eeprom_addr | EEPROM memory address where data be written |
eeprom_data | Data to be written in EEPROM |
@description This function allows user to perform a EEPROM memory programming on the desired value.
THERMO11_RETVAL thermo11_read_reg | ( | thermo11_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out ) |
Repeated Read function.
ctx | Click object. |
reg_addr | Register adress |
data_out | Memory location where data be stored |
@description This function reads a 16bit data from the last accessed register.
THERMO11_RETVAL thermo11_set_temp | ( | thermo11_t * | ctx, |
uint8_t | temp_addr, | ||
float | temp_value ) |
Temperature Set function.
ctx | Click object. |
temp_addr | Address of the desired temperature register |
temp_value | Desired temperature value in Celsius degrees |
@description This function allows user to set the desired temperature register on the desired value.
uint8_t thermo11_sm_bus_alert_cmd | ( | thermo11_t * | ctx | ) |
SMBus Alert Command.
ctx | Click object. |
@description This function sends an SMBus Alert command to the device, and if INT (ALERT) pin is active, the device will respond by returning the slave address followed by status alert limit bit as LSB bit.
void thermo11_sw_reset | ( | thermo11_t * | ctx | ) |
Software Reset Command.
ctx | Click object. @description This function performs a software reset command. |
THERMO11_RETVAL thermo11_write_reg | ( | thermo11_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_in ) |
Repeated Write function.
ctx | Click object. |
reg_addr | Register adress |
data_in | Memory location where data be stored |
@description This function write a 16bit data from the last accessed register.