thermo8 2.0.0.0
Public function

Functions

void thermo8_cfg_setup (thermo8_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO8_RETVAL thermo8_init (thermo8_t *ctx, thermo8_cfg_t *cfg)
 Initialization function.
 
void thermo8_default_cfg (thermo8_t *ctx)
 Click Default Configuration function.
 
void thermo8_generic_write (thermo8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void thermo8_generic_read (thermo8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t thermo8_ale_get (thermo8_t *ctx)
 Function for returning the state of the alert pin.
 
void thermo8_write_reg (thermo8_t *ctx, uint8_t r_addr, uint16_t r_data)
 Function for writing to 16 bit registers.
 
uint16_t thermo8_read_reg (thermo8_t *ctx, uint8_t r_addr)
 Function for reading from 16 bit registers.
 
void thermo8_write_reg_8 (thermo8_t *ctx, uint8_t r_addr, uint8_t r_data)
 Function for single byte writes.
 
uint8_t thermo8_read_reg_8 (thermo8_t *ctx, uint8_t r_addr)
 Function for single byte read's.
 
float thermo8_get_temperature (thermo8_t *ctx)
 Function will return the temperature value in �C.
 
void thermo8_set_resolution (thermo8_t *ctx, uint8_t r_cfg)
 Function will set the conversion resoult temperature step depending on the passed constant.
 
uint16_t thermo8_get_dev_id (thermo8_t *ctx)
 Function will return the device ID.
 
uint16_t thermo8_get_man_id (thermo8_t *ctx)
 Function will return the manufacturer ID.
 
void thermo8_sleep (thermo8_t *ctx)
 Function will place Thermo 8 to the low power mode.
 
void thermo8_wake_up (thermo8_t *ctx)
 Function for waking up the click board from the sleep mode.
 
void thermo8_limit_set (thermo8_t *ctx, uint8_t limit_reg_addr, float limit)
 Function for setting the temperature alarm levels for the lower, upper and critical alert levels.
 
uint8_t thermo8_get_alert_stat (thermo8_t *ctx)
 Function will return all alert states.
 
void thermo8_alert_enable (thermo8_t *ctx, uint8_t thys, uint8_t alert_cfg)
 Function for setting the Tupper and Tlower hysterezis level as well as the alert mode.
 
void thermo8_tcrit_lock (thermo8_t *ctx)
 Function for locking the critical temperature setting register.
 
void thermo8_tcrit_unlock (thermo8_t *ctx)
 Function for unlocking the critical temperature setting register.
 
void thermo8_win_lock (thermo8_t *ctx)
 Function for locking the Tupper and Tlower registers.
 
void thermo8_win_unlock (thermo8_t *ctx)
 Function for unlocking the Tupper and Tlower registers.
 

Detailed Description

Function Documentation

◆ thermo8_ale_get()

uint8_t thermo8_ale_get ( thermo8_t * ctx)

Function for returning the state of the alert pin.

Parameters
ctxClick object.

@description This function returning the state of the alert pin.

◆ thermo8_alert_enable()

void thermo8_alert_enable ( thermo8_t * ctx,
uint8_t thys,
uint8_t alert_cfg )

Function for setting the Tupper and Tlower hysterezis level as well as the alert mode.

Parameters
ctxClick object.
thysHysterezis level.
alert_cfgSet the alert trigger.

@description This functionsetting the Tupper and Tlower hysterezis level as well as the alert mode.

◆ thermo8_cfg_setup()

void thermo8_cfg_setup ( thermo8_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.

◆ thermo8_default_cfg()

void thermo8_default_cfg ( thermo8_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Thermo8 click.

◆ thermo8_generic_read()

void thermo8_generic_read ( thermo8_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.

◆ thermo8_generic_write()

void thermo8_generic_write ( thermo8_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.

◆ thermo8_get_alert_stat()

uint8_t thermo8_get_alert_stat ( thermo8_t * ctx)

Function will return all alert states.

Parameters
ctxClick object.

@description This function will return all alert states. The alert can be tested with the predefined constants.

◆ thermo8_get_dev_id()

uint16_t thermo8_get_dev_id ( thermo8_t * ctx)

Function will return the device ID.

Parameters
ctxClick object.

@description This function returns the device ID.

◆ thermo8_get_man_id()

uint16_t thermo8_get_man_id ( thermo8_t * ctx)

Function will return the manufacturer ID.

Parameters
ctxClick object.

@description This function returns the manufacturer ID.

◆ thermo8_get_temperature()

float thermo8_get_temperature ( thermo8_t * ctx)

Function will return the temperature value in �C.

Parameters
ctxClick object.

@description This function returns the temperature value in �C.

◆ thermo8_init()

THERMO8_RETVAL thermo8_init ( thermo8_t * ctx,
thermo8_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ thermo8_limit_set()

void thermo8_limit_set ( thermo8_t * ctx,
uint8_t limit_reg_addr,
float limit )

Function for setting the temperature alarm levels for the lower, upper and critical alert levels.

Parameters
ctxClick object.
limit_reg_addrLimit register address constant.
limitThe temperature value that you want to limit the alert to.

@description This function setting the temperature alarm levels for the lower, upper and critical alert levels.

◆ thermo8_read_reg()

uint16_t thermo8_read_reg ( thermo8_t * ctx,
uint8_t r_addr )

Function for reading from 16 bit registers.

Parameters
ctxClick object.
r_addrRegister address.

@description This function for reading from 16 bit registers.

◆ thermo8_read_reg_8()

uint8_t thermo8_read_reg_8 ( thermo8_t * ctx,
uint8_t r_addr )

Function for single byte read's.

Parameters
ctxClick object.
r_addrRegister address.

@description This function for single byte read's.

◆ thermo8_set_resolution()

void thermo8_set_resolution ( thermo8_t * ctx,
uint8_t r_cfg )

Function will set the conversion resoult temperature step depending on the passed constant.

Parameters
ctxClick object.
r_cfgRegister address.

@description This function sets the conversion resoult temperature step depending on the passed constant.

◆ thermo8_sleep()

void thermo8_sleep ( thermo8_t * ctx)

Function will place Thermo 8 to the low power mode.

Parameters
ctxClick object.

@description This function place Thermo 8 to the low power mode. To read the data from the sensor you will need to call the thermo8_wakeup() function.

◆ thermo8_tcrit_lock()

void thermo8_tcrit_lock ( thermo8_t * ctx)

Function for locking the critical temperature setting register.

Parameters
ctxClick object.

@description This function locking the critical temperature setting register. By default at powerup the register is unlocked.

◆ thermo8_tcrit_unlock()

void thermo8_tcrit_unlock ( thermo8_t * ctx)

Function for unlocking the critical temperature setting register.

Parameters
ctxClick object.

@description This function unlocking the critical temperature setting register.

◆ thermo8_wake_up()

void thermo8_wake_up ( thermo8_t * ctx)

Function for waking up the click board from the sleep mode.

Parameters
ctxClick object.

@description This function waking up the click board from the sleep mode.

◆ thermo8_win_lock()

void thermo8_win_lock ( thermo8_t * ctx)

Function for locking the Tupper and Tlower registers.

Parameters
ctxClick object.

@description locking the Tupper and Tlower registers. By default at powerup the registers are unlocked.

◆ thermo8_win_unlock()

void thermo8_win_unlock ( thermo8_t * ctx)

Function for unlocking the Tupper and Tlower registers.

Parameters
ctxClick object.

@description This function unlocking the Tupper and Tlower registers.

◆ thermo8_write_reg()

void thermo8_write_reg ( thermo8_t * ctx,
uint8_t r_addr,
uint16_t r_data )

Function for writing to 16 bit registers.

Parameters
ctxClick object.
r_addrRegister address.
r_dataData to be written.

@description This function for writing to 16 bit registers.

◆ thermo8_write_reg_8()

void thermo8_write_reg_8 ( thermo8_t * ctx,
uint8_t r_addr,
uint8_t r_data )

Function for single byte writes.

Parameters
ctxClick object.
r_addrRegister address.
r_dataData to be written.

@description This function for single byte writes.