thermo5 2.0.0.0
|
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. | |
void thermo5_cfg_setup | ( | thermo5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void thermo5_generic_read | ( | thermo5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void thermo5_generic_write | ( | thermo5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t thermo5_get_interrupt_state | ( | thermo5_t * | ctx | ) |
Get interrupt state function.
ctx | Click object. |
@description This function reads state of INT pin.
THERMO5_RETVAL thermo5_init | ( | thermo5_t * | ctx, |
thermo5_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t thermo5_read_byte | ( | thermo5_t * | ctx, |
uint8_t | rd_addr ) |
Read byte function.
ctx | Click object. |
rd_addr | 8-bit register address. |
@description This function reads single byte of data from specified register.
uint8_t thermo5_read_config | ( | thermo5_t * | ctx | ) |
Read configuration function.
ctx | Click object. |
@description This function reads 8-bit data from Configuration register.
uint8_t thermo5_read_convers_rate | ( | thermo5_t * | ctx | ) |
Read conversion rate function.
ctx | Click object. |
@description This function reads data from conversion rate register.
uint16_t thermo5_read_data | ( | thermo5_t * | ctx, |
uint16_t | reg_addr ) |
Read data function.
ctx | Click object. |
reg_addr | 16-bit register address. |
@description This function reads 2 bytes of data from specified, raad only register.
uint8_t thermo5_read_diode_1_beta_config | ( | thermo5_t * | ctx | ) |
Read External Diode 1 Beta Configuration function.
ctx | Click object. |
@description This function reads current beta configuration settings for external diode 1.
uint8_t thermo5_read_diode_2_beta_config | ( | thermo5_t * | ctx | ) |
Read External Diode 2 Beta Configuration function.
ctx | Click object. |
@description This function reads current beta configuration settings for external diode 2.
uint8_t thermo5_read_exter_diode_fault | ( | thermo5_t * | ctx | ) |
Read external diode fault function.
ctx | Click 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.
float thermo5_read_extern_1_temp | ( | thermo5_t * | ctx | ) |
Read external diode 1 temperature function.
ctx | Click object. |
@description This function reads measurements made by external 1 diode.
float thermo5_read_extern_2_temp | ( | thermo5_t * | ctx | ) |
Read external diode 2 temperature function.
ctx | Click object. |
@description This function reads measurements made by external 2 diode.
float thermo5_read_extern_3_temp | ( | thermo5_t * | ctx | ) |
Read external diode 3 temperature function.
ctx | Click object. |
@description This function reads measurements made by external 3 diode.
uint8_t thermo5_read_filter_rate | ( | thermo5_t * | ctx | ) |
Read filter configuration function.
ctx | Click object. |
@description This function reads data from filter configuration register.
uint8_t thermo5_read_high_limit_stat | ( | thermo5_t * | ctx | ) |
Read high limit status function.
ctx | Click 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.
float thermo5_read_inter_temp | ( | thermo5_t * | ctx | ) |
Read internal diode temperature function.
ctx | Click object. |
@description This function reads measurements made by internal diode.
uint8_t thermo5_read_low_limit_stat | ( | thermo5_t * | ctx | ) |
Read low limit status function.
ctx | Click 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.
uint8_t thermo5_read_manufacturer_id | ( | thermo5_t * | ctx | ) |
Read manufacturer ID function.
ctx | Click object. |
@description This function reads manufacturer's ID number.
uint8_t thermo5_read_product_id | ( | thermo5_t * | ctx | ) |
Read product ID function.
ctx | Click object. |
@description This function reads device specific ID number.
uint8_t thermo5_read_revision_register | ( | thermo5_t * | ctx | ) |
Read revision register function.
ctx | Click object. |
@description This function reads register that contains an 8-bit word that identifies the die revision.
uint8_t thermo5_read_stat_reg | ( | thermo5_t * | ctx | ) |
Read status register function.
ctx | Click object. |
@description This function reads current state od the device from status registers.
uint8_t thermo5_read_therm_limit_stat | ( | thermo5_t * | ctx | ) |
Read therm limit status function.
ctx | Click object. |
@description This function reads the Therm Limit Status register which utilises its lower nibble to represents which diodes have exceeded the therm limit.
void thermo5_set_convers_rate | ( | thermo5_t * | ctx, |
uint8_t | convers_rate ) |
Set conversion rate function.
ctx | Click object. |
convers_rate | 4-bit value that defines rate of conversion. |
@description This function sets the conversion rate.
void thermo5_set_diode_1_beta_config | ( | thermo5_t * | ctx, |
uint8_t | enable ) |
Set External Diode 1 Beta Configuration function.
ctx | Click object. |
enable | Data that defines the level of digital filtering. |
@description This function allows user to enable or disable beta compensation factor for external diode 1.
void thermo5_set_diode_2_beta_config | ( | thermo5_t * | ctx, |
uint8_t | enable ) |
Set External Diode 2 Beta Configuration function.
ctx | Click object. |
enable | Data that defines the level of digital filtering. |
@description This function allows user to enable or disable beta compensation factor for external diode 2.
void thermo5_set_filter_rate | ( | thermo5_t * | ctx, |
uint8_t | filter_decode_rate ) |
Filter configuration function.
ctx | Click object. |
filter_decode_rate | Data that defines the level of digital filtering. |
@description This function controls the digital filter on the external diode 1 channel.
void thermo5_write_byte | ( | thermo5_t * | ctx, |
uint8_t | wr_addr, | ||
uint8_t | wr_data ) |
Write byte function.
ctx | Click object. |
wr_addr | 8-bit register address. |
wr_data | 8-bit data to be written into register. |
@description This function writes single byte of data into specified register.
void thermo5_write_config | ( | thermo5_t * | ctx, |
uint8_t | wr_data ) |
Write configuration function.
ctx | Click object. |
wr_data | 8-bit data that defines wandted configuration. |
@description This function writes 8-bit data into Configuration register.