templog4  2.0.0.0
Functions

Functions

void templog4_cfg_setup (templog4_cfg_t *cfg)
 Config Object Initialization function. More...
 
TEMPLOG4_RETVAL templog4_init (templog4_t *ctx, templog4_cfg_t *cfg)
 Initialization function. More...
 
void templog4_default_cfg (templog4_t *ctx)
 Click Default Configuration function. More...
 
void templog4_generic_write (templog4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void templog4_generic_read (templog4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
uint8_t templog4_write_reg (templog4_t *ctx, uint8_t reg, uint16_t input_data)
 Generic Write function. More...
 
uint8_t templog4_read_reg (templog4_t *ctx, uint8_t reg, uint16_t *out_var)
 Generic Read function. More...
 
void templog4_set_addr_ptr (templog4_t *ctx, uint8_t addr)
 Set Address Pointer function. More...
 
void templog4_repeated_read (templog4_t *ctx, uint16_t *out_var)
 Repeated Read function. More...
 
uint8_t templog4_get_temp (templog4_t *ctx, uint8_t temp_sel, float *temp_out)
 Get Temperature function. More...
 
void templog4_set_temp (templog4_t *ctx, uint8_t temp_sel, float temp_in)
 Set Temperature function. More...
 

Detailed Description

Function Documentation

◆ templog4_cfg_setup()

void templog4_cfg_setup ( templog4_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ templog4_default_cfg()

void templog4_default_cfg ( templog4_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

This function executes default configuration for TempLog4 click.

◆ templog4_generic_read()

void templog4_generic_read ( templog4_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

This function reads data from the desired register.

◆ templog4_generic_write()

void templog4_generic_write ( templog4_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.

This function writes data to the desired register.

◆ templog4_get_temp()

uint8_t templog4_get_temp ( templog4_t ctx,
uint8_t  temp_sel,
float *  temp_out 
)

Get Temperature function.

Parameters
ctxClick object.
temp_selAddress of the desired temperature register.
temp_outReturns a temperature value calculated to the Celsius degrees.

This function gets a temperature value from the desired temperature register calculated to the Celsius degrees.

◆ templog4_init()

TEMPLOG4_RETVAL templog4_init ( templog4_t ctx,
templog4_cfg_t cfg 
)

Initialization function.

Parameters
templog4Click object.
cfgClick configuration structure.

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

◆ templog4_read_reg()

uint8_t templog4_read_reg ( templog4_t ctx,
uint8_t  reg,
uint16_t *  out_var 
)

Generic Read function.

Parameters
ctxClick object.
regRegister address.
out_varMemory where 16bit data be placed.

This function reads a 16bit data from the desired register.

◆ templog4_repeated_read()

void templog4_repeated_read ( templog4_t ctx,
uint16_t *  out_var 
)

Repeated Read function.

Parameters
ctxClick object.
addrAddress on which the internal address pointer be set.

This function sets the internal address pointer on the desired register address.

◆ templog4_set_addr_ptr()

void templog4_set_addr_ptr ( templog4_t ctx,
uint8_t  addr 
)

Set Address Pointer function.

Parameters
ctxClick object.
addrAddress on which the internal address pointer be set.

This function sets the internal address pointer on the desired register address.

◆ templog4_set_temp()

void templog4_set_temp ( templog4_t ctx,
uint8_t  temp_sel,
float  temp_in 
)

Set Temperature function.

Parameters
ctxClick object.
temp_selAddress of the desired temperature register.
temp_inTemperature value to be written calculated to the Celsius degrees.

This function sets a desired temperature register on the desired value calculated to the Celsius degrees.

◆ templog4_write_reg()

uint8_t templog4_write_reg ( templog4_t ctx,
uint8_t  reg,
uint16_t  input_data 
)

Generic Write function.

Parameters
ctxClick object.
regRegister address.
input_data16bit data to be written

This function writes a 16bit data to the desired register.