templog 2.0.0.0
Public function

Functions

void templog_cfg_setup (templog_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPLOG_RETVAL templog_init (templog_t *ctx, templog_cfg_t *cfg)
 Initialization function.
 
void templog_default_cfg (templog_t *ctx)
 Click Default Configuration function.
 
void templog_generic_write (templog_t *ctx, uint8_t reg, uint16_t transfer_data, uint8_t len)
 Generic write function.
 
uint16_t templog_generic_read (templog_t *ctx, uint8_t reg)
 Generic read function.
 
uint16_t temp_log_read_temp_dec (templog_t *ctx, uint16_t resolution)
 Temp read function.
 
float temp_log_convert_to_celsius (uint16_t temperature_data)
 Convert function.
 
uint8_t temp_log_get_alert (templog_t *ctx)
 Alert function.
 

Detailed Description

Function Documentation

◆ temp_log_convert_to_celsius()

float temp_log_convert_to_celsius ( uint16_t temperature_data)

Convert function.

Parameters
temperature_dataData to be converted.
Returns
Converted value.

@description This function converts temperature data to celsius value.

◆ temp_log_get_alert()

uint8_t temp_log_get_alert ( templog_t * ctx)

Alert function.

Parameters
ctxClick object.
Returns
Value describing if temp is alarming.

@description This function alerts user if temperature limit is alarming.

◆ temp_log_read_temp_dec()

uint16_t temp_log_read_temp_dec ( templog_t * ctx,
uint16_t resolution )

Temp read function.

Parameters
ctxClick object.
resolutionResolution.
Returns
Read value.

@description This function reads decimal value of temp.

◆ templog_cfg_setup()

void templog_cfg_setup ( templog_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ templog_default_cfg()

void templog_default_cfg ( templog_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Temp&Log click.

◆ templog_generic_read()

uint16_t templog_generic_read ( templog_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
regRegister address.
Returns
Read value.

@description This function reads data from the desired register.

◆ templog_generic_write()

void templog_generic_write ( templog_t * ctx,
uint8_t reg,
uint16_t transfer_data,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
transfer_dataData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ templog_init()

TEMPLOG_RETVAL templog_init ( templog_t * ctx,
templog_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
Macro describing if init was successful

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