thermo13 2.0.0.0
Public function

Functions

void thermo13_cfg_setup (thermo13_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO13_RETVAL thermo13_init (thermo13_t *ctx, thermo13_cfg_t *cfg)
 Initialization function.
 
void thermo13_default_cfg (thermo13_t *ctx)
 Click Default Configuration function.
 
void thermo13_generic_write (thermo13_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void thermo13_generic_read (thermo13_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t thermo13_read_data (thermo13_t *ctx, uint8_t reg_addr)
 Functions for read data from registers.
 
void thermo13_configuration (thermo13_t *ctx, uint16_t cfg_data)
 Configuration register.
 
float thermo13_get_ambient_temperature_data (thermo13_t *ctx, uint8_t temp_in)
 Ambient temperature data.
 
void thermo13_set_temp_limit (thermo13_t *ctx, uint8_t temp_reg, float temp)
 Set temperature limit register.
 
float thermo13_get_temp_limit (thermo13_t *ctx, uint8_t temp_reg)
 Get temperature register.
 
uint8_t thermo13_get_interrupt_state (thermo13_t *ctx)
 Interrupt state.
 
void thermo13_software_reset (thermo13_t *ctx)
 Software reset.
 

Detailed Description

Function Documentation

◆ thermo13_cfg_setup()

void thermo13_cfg_setup ( thermo13_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.

◆ thermo13_configuration()

void thermo13_configuration ( thermo13_t * ctx,
uint16_t cfg_data )

Configuration register.

Parameters
ctxClick object.
cfg_dataConfiguration data.
Note
: Use this functions to write new data to the configuration register.

◆ thermo13_default_cfg()

void thermo13_default_cfg ( thermo13_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Thermo13 click.

◆ thermo13_generic_read()

void thermo13_generic_read ( thermo13_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.

◆ thermo13_generic_write()

void thermo13_generic_write ( thermo13_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.

◆ thermo13_get_ambient_temperature_data()

float thermo13_get_ambient_temperature_data ( thermo13_t * ctx,
uint8_t temp_in )

Ambient temperature data.

Parameters
ctxClick object.
temp_inTemperature in ... (FAHRENHEIT, KELVIN or CELSIUS)
Returns
Temperature data in the range from -40 C to +125 C

◆ thermo13_get_interrupt_state()

uint8_t thermo13_get_interrupt_state ( thermo13_t * ctx)

Interrupt state.

Parameters
ctxClick object.
Returns
Interrupt state on the int_pin.

◆ thermo13_get_temp_limit()

float thermo13_get_temp_limit ( thermo13_t * ctx,
uint8_t temp_reg )

Get temperature register.

Parameters
ctxClick object.
temp_regTemperature register (TEMPERATURE_LIMIT_LOW or TEMPERATURE_LIMIT_HIGH).
Returns
Temperature data in Celsius.
Note
: This function converts the ADC value into the temperature data in degrees Celsius that is read from the register. Use this function when you want to read one of these two registers Default register values are: Temperature limit low is 75 C and Temperature limit high is 80 C

◆ thermo13_init()

THERMO13_RETVAL thermo13_init ( thermo13_t * ctx,
thermo13_cfg_t * cfg )

Initialization function.

Parameters
thermo13Click object.
cfgClick configuration structure.

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

◆ thermo13_read_data()

uint16_t thermo13_read_data ( thermo13_t * ctx,
uint8_t reg_addr )

Functions for read data from registers.

Parameters
ctxClick object.
reg_addrRegister address (LSB first read).
Returns
16-bit data that is reads from the register.

◆ thermo13_set_temp_limit()

void thermo13_set_temp_limit ( thermo13_t * ctx,
uint8_t temp_reg,
float temp )

Set temperature limit register.

Parameters
ctxClick object.
temp_regTemperature register (TEMPERATURE_LIMIT_LOW or TEMPERATURE_LIMIT_HIGH)
tempTemperature data in Celsius.
Note
: This function converts the temperature data in degrees Celsius to the ADC value written in the registers. Use this function when you want to set one of these two registers Default register values are: Temperature limit low is 75 C and Temperature limit high is 80 C

◆ thermo13_software_reset()

void thermo13_software_reset ( thermo13_t * ctx)

Software reset.