templog2 2.0.0.0
|
Functions | |
void | templog2_cfg_setup (templog2_cfg_t *cfg) |
Configuration Object Setup function. | |
TEMPLOG2_RETVAL | templog2_init (templog2_t *ctx, templog2_cfg_t *cfg) |
Click Initialization function. | |
void | templog2_default_config (templog2_t *ctx) |
Click Default Configuration function. | |
TEMPLOG2_RETVAL | templog2_write_reg (templog2_t *ctx, uint8_t reg_addr, uint16_t transfer_data) |
Write Register function. | |
TEMPLOG2_RETVAL | templog2_read_reg (templog2_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Read Register function. | |
uint8_t | templog2_data_ready (templog2_t *ctx) |
Data Ready function. | |
uint8_t | templog2_check_alert (templog2_t *ctx) |
Alert Checking function. | |
float | templog2_read_temp (templog2_t *ctx) |
Read Temperature function. | |
TEMPLOG2_RETVAL | templog2_set_mode (templog2_t *ctx, uint8_t op_mode, uint8_t alert_mode) |
Mode Setting function. | |
TEMPLOG2_RETVAL | templog2_write_eeprom (templog2_t *ctx, uint8_t eeprom_addr, uint16_t data_in) |
EEPROM Writing function. | |
void | templog2_reset (templog2_t *ctx) |
Reset function. | |
void templog2_cfg_setup | ( | templog2_cfg_t * | cfg | ) |
Configuration Object Setup function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t templog2_check_alert | ( | templog2_t * | ctx | ) |
Alert Checking function.
ctx | Click object. |
@description This function returns the state of the Alert pin on the Temp-Log 2 click.
uint8_t templog2_data_ready | ( | templog2_t * | ctx | ) |
Data Ready function.
ctx | Click object. |
@description This function checks data ready and limit status flags.
void templog2_default_config | ( | templog2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Temp-Log 2 click.
TEMPLOG2_RETVAL templog2_init | ( | templog2_t * | ctx, |
templog2_cfg_t * | cfg ) |
Click Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
TEMPLOG2_RETVAL templog2_read_reg | ( | templog2_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out ) |
Read Register function.
ctx | Click object. |
reg_addr | Register address. |
data_out | Data output. |
@description This function reads 16-bit data from the desired register.
float templog2_read_temp | ( | templog2_t * | ctx | ) |
Read Temperature function.
ctx | Click object. |
@description This function returns temperature calculated to Celsius degrees.
void templog2_reset | ( | templog2_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function executes a device reset and makes 1 second delay until device was stabilized.
TEMPLOG2_RETVAL templog2_set_mode | ( | templog2_t * | ctx, |
uint8_t | op_mode, | ||
uint8_t | alert_mode ) |
Mode Setting function.
ctx | Click object. |
op_mode | Operating mode setting. |
alert_mode | Alert mode setting. |
@description This function allows user to set operating and alert mode.
TEMPLOG2_RETVAL templog2_write_eeprom | ( | templog2_t * | ctx, |
uint8_t | eeprom_addr, | ||
uint16_t | data_in ) |
EEPROM Writing function.
ctx | Click object. |
eeprom_addr | Register address. |
data_in | Data to be written. |
@description This function writes data to EEPROM.
TEMPLOG2_RETVAL templog2_write_reg | ( | templog2_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | transfer_data ) |
Write Register function.
ctx | Click object. |
reg_addr | Register address. |
transfer_data | Data to be written. |
@description This function writes 16-bit data to the desired register.