thermo4  2.0.0.0
Functions
Public function

Functions

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

Detailed Description

Function Documentation

◆ thermo4_cfg_setup()

void thermo4_cfg_setup ( thermo4_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

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.

This function executes default configuration for Thermo4 click.

◆ thermo4_init()

THERMO4_RETVAL thermo4_init ( thermo4_t ctx,
thermo4_cfg_t cfg 
)

Initialization function.

Parameters
thermo4Click object.
cfgClick configuration structure.

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.

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.

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

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.

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

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

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

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

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.

Function is used to reset sensor.

◆ thermo4_shut_down()

void thermo4_shut_down ( thermo4_t ctx)

Read configuration function.

Parameters
ctxClick object.

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.

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.

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.

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

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

Function sets new hysteresis value.