thermo5 2.0.0.0
Public function

Functions

void thermo5_cfg_setup (thermo5_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO5_RETVAL thermo5_init (thermo5_t *ctx, thermo5_cfg_t *cfg)
 Initialization function.
 
void thermo5_generic_write (thermo5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void thermo5_generic_read (thermo5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void thermo5_write_byte (thermo5_t *ctx, uint8_t wr_addr, uint8_t wr_data)
 Write byte function.
 
uint8_t thermo5_read_byte (thermo5_t *ctx, uint8_t rd_addr)
 Read byte function.
 
uint16_t thermo5_read_data (thermo5_t *ctx, uint16_t reg_addr)
 Read data function.
 
float thermo5_read_inter_temp (thermo5_t *ctx)
 Read internal diode temperature function.
 
float thermo5_read_extern_1_temp (thermo5_t *ctx)
 Read external diode 1 temperature function.
 
float thermo5_read_extern_2_temp (thermo5_t *ctx)
 Read external diode 2 temperature function.
 
float thermo5_read_extern_3_temp (thermo5_t *ctx)
 Read external diode 3 temperature function.
 
uint8_t thermo5_read_product_id (thermo5_t *ctx)
 Read product ID function.
 
uint8_t thermo5_read_manufacturer_id (thermo5_t *ctx)
 Read manufacturer ID function.
 
uint8_t thermo5_read_revision_register (thermo5_t *ctx)
 Read revision register function.
 
uint8_t thermo5_get_interrupt_state (thermo5_t *ctx)
 Get interrupt state function.
 
uint8_t thermo5_read_stat_reg (thermo5_t *ctx)
 Read status register function.
 
uint8_t thermo5_read_therm_limit_stat (thermo5_t *ctx)
 Read therm limit status function.
 
uint8_t thermo5_read_exter_diode_fault (thermo5_t *ctx)
 Read external diode fault function.
 
uint8_t thermo5_read_low_limit_stat (thermo5_t *ctx)
 Read low limit status function.
 
uint8_t thermo5_read_high_limit_stat (thermo5_t *ctx)
 Read high limit status function.
 
void thermo5_write_config (thermo5_t *ctx, uint8_t wr_data)
 Write configuration function.
 
uint8_t thermo5_read_config (thermo5_t *ctx)
 Read configuration function.
 
void thermo5_set_convers_rate (thermo5_t *ctx, uint8_t convers_rate)
 Set conversion rate function.
 
uint8_t thermo5_read_convers_rate (thermo5_t *ctx)
 Read conversion rate function.
 
void thermo5_set_filter_rate (thermo5_t *ctx, uint8_t filter_decode_rate)
 Filter configuration function.
 
uint8_t thermo5_read_filter_rate (thermo5_t *ctx)
 Read filter configuration function.
 
void thermo5_set_diode_1_beta_config (thermo5_t *ctx, uint8_t enable)
 Set External Diode 1 Beta Configuration function.
 
uint8_t thermo5_read_diode_1_beta_config (thermo5_t *ctx)
 Read External Diode 1 Beta Configuration function.
 
void thermo5_set_diode_2_beta_config (thermo5_t *ctx, uint8_t enable)
 Set External Diode 2 Beta Configuration function.
 
uint8_t thermo5_read_diode_2_beta_config (thermo5_t *ctx)
 Read External Diode 2 Beta Configuration function.
 

Detailed Description

Function Documentation

◆ thermo5_cfg_setup()

void thermo5_cfg_setup ( thermo5_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.

◆ thermo5_generic_read()

void thermo5_generic_read ( thermo5_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.

◆ thermo5_generic_write()

void thermo5_generic_write ( thermo5_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.

◆ thermo5_get_interrupt_state()

uint8_t thermo5_get_interrupt_state ( thermo5_t * ctx)

Get interrupt state function.

Parameters
ctxClick object.

@description This function reads state of INT pin.

◆ thermo5_init()

THERMO5_RETVAL thermo5_init ( thermo5_t * ctx,
thermo5_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ thermo5_read_byte()

uint8_t thermo5_read_byte ( thermo5_t * ctx,
uint8_t rd_addr )

Read byte function.

Parameters
ctxClick object.
rd_addr8-bit register address.

@description This function reads single byte of data from specified register.

◆ thermo5_read_config()

uint8_t thermo5_read_config ( thermo5_t * ctx)

Read configuration function.

Parameters
ctxClick object.

@description This function reads 8-bit data from Configuration register.

◆ thermo5_read_convers_rate()

uint8_t thermo5_read_convers_rate ( thermo5_t * ctx)

Read conversion rate function.

Parameters
ctxClick object.

@description This function reads data from conversion rate register.

◆ thermo5_read_data()

uint16_t thermo5_read_data ( thermo5_t * ctx,
uint16_t reg_addr )

Read data function.

Parameters
ctxClick object.
reg_addr16-bit register address.

@description This function reads 2 bytes of data from specified, raad only register.

◆ thermo5_read_diode_1_beta_config()

uint8_t thermo5_read_diode_1_beta_config ( thermo5_t * ctx)

Read External Diode 1 Beta Configuration function.

Parameters
ctxClick object.

@description This function reads current beta configuration settings for external diode 1.

◆ thermo5_read_diode_2_beta_config()

uint8_t thermo5_read_diode_2_beta_config ( thermo5_t * ctx)

Read External Diode 2 Beta Configuration function.

Parameters
ctxClick object.

@description This function reads current beta configuration settings for external diode 2.

◆ thermo5_read_exter_diode_fault()

uint8_t thermo5_read_exter_diode_fault ( thermo5_t * ctx)

Read external diode fault function.

Parameters
ctxClick object.

@description This function reads the External Diode Fault Status register which utilises 3 of its bits [B3 - B1] to represents which of the external diodes caused the fault bit.

◆ thermo5_read_extern_1_temp()

float thermo5_read_extern_1_temp ( thermo5_t * ctx)

Read external diode 1 temperature function.

Parameters
ctxClick object.

@description This function reads measurements made by external 1 diode.

◆ thermo5_read_extern_2_temp()

float thermo5_read_extern_2_temp ( thermo5_t * ctx)

Read external diode 2 temperature function.

Parameters
ctxClick object.

@description This function reads measurements made by external 2 diode.

◆ thermo5_read_extern_3_temp()

float thermo5_read_extern_3_temp ( thermo5_t * ctx)

Read external diode 3 temperature function.

Parameters
ctxClick object.

@description This function reads measurements made by external 3 diode.

◆ thermo5_read_filter_rate()

uint8_t thermo5_read_filter_rate ( thermo5_t * ctx)

Read filter configuration function.

Parameters
ctxClick object.

@description This function reads data from filter configuration register.

◆ thermo5_read_high_limit_stat()

uint8_t thermo5_read_high_limit_stat ( thermo5_t * ctx)

Read high limit status function.

Parameters
ctxClick object.

@description This function reads the High Limit Status register which utilises its lower nibble to represents which diodes have exceed their programmed high limit.

◆ thermo5_read_inter_temp()

float thermo5_read_inter_temp ( thermo5_t * ctx)

Read internal diode temperature function.

Parameters
ctxClick object.

@description This function reads measurements made by internal diode.

◆ thermo5_read_low_limit_stat()

uint8_t thermo5_read_low_limit_stat ( thermo5_t * ctx)

Read low limit status function.

Parameters
ctxClick object.

@description This function reads the Low Limit Status register which utilises its lower nibble to represents which diodes have droped below their programmed low limit.

◆ thermo5_read_manufacturer_id()

uint8_t thermo5_read_manufacturer_id ( thermo5_t * ctx)

Read manufacturer ID function.

Parameters
ctxClick object.

@description This function reads manufacturer's ID number.

◆ thermo5_read_product_id()

uint8_t thermo5_read_product_id ( thermo5_t * ctx)

Read product ID function.

Parameters
ctxClick object.

@description This function reads device specific ID number.

◆ thermo5_read_revision_register()

uint8_t thermo5_read_revision_register ( thermo5_t * ctx)

Read revision register function.

Parameters
ctxClick object.

@description This function reads register that contains an 8-bit word that identifies the die revision.

◆ thermo5_read_stat_reg()

uint8_t thermo5_read_stat_reg ( thermo5_t * ctx)

Read status register function.

Parameters
ctxClick object.

@description This function reads current state od the device from status registers.

◆ thermo5_read_therm_limit_stat()

uint8_t thermo5_read_therm_limit_stat ( thermo5_t * ctx)

Read therm limit status function.

Parameters
ctxClick object.

@description This function reads the Therm Limit Status register which utilises its lower nibble to represents which diodes have exceeded the therm limit.

◆ thermo5_set_convers_rate()

void thermo5_set_convers_rate ( thermo5_t * ctx,
uint8_t convers_rate )

Set conversion rate function.

Parameters
ctxClick object.
convers_rate4-bit value that defines rate of conversion.

@description This function sets the conversion rate.

◆ thermo5_set_diode_1_beta_config()

void thermo5_set_diode_1_beta_config ( thermo5_t * ctx,
uint8_t enable )

Set External Diode 1 Beta Configuration function.

Parameters
ctxClick object.
enableData that defines the level of digital filtering.

@description This function allows user to enable or disable beta compensation factor for external diode 1.

◆ thermo5_set_diode_2_beta_config()

void thermo5_set_diode_2_beta_config ( thermo5_t * ctx,
uint8_t enable )

Set External Diode 2 Beta Configuration function.

Parameters
ctxClick object.
enableData that defines the level of digital filtering.

@description This function allows user to enable or disable beta compensation factor for external diode 2.

◆ thermo5_set_filter_rate()

void thermo5_set_filter_rate ( thermo5_t * ctx,
uint8_t filter_decode_rate )

Filter configuration function.

Parameters
ctxClick object.
filter_decode_rateData that defines the level of digital filtering.

@description This function controls the digital filter on the external diode 1 channel.

◆ thermo5_write_byte()

void thermo5_write_byte ( thermo5_t * ctx,
uint8_t wr_addr,
uint8_t wr_data )

Write byte function.

Parameters
ctxClick object.
wr_addr8-bit register address.
wr_data8-bit data to be written into register.

@description This function writes single byte of data into specified register.

◆ thermo5_write_config()

void thermo5_write_config ( thermo5_t * ctx,
uint8_t wr_data )

Write configuration function.

Parameters
ctxClick object.
wr_data8-bit data that defines wandted configuration.

@description This function writes 8-bit data into Configuration register.