thermo15 2.0.0.0
Public function

Functions

void thermo15_cfg_setup (thermo15_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO15_RETVAL thermo15_init (thermo15_t *ctx, thermo15_cfg_t *cfg)
 Initialization function.
 
void thermo15_default_cfg (thermo15_t *ctx)
 Click Default Configuration function.
 
void thermo15_generic_write (thermo15_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic write function.
 
void thermo15_generic_read (thermo15_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic read function.
 
float thermo15_get_temperature_data (thermo15_t *ctx, uint8_t temp_format)
 Ambient temperature data.
 
void thermo15_set_temp_register (thermo15_t *ctx, uint8_t temp_reg, float temp_data)
 Set temperature register.
 
float thermo15_get_temp_register (thermo15_t *ctx, uint8_t temp_reg)
 Get temperature register.
 
uint8_t thermo15_get_interrupt_state (thermo15_t *ctx)
 Interrupt state.
 

Detailed Description

Function Documentation

◆ thermo15_cfg_setup()

void thermo15_cfg_setup ( thermo15_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.

◆ thermo15_default_cfg()

void thermo15_default_cfg ( thermo15_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Thermo_15 click.

◆ thermo15_generic_read()

void thermo15_generic_read ( thermo15_t * ctx,
uint8_t reg,
uint8_t * data_buffer,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufferData buffer to be written.
lenNumber of the bytes in data buffer.

@description This function reads data from the desired register.

◆ thermo15_generic_write()

void thermo15_generic_write ( thermo15_t * ctx,
uint8_t reg,
uint8_t * data_buffer,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufferOutput data buffer
lenNumber of the bytes to be read

@description This function writes data to the desired register.

◆ thermo15_get_interrupt_state()

uint8_t thermo15_get_interrupt_state ( thermo15_t * ctx)

Interrupt state.

Returns
Interrupt state on the INT pin

◆ thermo15_get_temp_register()

float thermo15_get_temp_register ( thermo15_t * ctx,
uint8_t temp_reg )

Get temperature register.

Parameters
ctxClick object
temp_regTemperature register (_TEMPERATURE_HYSTERESIS or _TEMPERATURE_LIMIT)
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 Hysteresis is 75 C and Temperature limit is 80 C

◆ thermo15_get_temperature_data()

float thermo15_get_temperature_data ( thermo15_t * ctx,
uint8_t temp_format )

Ambient temperature data.

Parameters
ctxClick object
temp_formatTemperature format ... (FAHRENHEIT, KELVIN or CELSIUS)
Returns
(float) Temperature data in the range from -55 C to +125 C

◆ thermo15_init()

THERMO15_RETVAL thermo15_init ( thermo15_t * ctx,
thermo15_cfg_t * cfg )

Initialization function.

Parameters
thermo15Click object.
cfgClick configuration structure.

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

◆ thermo15_set_temp_register()

void thermo15_set_temp_register ( thermo15_t * ctx,
uint8_t temp_reg,
float temp_data )

Set temperature register.

Parameters
ctxClick object
temp_regTemperature register (_TEMPERATURE_HYSTERESIS or _TEMPERATURE_LIMIT)
temp_dataTemperature 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 Hysteresis is 75 C and Temperature limit is 80 C