thermo17 2.0.0.0
thermo17.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  thermo17_t
 Click ctx object definition. More...
 
struct  thermo17_cfg_t
 Click configuration structure definition. More...
 

Macros

#define THERMO17_MAP_MIKROBUS(cfg, mikrobus)
 
#define THERMO17_SLAVE_ADDRESS   0x4C
 
#define THERMO17_REG_R_LOCAL_TEMP_HB   0x00
 
#define THERMO17_REG_R_REMOTE_TEMP_HB   0x01
 
#define THERMO17_REG_R_STATUS   0x02
 
#define THERMO17_REG_R_CFG   0x03
 
#define THERMO17_REG_R_CONVERSION_RATE   0x04
 
#define THERMO17_REG_R_LOCAL_TEMP_LIMIT_H   0x05
 
#define THERMO17_REG_R_LOCAL_TEMP_LIMIT_L   0x06
 
#define THERMO17_REG_R_REMOTE_TEMP_LIMIT_H_HB   0x07
 
#define THERMO17_REG_R_REMOTE_TEMP_LIMIT_L_HB   0x08
 
#define THERMO17_REG_R_REMOTE_TEMP_LB   0x10
 
#define THERMO17_REG_RW_REMOTE_TEMP_OFFSET_HB   0x11
 
#define THERMO17_REG_RW_REMOTE_TEMP_OFFSET_LB   0x12
 
#define THERMO17_REG_RW_REMOTE_TEMP_LIMIT_H_LB   0x13
 
#define THERMO17_REG_RW_REMOTE_TEMP_LIMIT_L_LB   0x14
 
#define THERMO17_REG_R_LOCAL_TEMP_LB   0x15
 
#define THERMO17_REG_RW_REMOTE_TEMP_THERM_LIMIT   0x19
 
#define THERMO17_REG_RW_LOCAL_TEMP_THERM_LIMIT   0x20
 
#define THERMO17_REG_RW_THERMO_HYSTERESIS   0x21
 
#define THERMO17_REG_RW_CONSECUTIVE_ALERT   0x22
 
#define THERMO17_REG_RW_M_FACTOR_CORRECTION   0x23
 
#define THERMO17_REG_RW_DIGITAL_FILTER_CTRL   0x24
 
#define THERMO17_REG_R_ID   0xFE
 
#define THERMO17_REG_W_CFG   0x09
 
#define THERMO17_REG_W_CONVERSION_RATE   0x0A
 
#define THERMO17_REG_W_LOCAL_TEMP_LIMIT_H   0x0B
 
#define THERMO17_REG_W_LOCAL_TEMP_LIMIT_L   0x0C
 
#define THERMO17_REG_W_REMOTE_TEMP_LIMIT_H_HB   0x0D
 
#define THERMO17_REG_W_REMOTE_TEMP_LIMIT_L_HB   0x0E
 
#define THERMO17_REG_W_ONE_SHOT   0x0F
 
#define THERMO17_TEMPERATURE_LOCAL   0xAA
 
#define THERMO17_TEMPERATURE_REMOTE   0xBB
 
#define THERMO17_ERROR   0x00
 
#define THERMO17_DEV_ID   0x55
 
#define THERMO17_STATUS_BUSY   0x80
 
#define THERMO17_STATUS_LOCAL_HIGH_TEMP   0x40
 
#define THERMO17_STATUS_LOCAL_LOW_TEMP   0x20
 
#define THERMO17_STATUS_REMOTE_HIGH_TEMP   0x10
 
#define THERMO17_STATUS_REMOTE_LOW_TEMP   0x08
 
#define THERMO17_STATUS_REMOTE_SENS_OPEN_CIRCUIT   0x04
 
#define THERMO17_STATUS_REMOTE_THERM_TIPPED   0x02
 
#define THERMO17_STATUS_LOCAL_THERM_TIPPED   0x01
 
#define THERMO17_RETVAL   uint8_t
 
#define THERMO17_OK   0x00
 
#define THERMO17_INIT_ERROR   0xFF
 

Functions

void thermo17_cfg_setup (thermo17_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO17_RETVAL thermo17_init (thermo17_t *ctx, thermo17_cfg_t *cfg)
 Initialization function.
 
void thermo17_generic_write (thermo17_t *ctx, uint8_t reg_adr, uint8_t write_data)
 Generic write function.
 
uint8_t thermo17_generic_read (thermo17_t *ctx, uint8_t reg_adr)
 Generic read function.
 
float thermo17_read_temp (thermo17_t *ctx, uint8_t temp_macro)
 Function for reading temperature.
 
uint8_t thermo17_get_int_status (thermo17_t *ctx)
 Checks status of int pin.
 
uint8_t thermo17_get_an_status (thermo17_t *ctx)
 Checks status of an pin.
 

Detailed Description

This file contains API for Thermo 17 Click driver.