thermo14 2.2.0
Public function

Functions

void thermo14_cfg_setup (thermo14_cfg_t *cfg)
 Config Object Initialization function.
THERMO14_RETVAL thermo14_init (thermo14_t *ctx, thermo14_cfg_t *cfg)
 Initialization function.
void thermo14_generic_write (thermo14_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
void thermo14_generic_read (thermo14_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
void thermo14_default_cfg (thermo14_t *ctx)
void thermo14_reset (thermo14_t *ctx)
 Reset function.
void thermo14_sensor_enable (thermo14_t *ctx)
 Sensor enable function.
int16_t thermo14_temp_raw_get (thermo14_t *ctx)
 Get Raw Temperature Data function.
float thermo14_raw_to_celsius (thermo14_t *ctx, int16_t temp_raw)
 Temperature Calculation function. ````````````````.
float thermo14_get_temperature (thermo14_t *ctx)
 Get Temperature in Centigrade function.
uint8_t thermo14_get_int (thermo14_t *ctx)
 Get Interrupt state function.
void thermo14_low_temp_trsh (thermo14_t *ctx, float trsh_val)
 Set the low temperature threshold value function.
void thermo14_high_temp_trsh (thermo14_t *ctx, float trsh_val)
 Set the high temperature threshold value function.

Detailed Description

Function Documentation

◆ thermo14_cfg_setup()

void thermo14_cfg_setup ( thermo14_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.

◆ thermo14_default_cfg()

void thermo14_default_cfg ( thermo14_t * ctx)

◆ thermo14_generic_read()

void thermo14_generic_read ( thermo14_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.

◆ thermo14_generic_write()

void thermo14_generic_write ( thermo14_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.

◆ thermo14_get_int()

uint8_t thermo14_get_int ( thermo14_t * ctx)

Get Interrupt state function.

Parameters
ctxClick object.
Returns
  • 0 : Interrupt has not occured
  • 1 : Interrupt has occured

@description This function is used to check if an interrupt has occured.

◆ thermo14_get_temperature()

float thermo14_get_temperature ( thermo14_t * ctx)

Get Temperature in Centigrade function.

Parameters
ctxClick object.
Returns
float value that defines temperature value

@description This function is used to get the temperature.

◆ thermo14_high_temp_trsh()

void thermo14_high_temp_trsh ( thermo14_t * ctx,
float trsh_val )

Set the high temperature threshold value function.

Parameters
ctxClick object.
trsh_valhigh temperature threshold value

@description This function is used to set the high temperature threshold value.

◆ thermo14_init()

THERMO14_RETVAL thermo14_init ( thermo14_t * ctx,
thermo14_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ thermo14_low_temp_trsh()

void thermo14_low_temp_trsh ( thermo14_t * ctx,
float trsh_val )

Set the low temperature threshold value function.

Parameters
ctxClick object.
trsh_vallow temperature threshold value

@description This function is used to set the low temperature threshold value.

◆ thermo14_raw_to_celsius()

float thermo14_raw_to_celsius ( thermo14_t * ctx,
int16_t temp_raw )

Temperature Calculation function. ````````````````.

Parameters
ctxClick object.
temp_raw16-bit signed data that defines the raw value
Returns
float value that defines temperature value.

@description This function is used to perform necessary calculacion in order to get temperature freom raw data.

◆ thermo14_reset()

void thermo14_reset ( thermo14_t * ctx)

Reset function.

Parameters
ctxClick object.

@description This function is used to perform software reset.

◆ thermo14_sensor_enable()

void thermo14_sensor_enable ( thermo14_t * ctx)

Sensor enable function.

Parameters
ctxClick object.

@description This function is used to enable sensor.

◆ thermo14_temp_raw_get()

int16_t thermo14_temp_raw_get ( thermo14_t * ctx)

Get Raw Temperature Data function.

Parameters
ctxClick object.
Returns
temp_raw 16-bit signed data that defines the raw value

@description This function is used to get the raw value.