irthermo3 2.0.0.0
irthermo3.h File Reference

This file contains API for IrThermo 3 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  irthermo3_cal_coef_t
 Calculation coefficients. More...
 
struct  irthermo3_t
 Click ctx object definition. More...
 
struct  irthermo3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define IRTHERMO3_MAP_MIKROBUS(cfg, mikrobus)
 
#define IRTHERMO3_OK   0x00
 
#define IRTHERMO3_ERROR   0xFF
 
#define IRTHERMO3_DEV_ADR_GND   0x3A
 
#define IRTHERMO3_DEV_ADR_VCC   0x3B
 
#define IRTHERMO3_EEPROM_VERSION   0x240B
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_R_LSW   0x240C
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_R_MSW   0x240D
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_G_LSW   0x240E
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_G_MSW   0x240F
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_T_LSW   0x2410
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_T_MSW   0x2411
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_O_LSW   0x2412
 
#define IRTHERMO3_EEPROM_CAL_CONST_P_O_MSW   0x2413
 
#define IRTHERMO3_EEPROM_CAL_CONST_AA_LSW   0x2414
 
#define IRTHERMO3_EEPROM_CAL_CONST_AA_MSW   0x2415
 
#define IRTHERMO3_EEPROM_CAL_CONST_AB_LSW   0x2416
 
#define IRTHERMO3_EEPROM_CAL_CONST_AB_MSW   0x2417
 
#define IRTHERMO3_EEPROM_CAL_CONST_BA_LSW   0x2418
 
#define IRTHERMO3_EEPROM_CAL_CONST_BA_MSW   0x2419
 
#define IRTHERMO3_EEPROM_CAL_CONST_BB_LSW   0x241A
 
#define IRTHERMO3_EEPROM_CAL_CONST_BB_MSW   0x241B
 
#define IRTHERMO3_EEPROM_CAL_CONST_CA_LSW   0x241C
 
#define IRTHERMO3_EEPROM_CAL_CONST_CA_MSW   0x241D
 
#define IRTHERMO3_EEPROM_CAL_CONST_CB_LSW   0x241E
 
#define IRTHERMO3_EEPROM_CAL_CONST_CB_MSW   0x241F
 
#define IRTHERMO3_EEPROM_CAL_CONST_DA_LSW   0x2420
 
#define IRTHERMO3_EEPROM_CAL_CONST_DA_MSW   0x2421
 
#define IRTHERMO3_EEPROM_CAL_CONST_DB_LSW   0x2422
 
#define IRTHERMO3_EEPROM_CAL_CONST_DB_MSW   0x2423
 
#define IRTHERMO3_EEPROM_CAL_CONST_EA_LSW   0x2424
 
#define IRTHERMO3_EEPROM_CAL_CONST_EA_MSW   0x2425
 
#define IRTHERMO3_EEPROM_CAL_CONST_EB_LSW   0x2426
 
#define IRTHERMO3_EEPROM_CAL_CONST_EB_MSW   0x2427
 
#define IRTHERMO3_EEPROM_CAL_CONST_FA_LSW   0x2428
 
#define IRTHERMO3_EEPROM_CAL_CONST_FA_MSW   0x2429
 
#define IRTHERMO3_EEPROM_CAL_CONST_FB_LSW   0x242A
 
#define IRTHERMO3_EEPROM_CAL_CONST_FB_MSW   0x242B
 
#define IRTHERMO3_EEPROM_CAL_CONST_GA_LSW   0x242C
 
#define IRTHERMO3_EEPROM_CAL_CONST_GA_MSW   0x242D
 
#define IRTHERMO3_EEPROM_CAL_CONST_GB   0x242E
 
#define IRTHERMO3_EEPROM_CAL_CONST_KA   0x242E
 
#define IRTHERMO3_EEPROM_CAL_CONST_KB   0x242E
 
#define IRTHERMO3_EEPROM_CAL_CONST_HA_COSTUMER   0x2481
 
#define IRTHERMO3_EEPROM_CAL_CONST_HB_COSTUMER   0x2482
 
#define IRTHERMO3_EEPROM_CTRL_REG   0x24D4
 
#define IRTHERMO3_EEPROM_I2C_ADDRESS   0x24D5
 
#define IRTHERMO3_REG_I2C_ADDRESS   0x3000
 
#define IRTHERMO3_REG_CONTROL   0x3001
 
#define IRTHERMO3_REG_RESET   0x3005
 
#define IRTHERMO3_REG_STATUS   0x3FFF
 
#define IRTHERMO3_RAW_DATA_1   0x4000
 
#define IRTHERMO3_RAW_DATA_2   0x4001
 
#define IRTHERMO3_RAW_DATA_3   0x4002
 
#define IRTHERMO3_RAW_DATA_4   0x4003
 
#define IRTHERMO3_RAW_DATA_5   0x4004
 
#define IRTHERMO3_RAW_DATA_6   0x4005
 
#define IRTHERMO3_RAW_DATA_7   0x4006
 
#define IRTHERMO3_RAW_DATA_8   0x4007
 
#define IRTHERMO3_RAW_DATA_9   0x4008
 
#define IRTHERMO3_MODE_SLEEP   0x02
 
#define IRTHERMO3_MODE_STEPIN   0x04
 
#define IRTHERMO3_MODE_CONTINOUS   0x06
 

Functions

void irthermo3_cfg_setup (irthermo3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t irthermo3_init (irthermo3_t *ctx, irthermo3_cfg_t *cfg)
 Initialization function.
 
void irthermo3_generic_write (irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void irthermo3_generic_read (irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void irthermo3_write_u16 (irthermo3_t *ctx, uint16_t reg, uint16_t wr_data)
 Write u16 data function.
 
int16_t irthermo3_read_i16 (irthermo3_t *ctx, uint16_t reg)
 Read i16 dat function.
 
int32_t irthermo3_read_i32 (irthermo3_t *ctx, uint16_t reg)
 Read i32 dat function.
 
void irthermo3_set_mode (irthermo3_t *ctx, uint8_t mode)
 Set device mode function.
 
void irthermo3_cal (irthermo3_t *ctx)
 Calibration function.
 
float irthermo3_get_ambient_temp (irthermo3_t *ctx)
 Read Ambient Temperature function.
 
float irthermo3_get_object_temp (irthermo3_t *ctx)
 Read Object Temperature function.
 

Detailed Description

This file contains API for IrThermo 3 Click driver.