thermo15 2.0.0.0
thermo15.h File Reference

This file contains API for Thermo 15 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  thermo15_t
 Click ctx object definition. More...
 
struct  thermo15_cfg_t
 Click configuration structure definition. More...
 

Macros

#define THERMO15_MAP_MIKROBUS(cfg, mikrobus)
 
#define THERMO15_RETVAL   uint8_t
 
#define THERMO15_OK   0x00
 
#define THERMO15_INIT_ERROR   0xFF
 
#define THERMO15_DEVICE_SLAVE_ADDR_000   0x48
 
#define THERMO15_DEVICE_SLAVE_ADDR_001   0x49
 
#define THERMO15_DEVICE_SLAVE_ADDR_010   0x4A
 
#define THERMO15_DEVICE_SLAVE_ADDR_011   0x4B
 
#define THERMO15_DEVICE_SLAVE_ADDR_100   0x4C
 
#define THERMO15_DEVICE_SLAVE_ADDR_101   0x4D
 
#define THERMO15_DEVICE_SLAVE_ADDR_110   0x4E
 
#define THERMO15_DEVICE_SLAVE_ADDR_111   0x4F
 
#define THERMO15_REG_STORED_TEMPERATURE   0x00
 
#define THERMO15_REG_CONFIGURATION   0x01
 
#define THERMO15_REG_TEMPERATURE_HYSTERESIS   0x02
 
#define THERMO15_REG_TEMPERATURE_LIMIT   0x03
 
#define THERMO15_REG_ONE_SHOT   0x04
 
#define THERMO15_DEF_TEMP_HYSTERESIS   75
 
#define THERMO15_DEF_TEMP_LIMIT   80
 
#define THERMO15_REG_ONE_SHOT   0x04
 
#define THERMO15_CFG_WMODE_NORMAL   0x00
 
#define THERMO15_CFG_WMODE_ONE_SHOT   0x20
 
#define THERMO15_CFG_WMODE_SHUTDOWN   0x01
 
#define THERMO15_CFG_FAULT_QUEUE_1   0x00
 
#define THERMO15_CFG_FAULT_QUEUE_2   0x08
 
#define THERMO15_CFG_FAULT_QUEUE_4   0x10
 
#define THERMO15_CFG_FAULT_QUEUE_6   0x18
 
#define THERMO15_CFG_ALERT_ACTIVE_LOW   0x00
 
#define THERMO15_CFG_ALERT_ACTIVE_HIGH   0x04
 
#define THERMO15_CFG_TMODE_COMPARATOR   0x00
 
#define THERMO15_CFG_TMODE_INTERRUPT   0x02
 
#define THERMO15_TEMP_IN_CELSIUS   0x00
 
#define THERMO15_TEMP_IN_KELVIN   0x01
 
#define THERMO15_TEMP_IN_FAHRENHEIT   0x02
 

Functions

void thermo15_cfg_setup (thermo15_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO15_RETVAL thermo15_init (thermo15_t *ctx, thermo15_cfg_t *cfg)
 Initialization function.
 
void thermo15_default_cfg (thermo15_t *ctx)
 Click Default Configuration function.
 
void thermo15_generic_write (thermo15_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic write function.
 
void thermo15_generic_read (thermo15_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic read function.
 
float thermo15_get_temperature_data (thermo15_t *ctx, uint8_t temp_format)
 Ambient temperature data.
 
void thermo15_set_temp_register (thermo15_t *ctx, uint8_t temp_reg, float temp_data)
 Set temperature register.
 
float thermo15_get_temp_register (thermo15_t *ctx, uint8_t temp_reg)
 Get temperature register.
 
uint8_t thermo15_get_interrupt_state (thermo15_t *ctx)
 Interrupt state.
 

Detailed Description

This file contains API for Thermo 15 Click driver.