thermo13  2.0.0.0
Data Structures | Macros | Functions
thermo13.h File Reference

This file contains API for Thermo 13 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  thermo13_t
 Click ctx object definition. More...
 
struct  thermo13_cfg_t
 Click configuration structure definition. More...
 

Macros

#define THERMO13_MAP_MIKROBUS(cfg, mikrobus)
 
#define THERMO13_RETVAL   uint8_t
 
#define THERMO13_OK   0x00
 
#define THERMO13_INIT_ERROR   0xFF
 
#define THERMO13_DEVICE_SLAVE_ADDR_000   0x48
 
#define THERMO13_DEVICE_SLAVE_ADDR_001   0x49
 
#define THERMO13_DEVICE_SLAVE_ADDR_010   0x4A
 
#define THERMO13_DEVICE_SLAVE_ADDR_011   0x4B
 
#define THERMO13_DEVICE_SLAVE_ADDR_100   0x4C
 
#define THERMO13_DEVICE_SLAVE_ADDR_101   0x4D
 
#define THERMO13_DEVICE_SLAVE_ADDR_110   0x4E
 
#define THERMO13_DEVICE_SLAVE_ADDR_111   0x4F
 
#define THERMO13_REG_TEMPERATURE   0x00
 
#define THERMO13_REG_CONFIGURATION   0x01
 
#define THERMO13_REG_TEMPERATURE_LIMIT_LOW   0x02
 
#define THERMO13_REG_TEMPERATURE_LIMIT_HIGH   0x03
 
#define THERMO13_REG_SOFTWARE_RESET   0x04
 
#define THERMO13_TEMP_IN_CELSIUS   0x00
 
#define THERMO13_TEMP_IN_KELVIN   0x01
 
#define THERMO13_TEMP_IN_FAHRENHEIT   0x02
 
#define THERMO13_DEF_TEMP_LIMIT_LOW   75
 
#define THERMO13_DEF_TEMP_LIMIT_HIGH   80
 
#define THERMO13_CFG_CONTINUOUS_MEASUREMENT   0x0000
 
#define THERMO13_CFG_SINGLE_MEASUREMENT   0x8000
 
#define THERMO13_CFG_INTERRUPT_IS_NOT_ACTIVE   0x0000
 
#define THERMO13_CFG_INTERRUPT_IS_ACTIVE   0x4000
 
#define THERMO13_CFG_FAULT_QUEUE_1   0x0000
 
#define THERMO13_CFG_FAULT_QUEUE_2   0x0800
 
#define THERMO13_CFG_FAULT_QUEUE_4   0x1000
 
#define THERMO13_CFG_FAULT_QUEUE_6   0x1800
 
#define THERMO13_CFG_ALERT_ACTIVE_LOW   0x0000
 
#define THERMO13_CFG_ALERT_ACTIVE_HIGH   0x0400
 
#define THERMO13_CFG_NO_SHUTDOWN   0x0000
 
#define THERMO13_CFG_SHUTDOWN_ACTIVE   0x0100
 
#define THERMO13_CFG_WAIT_TIME_X16   0x0000
 
#define THERMO13_CFG_WAIT_TIME_X4   0x0001
 
#define THERMO13_CFG_WAIT_TIME_X1   0x0002
 
#define THERMO13_CFG_WAIT_TIME_X0p5   0x0003
 

Functions

void thermo13_cfg_setup (thermo13_cfg_t *cfg)
 Config Object Initialization function. More...
 
THERMO13_RETVAL thermo13_init (thermo13_t *ctx, thermo13_cfg_t *cfg)
 Initialization function. More...
 
void thermo13_default_cfg (thermo13_t *ctx)
 Click Default Configuration function. More...
 
void thermo13_generic_write (thermo13_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void thermo13_generic_read (thermo13_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
uint16_t thermo13_read_data (thermo13_t *ctx, uint8_t reg_addr)
 Functions for read data from registers. More...
 
void thermo13_configuration (thermo13_t *ctx, uint16_t cfg_data)
 Configuration register. More...
 
float thermo13_get_ambient_temperature_data (thermo13_t *ctx, uint8_t temp_in)
 Ambient temperature data. More...
 
void thermo13_set_temp_limit (thermo13_t *ctx, uint8_t temp_reg, float temp)
 Set temperature limit register. More...
 
float thermo13_get_temp_limit (thermo13_t *ctx, uint8_t temp_reg)
 Get temperature register. More...
 
uint8_t thermo13_get_interrupt_state (thermo13_t *ctx)
 Interrupt state. More...
 
void thermo13_software_reset (thermo13_t *ctx)
 Software reset. More...
 

Detailed Description

This file contains API for Thermo 13 Click driver.