thermo4 2.0.0.0
Public function

Functions

void thermo4_cfg_setup (thermo4_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO4_RETVAL thermo4_init (thermo4_t *ctx, thermo4_cfg_t *cfg)
 Initialization function.
 
void thermo4_default_cfg (thermo4_t *ctx)
 Click Default Configuration function.
 
void thermo4_write_byte (thermo4_t *ctx, uint8_t reg, uint8_t data_in)
 Byte write function.
 
void thermo4_read_byte (thermo4_t *ctx, uint8_t reg, uint8_t *data_out)
 Byte read function.
 
void thermo4_write_data (thermo4_t *ctx, uint8_t reg, uint16_t data_in)
 Data write function.
 
void thermo4_read_data (thermo4_t *ctx, uint8_t reg, uint16_t *data_out)
 Data read function.
 
void thermo4_write_cfg (thermo4_t *ctx, uint8_t wr_cfg)
 Write configuration function.
 
uint8_t thermo4_read_cfg (thermo4_t *ctx)
 Read configuration function.
 
void thermo4_shut_down (thermo4_t *ctx)
 Read configuration function.
 
void thermo4_power_up (thermo4_t *ctx)
 Power up function.
 
void thermo4_reset (thermo4_t *ctx)
 Reset function.
 
float thermo4_read_temperature_c (thermo4_t *ctx)
 Read Temperature in Celsius function.
 
float thermo4_read_temperature_f (thermo4_t *ctx)
 Read Temperature in Fahrenheit function.
 
float thermo4_read_temperature_k (thermo4_t *ctx)
 Read Temperature in Kelvin function.
 
float thermo4_read_over_temp_shut_down (thermo4_t *ctx)
 Read overtemperature shutdown threshold function.
 
float thermo4_read_temp_hyst (thermo4_t *ctx)
 Read hysteresis function.
 
void thermo4_write_over_temp_shut_down (thermo4_t *ctx, float input_val)
 Write overtemperature shutdown threshold function.
 
void thermo4_write_temp_hyst (thermo4_t *ctx, float input_val)
 Write hysteresis function.
 

Detailed Description

Function Documentation

◆ thermo4_cfg_setup()

void thermo4_cfg_setup ( thermo4_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.

◆ thermo4_default_cfg()

void thermo4_default_cfg ( thermo4_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Thermo4 click.

◆ thermo4_init()

THERMO4_RETVAL thermo4_init ( thermo4_t * ctx,
thermo4_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ thermo4_power_up()

void thermo4_power_up ( thermo4_t * ctx)

Power up function.

Parameters
ctxClick object.

@description Function sets B0 of the configuration register to 0 in order to shut the sensor down.

◆ thermo4_read_byte()

void thermo4_read_byte ( thermo4_t * ctx,
uint8_t reg,
uint8_t * data_out )

Byte read function.

Parameters
ctxClick object.
regRegister address.
data_outOutput data.

@description This function reads data from the desired register.

◆ thermo4_read_cfg()

uint8_t thermo4_read_cfg ( thermo4_t * ctx)

Read configuration function.

Parameters
ctxClick object.
Returns
result 8-bit content of configuration register

@description Function reads 8-bit data from configuration register.

◆ thermo4_read_data()

void thermo4_read_data ( thermo4_t * ctx,
uint8_t reg,
uint16_t * data_out )

Data read function.

Parameters
ctxClick object.
regRegister address.
data_outOutput data.

@description This function reads data from the desired register.

◆ thermo4_read_over_temp_shut_down()

float thermo4_read_over_temp_shut_down ( thermo4_t * ctx)

Read overtemperature shutdown threshold function.

Parameters
ctxClick object.
Returns
float result value representing current overtemperature shutdown threshold

@description Function reads current overtemperature shutdown threshold.

Note
Default value is 80�C.

◆ thermo4_read_temp_hyst()

float thermo4_read_temp_hyst ( thermo4_t * ctx)

Read hysteresis function.

Parameters
ctxClick object.
Returns
float result value representing current hysteresis
Note
Default value is 75�C.

◆ thermo4_read_temperature_c()

float thermo4_read_temperature_c ( thermo4_t * ctx)

Read Temperature in Celsius function.

Parameters
ctxClick object.
Returns
float result value representing current temperature in degrees centigrade

@description Function reads sensor and performs calculations in order to return result value representing current temperature in degrees centigrade.

◆ thermo4_read_temperature_f()

float thermo4_read_temperature_f ( thermo4_t * ctx)

Read Temperature in Fahrenheit function.

Parameters
ctxClick object.
Returns
float result value representing current temperature in degrees fahrenheit

@description Function reads sensor and performs calculations in order to return result value representing current temperature in degrees fahrenheit.

◆ thermo4_read_temperature_k()

float thermo4_read_temperature_k ( thermo4_t * ctx)

Read Temperature in Kelvin function.

Parameters
ctxClick object.
Returns
float result value representing current temperature in degrees kelvin

@description Function reads sensor and performs calculations in order to return result value representing current temperature in degrees kelvin.

◆ thermo4_reset()

void thermo4_reset ( thermo4_t * ctx)

Reset function.

Parameters
ctxClick object.

@description Function is used to reset sensor.

◆ thermo4_shut_down()

void thermo4_shut_down ( thermo4_t * ctx)

Read configuration function.

Parameters
ctxClick object.

@description Function sets B0 of the configuration register to 1 in order to shut the sensor down.

◆ thermo4_write_byte()

void thermo4_write_byte ( thermo4_t * ctx,
uint8_t reg,
uint8_t data_in )

Byte write function.

Parameters
ctxClick object.
regRegister address.
data_inData to be written.

@description This function writes data to the desired register.

◆ thermo4_write_cfg()

void thermo4_write_cfg ( thermo4_t * ctx,
uint8_t wr_cfg )

Write configuration function.

Parameters
ctxClick object.
wr_cfgConfiguration register.

@description Function reads 8-bit data from configuration register.

◆ thermo4_write_data()

void thermo4_write_data ( thermo4_t * ctx,
uint8_t reg,
uint16_t data_in )

Data write function.

Parameters
ctxClick object.
regRegister address.
data_inData to be written.

@description This function writes data to the desired register.

◆ thermo4_write_over_temp_shut_down()

void thermo4_write_over_temp_shut_down ( thermo4_t * ctx,
float input_val )

Write overtemperature shutdown threshold function.

Parameters
ctxClick objeact.
input_valuser defined float value representing new shutdown threshold

@description Function sets new shutdown threshold value.

Note
Default value is 80�C.

◆ thermo4_write_temp_hyst()

void thermo4_write_temp_hyst ( thermo4_t * ctx,
float input_val )

Write hysteresis function.

Parameters
ctxClick object.
input_valuser defined float value representing new hysteresis

@description Function sets new hysteresis value.