templog5 2.0.0.0
templog5.h File Reference

This file contains API for Temp-Log 5 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  templog5_t
 Click ctx object definition. More...
 
struct  templog5_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPLOG5_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPLOG5_RETVAL   uint8_t
 
#define TEMPLOG5_OK   0x00
 
#define TEMPLOG5_INIT_ERROR   0xFF
 
#define TEMPLOG5_REG_CAPABILITY   0x00
 
#define TEMPLOG5_REG_CONFIGURATION   0x01
 
#define TEMPLOG5_REG_HIGH_LIMIT   0x02
 
#define TEMPLOG5_REG_LOW_LIMIT   0x03
 
#define TEMPLOG5_REG_CRITICAL_LIMIT   0x04
 
#define TEMPLOG5_REG_TEMPERATURE   0x05
 
#define TEMPLOG5_REG_MANUFACTURER_ID   0x06
 
#define TEMPLOG5_REG_DEVICE_ID   0x07
 
#define TEMPLOG5_CFG_DISABLE_HYSTERESIS   0x0000
 
#define TEMPLOG5_CFG_HYSTERESIS_TO_1p5C   0x0200
 
#define TEMPLOG5_CFG_HYSTERESIS_TO_3C   0x0400
 
#define TEMPLOG5_CFG_HYSTERESIS_TO_6C   0x0600
 
#define TEMPLOG5_CFG_TEMP_SENSOR_ENABLE   0x0000
 
#define TEMPLOG5_CFG_TEMP_SENSOR_DISABLE   0x0100
 
#define TEMPLOG5_CFG_CRITICAL_TRIP_ENABLE   0x0000
 
#define TEMPLOG5_CFG_CRITICAL_TRIP_DISABLE   0x0080
 
#define TEMPLOG5_CFG_ALARM_TRIP_ENABLE   0x0000
 
#define TEMPLOG5_CFG_ALARM_TRIP_DISABLE   0x0040
 
#define TEMPLOG5_CFG_EVENT_INT_PIN_ENABLE   0x0010
 
#define TEMPLOG5_CFG_EVENT_INT_PIN_DISABLE   0x0000
 
#define TEMPLOG5_CFG_EVENT_OUT_ENABLE   0x0008
 
#define TEMPLOG5_CFG_EVENT_OUT_DISABLE   0x0000
 
#define TEMPLOG5_CFG_EVENT_OUT_ACTIVE_LOW   0x0000
 
#define TEMPLOG5_CFG_EVENT_OUT_ACTIVE_HIGH   0x0002
 
#define TEMPLOG5_CFG_EVENT_MODE_COMPARATOR   0x0000
 
#define TEMPLOG5_CFG_EVENT_MODE_INTERRUPT   0x0001
 
#define TEMPLOG5_CAP_EVSD_FROZEN   0x0000
 
#define TEMPLOG5_CAP_EVSD_CLEARD   0x0080
 
#define TEMPLOG5_CAP_TMOUT_10ms_60ms   0x0000
 
#define TEMPLOG5_CAP_TMOUT_25ms_35ms   0x0040
 
#define TEMPLOG5_CAP_RSWP_NOT_EXPLICITLY_STATED   0x0000
 
#define TEMPLOG5_CAP_RSWP_EXPLICITLY_STATED   0x0020
 
#define TEMPLOG5_CAP_TEMP_RES_9bit   0x0000
 
#define TEMPLOG5_CAP_TEMP_RES_10bit   0x0008
 
#define TEMPLOG5_CAP_TEMP_RES_11bit   0x0010
 
#define TEMPLOG5_CAP_TEMP_RES_12bit   0x0018
 
#define TEMPLOG5_CAP_POS_TEMP_ONLY   0x0000
 
#define TEMPLOG5_CAP_POS_AND_NEG_TEMP   0x0004
 
#define TEMPLOG5_CAP_ACC_CLASS_C   0x0000
 
#define TEMPLOG5_CAP_ACC_CLASS_B   0x0002
 
#define TEMPLOG5_CAP_EV_CRITICAL_TEMP_ONLY   0x0000
 
#define TEMPLOG5_CAP_EV_ALARM_AND_CRITICAL_TEMP   0x0001
 
#define TEMPLOG5_TS_SLAVE_ADDR_000   0x18
 
#define TEMPLOG5_TS_SLAVE_ADDR_001   0x19
 
#define TEMPLOG5_TS_SLAVE_ADDR_010   0x1A
 
#define TEMPLOG5_TS_SLAVE_ADDR_011   0x1B
 
#define TEMPLOG5_TS_SLAVE_ADDR_100   0x1C
 
#define TEMPLOG5_TS_SLAVE_ADDR_101   0x1D
 
#define TEMPLOG5_TS_SLAVE_ADDR_110   0x1E
 
#define TEMPLOG5_TS_SLAVE_ADDR_111   0x1F
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_000   0x50
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_001   0x51
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_010   0x52
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_011   0x53
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_100   0x54
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_101   0x55
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_110   0x56
 
#define TEMPLOG5_EEPROM_SLAVE_ADDR_111   0x57
 
#define TEMPLOG5_MANUFACTURER_ID   0x1B09
 
#define TEMPLOG5_DEVICE_ID_REV_B   0x0813
 
#define TEMPLOG5_DEVICE_ID_REV_C   0x0A00
 

Functions

void templog5_cfg_setup (templog5_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPLOG5_RETVAL templog5_init (templog5_t *ctx, templog5_cfg_t *cfg)
 Initialization function.
 
void templog5_default_cfg (templog5_t *ctx)
 Click Default Configuration function.
 
void templog5_write_data (templog5_t *ctx, uint8_t reg, uint16_t data_in)
 Functions for write data to the TS register.
 
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 ).
 
uint16_t templog5_read_data (templog5_t *ctx, uint8_t reg)
 Functions for read data from registers.
 
void templog5_read_eeprom (templog5_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_byte)
 Reads data from EEPROM.
 
float templog5_get_temperature (templog5_t *ctx)
 Temperature Data.
 
uint8_t templog5_get_temperature_status (templog5_t *ctx)
 Teperature Status.
 
uint8_t templog5_get_interrupt_status (templog5_t *ctx)
 EVENT Interrupt status.
 

Detailed Description

This file contains API for Temp-Log 5 Click driver.