thermo11 2.0.0.0
Public function

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.
 

Detailed Description

Function Documentation

◆ thermo11_cfg_setup()

void thermo11_cfg_setup ( thermo11_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ thermo11_check_status()

THERMO11_RETVAL thermo11_check_status ( thermo11_t * ctx)

Status Check function.

Parameters
ctxClick object.
Returns
Status byte - 0b0000 0xxx

@description This function allows user to check status byte which includes the high and low limit alert and data ready status.

Note
If one of these conditions is asserted, the determined bit flag in status byte will be set.

◆ thermo11_default_cfg()

void thermo11_default_cfg ( thermo11_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.
Note
     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.

◆ thermo11_general_call_reset_cmd()

void thermo11_general_call_reset_cmd ( thermo11_t * ctx)

General Call Reset Command.

Parameters
ctxClick 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.

◆ thermo11_generic_read()

void thermo11_generic_read ( thermo11_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ thermo11_generic_write()

void thermo11_generic_write ( thermo11_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ thermo11_get_int()

THERMO11_RETVAL thermo11_get_int ( thermo11_t * ctx)

INT Pin Check function.

Parameters
ctxClick object.
Returns
0 (Low) or 1 (High) state

@description This function returns the state of the INT (ALERT) pin.

◆ thermo11_get_temp()

float thermo11_get_temp ( thermo11_t * ctx,
uint8_t temp_addr )

Temperature Get function.

Parameters
ctxClick object.
temp_addrAddress of the desired temperature register
Returns
1 - Invalid register address, or temperature value

@description This function returns the temperature value converted to the Celsius degrees.

◆ thermo11_init()

THERMO11_RETVAL thermo11_init ( thermo11_t * ctx,
thermo11_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ thermo11_program_eeprom()

THERMO11_RETVAL thermo11_program_eeprom ( thermo11_t * ctx,
uint8_t eeprom_addr,
uint16_t eeprom_data )

EEPROM Program function.

Parameters
ctxClick object.
eeprom_addrEEPROM memory address where data be written
eeprom_dataData to be written in EEPROM
Returns
0 - OK, 1 - Invalid register address

@description This function allows user to perform a EEPROM memory programming on the desired value.

Note
This function will unlock the EEPROM memory and after data writing this function will also perform a general call reset command to load the programmed data to the corresponding register. After the reset sequence the EEPROM will be automatically locked.

◆ thermo11_read_reg()

THERMO11_RETVAL thermo11_read_reg ( thermo11_t * ctx,
uint8_t reg_addr,
uint16_t * data_out )

Repeated Read function.

Parameters
ctxClick object.
reg_addrRegister adress
data_outMemory location where data be stored

@description This function reads a 16bit data from the last accessed register.

◆ thermo11_set_temp()

THERMO11_RETVAL thermo11_set_temp ( thermo11_t * ctx,
uint8_t temp_addr,
float temp_value )

Temperature Set function.

Parameters
ctxClick object.
temp_addrAddress of the desired temperature register
temp_valueDesired temperature value in Celsius degrees

@description This function allows user to set the desired temperature register on the desired value.

Returns
0 - OK, 1 - Invalid register address, 2 - Invalid temperature range

◆ thermo11_sm_bus_alert_cmd()

uint8_t thermo11_sm_bus_alert_cmd ( thermo11_t * ctx)

SMBus Alert Command.

Parameters
ctxClick object.
Returns
Device slave address + status alert limit bit (LSB)

@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.

◆ thermo11_sw_reset()

void thermo11_sw_reset ( thermo11_t * ctx)

Software Reset Command.

Parameters
ctxClick object. @description This function performs a software reset command.

◆ thermo11_write_reg()

THERMO11_RETVAL thermo11_write_reg ( thermo11_t * ctx,
uint8_t reg_addr,
uint16_t data_in )

Repeated Write function.

Parameters
ctxClick object.
reg_addrRegister adress
data_inMemory location where data be stored

@description This function write a 16bit data from the last accessed register.