templog4 2.0.0.0
|
Functions | |
void | templog4_cfg_setup (templog4_cfg_t *cfg) |
Config Object Initialization function. | |
TEMPLOG4_RETVAL | templog4_init (templog4_t *ctx, templog4_cfg_t *cfg) |
Initialization function. | |
void | templog4_default_cfg (templog4_t *ctx) |
Click Default Configuration function. | |
void | templog4_generic_write (templog4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | templog4_generic_read (templog4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | templog4_write_reg (templog4_t *ctx, uint8_t reg, uint16_t input_data) |
Generic Write function. | |
uint8_t | templog4_read_reg (templog4_t *ctx, uint8_t reg, uint16_t *out_var) |
Generic Read function. | |
void | templog4_set_addr_ptr (templog4_t *ctx, uint8_t addr) |
Set Address Pointer function. | |
void | templog4_repeated_read (templog4_t *ctx, uint16_t *out_var) |
Repeated Read function. | |
uint8_t | templog4_get_temp (templog4_t *ctx, uint8_t temp_sel, float *temp_out) |
Get Temperature function. | |
void | templog4_set_temp (templog4_t *ctx, uint8_t temp_sel, float temp_in) |
Set Temperature function. | |
void templog4_cfg_setup | ( | templog4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void templog4_default_cfg | ( | templog4_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for TempLog4 click.
void templog4_generic_read | ( | templog4_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 templog4_generic_write | ( | templog4_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 templog4_get_temp | ( | templog4_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 This function gets a temperature value from the desired temperature register calculated to the Celsius degrees.
TEMPLOG4_RETVAL templog4_init | ( | templog4_t * | ctx, |
templog4_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 templog4_read_reg | ( | templog4_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | out_var ) |
Generic Read function.
ctx | Click object. |
reg | Register address. |
out_var | Memory where 16bit data be placed. |
@description This function reads a 16bit data from the desired register.
void templog4_repeated_read | ( | templog4_t * | ctx, |
uint16_t * | out_var ) |
Repeated Read function.
ctx | Click object. |
addr | Address on which the internal address pointer be set. |
@description This function sets the internal address pointer on the desired register address.
void templog4_set_addr_ptr | ( | templog4_t * | ctx, |
uint8_t | addr ) |
Set Address Pointer function.
ctx | Click object. |
addr | Address on which the internal address pointer be set. |
@description This function sets the internal address pointer on the desired register address.
void templog4_set_temp | ( | templog4_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 This function sets a desired temperature register on the desired value calculated to the Celsius degrees.
uint8_t templog4_write_reg | ( | templog4_t * | ctx, |
uint8_t | reg, | ||
uint16_t | input_data ) |
Generic Write function.
ctx | Click object. |
reg | Register address. |
input_data | 16bit data to be written |
@description This function writes a 16bit data to the desired register.