templog6 2.0.0.0
templog6.h File Reference

This file contains API for Temp Log 6 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  templog6_t
 Click ctx object definition. More...
 
struct  templog6_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPLOG6_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPLOG6_RETVAL   uint8_t
 
#define TEMPLOG6_OK   0x00
 
#define TEMPLOG6_INIT_ERROR   0xFF
 
#define TEMPLOG6_REG_LOCAL_TEMPERATURE   0x00
 
#define TEMPLOG6_REG_REMOTE_TEMPERATURE   0x01
 
#define TEMPLOG6_REG_STATUS   0x02
 
#define TEMPLOG6_REG_RD_CONFIGURATION   0x03
 
#define TEMPLOG6_REG_RD_LOCAL_HIGH_LIMIT   0x05
 
#define TEMPLOG6_REG_RD_REMOTE_HIGH_LIMIT   0x07
 
#define TEMPLOG6_REG_WR_CONFIGURATION   0x09
 
#define TEMPLOG6_REG_WR_LOCAL_HIGH_LIMIT   0x0B
 
#define TEMPLOG6_REG_WR_REMOTE_HIGH_LIMIT   0x0D
 
#define TEMPLOG6_REG_SINGLE_SHOT   0x0F
 
#define TEMPLOG6_REG_REMOTE_EXTENDED_TEMP   0x10
 
#define TEMPLOG6_REG_INTERNAL_EXTENDED_TEMP   0x11
 
#define TEMPLOG6_REG_MANUFACTURER_ID   0xFE
 
#define TEMPLOG6_CFG_ALERT_OFF   0x80
 
#define TEMPLOG6_CFG_ALERT_ON   0x00
 
#define TEMPLOG6_CFG_STANDBY_MODE   0x40
 
#define TEMPLOG6_CFG_NORMAL_MODE   0x00
 
#define TEMPLOG6_CFG_LOCAL_MEASUREMENT_OFF   0x20
 
#define TEMPLOG6_CFG_LOCAL_MEASUREMENT_ON   0x00
 
#define TEMPLOG6_CFG_ALERT_1_FAULT   0x00
 
#define TEMPLOG6_CFG_ALERT_2_FAULT   0x10
 
#define TEMPLOG6_DEVICE_SLAVE_ADDRESS   0x4A
 
#define TEMPLOG6_MANUFACTURER_ID   0x4D
 

Functions

void templog6_cfg_setup (templog6_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPLOG6_RETVAL templog6_init (templog6_t *ctx, templog6_cfg_t *cfg)
 Initialization function.
 
void templog6_default_cfg (templog6_t *ctx)
 Click Default Configuration function.
 
void templog6_generic_write (templog6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void templog6_generic_read (templog6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void templog6_write_byte (templog6_t *ctx, uint8_t reg, uint8_t data_buf)
 Write one byte function.
 
uint8_t templog6_read_byte (templog6_t *ctx, uint8_t reg)
 Read one byte function.
 
uint8_t templog6_get_interrupt (templog6_t *ctx)
 Gets interrupt.
 

Detailed Description

This file contains API for Temp Log 6 Click driver.