irthermo4 2.2.0
Loading...
Searching...
No Matches
irthermo4.h File Reference

This file contains API for IR Thermo 4 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  irthermo4_eeprom_t
 IR Thermo 4 Click EEPROM content object. More...
struct  irthermo4_t
 IR Thermo 4 Click context object. More...
struct  irthermo4_cfg_t
 IR Thermo 4 Click configuration object. More...

Macros

#define IRTHERMO4_REG_TP_OBJECT   0x01
 IR Thermo 4 registers list.
#define IRTHERMO4_REG_TP_AMBIENT   0x03
#define IRTHERMO4_REG_TP_OBJ_LP1   0x05
#define IRTHERMO4_REG_TP_OBJ_LP2   0x07
#define IRTHERMO4_REG_TP_AMB_LP3   0x0A
#define IRTHERMO4_REG_TP_OBJ_LP2_FROZEN   0x0C
#define IRTHERMO4_REG_TP_PRESENCE   0x0F
#define IRTHERMO4_REG_TP_MOTION   0x10
#define IRTHERMO4_REG_TP_AMB_SHOCK   0x11
#define IRTHERMO4_REG_INTERRUPT_STATUS   0x12
#define IRTHERMO4_REG_CHIP_STATUS   0x13
#define IRTHERMO4_REG_S_LP1_LP2   0x14
#define IRTHERMO4_REG_S_LP3   0x15
#define IRTHERMO4_REG_TP_PRESENCE_THOLD   0x16
#define IRTHERMO4_REG_TP_MOTION_THOLD   0x17
#define IRTHERMO4_REG_TP_AMB_SHOCK_THOLD   0x18
#define IRTHERMO4_REG_INTERRUPT_MASK   0x19
#define IRTHERMO4_REG_MULTIPLE   0x1A
#define IRTHERMO4_REG_TIMER_INTERRUPT   0x1B
#define IRTHERMO4_REG_TP_OT_THOLD   0x1C
#define IRTHERMO4_REG_EEPROM_CONTROL   0x1F
#define IRTHERMO4_REG_EEPROM_CONTENT   0x20
#define IRTHERMO4_REG_SLAVE_ADDRESS   0x3F
#define IRTHERMO4_ROOM_TEMPERATURE   25.0f
 IR Thermo 4 temperature calculation values.
#define IRTHERMO4_FUNCTION_EXPONENT   4.2f
#define IRTHERMO4_DIGITS_K_TO_M   100.0f
#define IRTHERMO4_TP_OFFSET_TO_U0   32768
#define IRTHERMO4_TP_OUT_TO_UOUT   2
#define IRTHERMO4_EEPROM_READ_ENABLE   0x80
 IR Thermo 4 EEPROM control command.
#define IRTHERMO4_EEPROM_READ_DISABLE   0x00
#define IRTHERMO4_CMD_RELOAD   0x04
 IR Thermo 4 refresh slave address command.
#define IRTHERMO4_DEVICE_ADDRESS_GEN_CALL   0x00
 IR Thermo 4 device address setting.
#define IRTHERMO4_DEVICE_ADDRESS_GND   0x0C
#define IRTHERMO4_DEVICE_ADDRESS_VCC   0x0E
#define IRTHERMO4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.

Enumerations

enum  irthermo4_return_value_t { IRTHERMO4_OK = 0 , IRTHERMO4_ERROR = -1 }
 IR Thermo 4 Click return value data. More...

Functions

void irthermo4_cfg_setup (irthermo4_cfg_t *cfg)
 IR Thermo 4 configuration object setup function.
err_t irthermo4_init (irthermo4_t *ctx, irthermo4_cfg_t *cfg)
 IR Thermo 4 initialization function.
err_t irthermo4_default_cfg (irthermo4_t *ctx)
 IR Thermo 4 default configuration function.
err_t irthermo4_write_regs (irthermo4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 IR Thermo 4 write regs function.
err_t irthermo4_read_regs (irthermo4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 IR Thermo 4 read regs function.
err_t irthermo4_write_reg (irthermo4_t *ctx, uint8_t reg, uint8_t data_in)
 IR Thermo 4 write reg function.
err_t irthermo4_read_reg (irthermo4_t *ctx, uint8_t reg, uint8_t *data_out)
 IR Thermo 4 read reg function.
err_t irthermo4_refresh_address (irthermo4_t *ctx)
 IR Thermo 4 refresh address function.
err_t irthermo4_read_eeprom (irthermo4_t *ctx)
 IR Thermo 4 read EEPROM function.
uint8_t irthermo4_get_int_pin (irthermo4_t *ctx)
 IR Thermo 4 get int pin function.
err_t irthermo4_read_ambient_temp (irthermo4_t *ctx, float *t_amb)
 IR Thermo 4 read ambient temp function.
err_t irthermo4_read_object_temp (irthermo4_t *ctx, float *t_obj, float t_amb)
 IR Thermo 4 read object temp function.

Detailed Description

This file contains API for IR Thermo 4 Click Driver.

Enumeration Type Documentation

◆ irthermo4_return_value_t

IR Thermo 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
IRTHERMO4_OK 
IRTHERMO4_ERROR