templog3 2.0.0.0
|
Functions | |
void | templog3_cfg_setup (templog3_cfg_t *cfg) |
Config Object Initialization function. | |
TEMPLOG3_RETVAL | templog3_init (templog3_t *ctx, templog3_cfg_t *cfg) |
Initialization function. | |
void | templog3_default_cfg (templog3_t *ctx) |
Click Default Configuration function. | |
uint8_t | templog3_write_reg (templog3_t *ctx, uint8_t reg_addr, uint16_t data_in) |
Generic Write function. | |
uint8_t | templog3_read_reg (templog3_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Generic Read function. | |
uint8_t | templog3_set_addr_ptr (templog3_t *ctx, uint8_t reg_addr) |
Set Address Pointer function. | |
void | templog3_repeated_read (templog3_t *ctx, uint16_t *data_out) |
Repeated Read function. | |
uint8_t | templog3_get_temp (templog3_t *ctx, uint8_t temp_sel, float *temp_out) |
Get Temperature function. | |
uint8_t | templog3_set_temp (templog3_t *ctx, uint8_t temp_sel, float temp_in) |
Set Temperature function. | |
uint8_t | templog3_check_alarm (templog3_t *ctx) |
Alarm-Event Check function. | |
void | templog3_wait_conv_done (templog3_t *ctx) |
Conversion Time function. | |
void | templog3_eeprom_byte_write (templog3_t *ctx, uint8_t reg_addr, uint8_t data_in, uint8_t eeprom_mode) |
EEPROM Single Write function. | |
void | templog3_eeprom_page_write (templog3_t *ctx, uint8_t reg_addr, uint8_t *data_in) |
EEPROM Page Write function. | |
void | templog3_eeprom_curr_addr_read (templog3_t *ctx, uint8_t *current_address) |
EEPROM Current Address Read function. | |
void | templog3_eeprom_byte_read (templog3_t *ctx, uint8_t reg_addr, uint8_t *data_out) |
EEPROM Single Read function. | |
uint8_t | templog3_eeprom_sequential_read (templog3_t *ctx, uint8_t reg_addr, uint8_t *data_out, uint16_t num_bytes) |
EEPROM Sequential Read function. | |
void templog3_cfg_setup | ( | templog3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t templog3_check_alarm | ( | templog3_t * | ctx | ) |
Alarm-Event Check function.
ctx | Click object. |
@description Function checks the alarm (event) pin state.
void templog3_default_cfg | ( | templog3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
Set: TEMPLOG3_CONFIG_REG - TEMPLOG3_TLIMIT_HYST_0_DEG | - TEMPLOG3_CONT_CONV_MODE | - TEMPLOG3_EVENT_OUTPUT_EN | - TEMPLOG3_EVENT_TCRIT_ONLY | - TEMPLOG3_EVENT_POL_ACT_HIGH | - TEMPLOG3_EVENT_COMPARATOR_MODE Set: TEMPLOG3_RESOLUTION_REG - TEMPLOG3_11BIT_RESOLUTION Set: TEMPLOG3_TEMP_CRITICAL_REG - 26.5 Set: TEMPLOG3_TEMP_UPPER_REG - 30 Set: TEMPLOG3_TEMP_LOWER_REG - -5
@description This function executes default configuration for TempLog3 click.
void templog3_eeprom_byte_read | ( | templog3_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out ) |
EEPROM Single Read function.
ctx | Click object. |
reg_addr | Memory address which from data byte be read |
data_out | Memory where data byte be placed |
@description Function reads a one byte data from the EEPROM.
void templog3_eeprom_byte_write | ( | templog3_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_in, | ||
uint8_t | eeprom_mode ) |
EEPROM Single Write function.
ctx | Click object. |
reg_addr | Memory address where one byte data be written |
data_in | Data byte to be written |
eeprom_mode | 0 - EEPROM Write, 1 - SW Write Protection, 2 - Clear Write Protection |
@description Function writes a one byte data to the EEPROM including/excluding a write protection.
void templog3_eeprom_curr_addr_read | ( | templog3_t * | ctx, |
uint8_t * | current_address ) |
EEPROM Current Address Read function.
ctx | Click object. |
current_address | Returns the address of the last word accessed internally incremented by 1 |
@description Function returns the address of the last word accessed internally incremented by 1.
void templog3_eeprom_page_write | ( | templog3_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_in ) |
EEPROM Page Write function.
ctx | Click object. |
reg_addr | Memory start address which from a writing cycle be started |
data_in | Data to be written, 16 bytes of data |
@description Function writes a 16 bytes of data to the selected EEPROM page.
uint8_t templog3_eeprom_sequential_read | ( | templog3_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out, | ||
uint16_t | num_bytes ) |
EEPROM Sequential Read function.
ctx | Click object. |
reg_addr | Memory start address which from a reading cycle be started |
data_out | Memory where data be placed |
num_bytes | Number of bytes to be read |
@description Function reads a desired number of bytes from the EEPROM.
uint8_t templog3_get_temp | ( | templog3_t * | ctx, |
uint8_t | temp_sel, | ||
float * | temp_out ) |
Get Temperature function.
ctx | Click object. |
temp_sel | Address of the desired temperature register |
temp_out | Returns a temperature value calculated to the Celsius degrees |
@description Function gets a temperature value from the desired temperature register calculated to the Celsius degrees.
TEMPLOG3_RETVAL templog3_init | ( | templog3_t * | ctx, |
templog3_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 templog3_read_reg | ( | templog3_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out ) |
Generic Read function.
ctx | Click object. |
reg_addr | Address which from data be read |
data_out | Memory where 16bit data be placed |
@description Function reads a 16bit data from the desired register.
void templog3_repeated_read | ( | templog3_t * | ctx, |
uint16_t * | data_out ) |
Repeated Read function.
ctx | Click object. |
data_out | Memory where 16bit data be placed |
@description Function reads a 16bit data from the register on which the internal address pointer was last set.
uint8_t templog3_set_addr_ptr | ( | templog3_t * | ctx, |
uint8_t | reg_addr ) |
Set Address Pointer function.
ctx | Click object. |
reg_addr | Address on which the internal address pointer be set |
@description Function sets the internal address pointer on the desired register address.
uint8_t templog3_set_temp | ( | templog3_t * | ctx, |
uint8_t | temp_sel, | ||
float | temp_in ) |
Set Temperature function.
ctx | Click object. |
temp_sel | Address of the desired temperature register |
temp_in | Temperature value to be written calculated to the Celsius degrees |
@description Function sets a desired temperature register on the desired value calculated to the Celsius degrees.
void templog3_wait_conv_done | ( | templog3_t * | ctx | ) |
Conversion Time function.
ctx | Click object. |
@description Function ensures that the minimum conversion time is met.
uint8_t templog3_write_reg | ( | templog3_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_in ) |
Generic Write function.
ctx | Click object. |
reg_addr | Address where data be written |
data_in | 16bit data to be written |
@description Function writes a 16bit data to the desired register.