templog5  2.0.0.0
Functions

Functions

void templog5_cfg_setup (templog5_cfg_t *cfg)
 Config Object Initialization function. More...
 
TEMPLOG5_RETVAL templog5_init (templog5_t *ctx, templog5_cfg_t *cfg)
 Initialization function. More...
 
void templog5_default_cfg (templog5_t *ctx)
 Click Default Configuration function. More...
 
void templog5_write_data (templog5_t *ctx, uint8_t reg, uint16_t data_in)
 Functions for write data to the TS register. More...
 
void templog5_write_eeprom (templog5_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_byte)
 Writes data to the EEPROM address ( maximum 16 bytes per 1 page ). More...
 
uint16_t templog5_read_data (templog5_t *ctx, uint8_t reg)
 Functions for read data from registers. More...
 
void templog5_read_eeprom (templog5_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_byte)
 Reads data from EEPROM. More...
 
float templog5_get_temperature (templog5_t *ctx)
 Temperature Data. More...
 
uint8_t templog5_get_temperature_status (templog5_t *ctx)
 Teperature Status. More...
 
uint8_t templog5_get_interrupt_status (templog5_t *ctx)
 EVENT Interrupt status. More...
 

Detailed Description

Function Documentation

◆ templog5_cfg_setup()

void templog5_cfg_setup ( templog5_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.

◆ templog5_default_cfg()

void templog5_default_cfg ( templog5_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for TempLog5 click.

Note
TEMPLOG5_REG_CONFIGURATION:
  -TEMPLOG5_CFG_DISABLE_HYSTERESIS
  -TEMPLOG5_CFG_TEMP_SENSOR_ENABLE
  -TEMPLOG5_CFG_CRITICAL_TRIP_ENABLE
  -TEMPLOG5_CFG_ALARM_TRIP_ENABLE
  -TEMPLOG5_CFG_EVENT_INT_PIN_ENABLE
  -TEMPLOG5_CFG_EVENT_OUT_ENABLE
  -TEMPLOG5_CFG_EVENT_OUT_ACTIVE_HIGH
  -TEMPLOG5_CFG_EVENT_MODE_COMPARATOR

◆ templog5_get_interrupt_status()

uint8_t templog5_get_interrupt_status ( templog5_t ctx)

EVENT Interrupt status.

Parameters
ctxClick object.
Returns
Interrupt status on the INT pin.

@description This function return interrupt status.

◆ templog5_get_temperature()

float templog5_get_temperature ( templog5_t ctx)

Temperature Data.

Parameters
ctxClick object.
Returns
Temperature data in C.

@description This function return temperature value.

◆ templog5_get_temperature_status()

uint8_t templog5_get_temperature_status ( templog5_t ctx)

Teperature Status.

Parameters
ctxClick object.
Returns
The first 4 bits in the temperature data register.

@description This function return temperature status.

◆ templog5_init()

TEMPLOG5_RETVAL templog5_init ( templog5_t ctx,
templog5_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ templog5_read_data()

uint16_t templog5_read_data ( templog5_t ctx,
uint8_t  reg 
)

Functions for read data from registers.

Parameters
ctxClick object.
regRegister address.
Returns
16-bit data that is reads from the TS register.

@description This function read from the TS register

◆ templog5_read_eeprom()

void templog5_read_eeprom ( templog5_t ctx,
uint8_t  start_addr,
uint8_t *  data_out,
uint8_t  n_byte 
)

Reads data from EEPROM.

Parameters
ctxClick object.
start_addrEeprom start address.
data_outBuffer to be filled with the data from eeprom.
n_byteNumber of bytes.

@description This function read data to the EEPROM address.

◆ templog5_write_data()

void templog5_write_data ( templog5_t ctx,
uint8_t  reg,
uint16_t  data_in 
)

Functions for write data to the TS register.

Parameters
ctxClick object.
regRegister Address.
data_inData to be written in register.

@description This function write data data to the TS register

◆ templog5_write_eeprom()

void templog5_write_eeprom ( templog5_t ctx,
uint8_t  start_addr,
uint8_t *  data_in,
uint8_t  n_byte 
)

Writes data to the EEPROM address ( maximum 16 bytes per 1 page ).

Writting starts on given address.

Parameters
ctxClick object.
start_addrStart address.
data_inPointer to data.
n_byteNumber of bytes for writting.

@description This function write data to the EEPROM address .