irgrid4  2.1.0.0
Data Structures | Macros | Enumerations | Functions
irgrid4.h File Reference

This file contains API for IR Grid 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  irgrid4_params_t
 IR Grid 4 Click parameters object. More...
 
struct  irgrid4_t
 IR Grid 4 Click context object. More...
 
struct  irgrid4_cfg_t
 IR Grid 4 Click configuration object. More...
 

Macros

#define IRGRID4_ADDR_RAM_START   0x0400
 IR Grid 4 memory map. More...
 
#define IRGRID4_ADDR_RAM_END   0x05BF
 
#define IRGRID4_ADDR_EEPROM_START   0x2400
 
#define IRGRID4_ADDR_EEPROM_END   0x273F
 
#define IRGRID4_ADDR_REG_STATUS   0x8000
 
#define IRGRID4_ADDR_REG_CONTROL   0x800D
 
#define IRGRID4_ADDR_REG_I2C_CONFIG   0x800F
 
#define IRGRID4_STATUS_SUBPAGE   0x0001
 IR Grid 4 status register setting. More...
 
#define IRGRID4_STATUS_DATA_READY   0x0008
 
#define IRGRID4_STATUS_OVERWRITE_EN   0x0010
 
#define IRGRID4_CONTROL_SUBPAGE_EN   0x0001
 IR Grid 4 control register setting. More...
 
#define IRGRID4_CONTROL_DATA_HOLD_EN   0x0004
 
#define IRGRID4_CONTROL_SUBPAGE_REP_EN   0x0008
 
#define IRGRID4_CONTROL_SUBPAGE_1_SEL   0x0010
 
#define IRGRID4_CONTROL_REFRESH_RATE_0_5_HZ   0x0000
 
#define IRGRID4_CONTROL_REFRESH_RATE_1_HZ   0x0080
 
#define IRGRID4_CONTROL_REFRESH_RATE_2_HZ   0x0100
 
#define IRGRID4_CONTROL_REFRESH_RATE_4_HZ   0x0180
 
#define IRGRID4_CONTROL_REFRESH_RATE_8_HZ   0x0200
 
#define IRGRID4_CONTROL_REFRESH_RATE_16_HZ   0x0280
 
#define IRGRID4_CONTROL_REFRESH_RATE_32_HZ   0x0300
 
#define IRGRID4_CONTROL_REFRESH_RATE_64_HZ   0x0380
 
#define IRGRID4_CONTROL_REFRESH_RATE_MASK   0x0380
 
#define IRGRID4_CONTROL_RESOLUTION_16_BIT   0x0000
 
#define IRGRID4_CONTROL_RESOLUTION_17_BIT   0x0400
 
#define IRGRID4_CONTROL_RESOLUTION_18_BIT   0x0800
 
#define IRGRID4_CONTROL_RESOLUTION_19_BIT   0x0C00
 
#define IRGRID4_CONTROL_RESOLUTION_MASK   0x0C00
 
#define IRGRID4_CONTROL_PATTERN_CHESS   0x1000
 
#define IRGRID4_RESOLUTION_16_BIT   0
 IR Grid 4 ADC resolution setting. More...
 
#define IRGRID4_RESOLUTION_17_BIT   1
 
#define IRGRID4_RESOLUTION_18_BIT   2
 
#define IRGRID4_RESOLUTION_19_BIT   3
 
#define IRGRID4_REFRESH_RATE_0_5_HZ   0
 IR Grid 4 IR refresh rate setting. More...
 
#define IRGRID4_REFRESH_RATE_1_HZ   1
 
#define IRGRID4_REFRESH_RATE_2_HZ   2
 
#define IRGRID4_REFRESH_RATE_4_HZ   3
 
#define IRGRID4_REFRESH_RATE_8_HZ   4
 
#define IRGRID4_REFRESH_RATE_16_HZ   5
 
#define IRGRID4_REFRESH_RATE_32_HZ   6
 
#define IRGRID4_REFRESH_RATE_64_HZ   7
 
#define IRGRID4_SCALE_ALPHA   0.000001
 IR Grid 4 object temperature calculation setting. More...
 
#define IRGRID4_EMISSIVITY   0.95
 
#define IRGRID4_TA_SHIFT   5
 
#define IRGRID4_ABS_ZERO_K   273.15
 
#define IRGRID4_DEVICE_ADDRESS   0x33
 IR Grid 4 device address setting. More...
 
#define IRGRID4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  irgrid4_return_value_t { IRGRID4_OK = 0, IRGRID4_ERROR = -1 }
 IR Grid 4 Click return value data. More...
 

Functions

void irgrid4_cfg_setup (irgrid4_cfg_t *cfg)
 IR Grid 4 configuration object setup function. More...
 
err_t irgrid4_init (irgrid4_t *ctx, irgrid4_cfg_t *cfg)
 IR Grid 4 initialization function. More...
 
err_t irgrid4_default_cfg (irgrid4_t *ctx)
 IR Grid 4 default configuration function. More...
 
err_t irgrid4_write_data (irgrid4_t *ctx, uint16_t addr, uint16_t data_in)
 IR Grid 4 write data function. More...
 
err_t irgrid4_read_data (irgrid4_t *ctx, uint16_t addr, uint16_t *data_out, uint8_t len)
 IR Grid 4 read data function. More...
 
err_t irgrid4_general_reset (irgrid4_t *ctx)
 IR Grid 4 general reset function. More...
 
void irgrid4_enable_led1 (irgrid4_t *ctx)
 IR Grid 4 enable LED1 function. More...
 
void irgrid4_disable_led1 (irgrid4_t *ctx)
 IR Grid 4 disable LED1 function. More...
 
void irgrid4_enable_led2 (irgrid4_t *ctx)
 IR Grid 4 enable LED2 function. More...
 
void irgrid4_disable_led2 (irgrid4_t *ctx)
 IR Grid 4 disable LED2 function. More...
 
err_t irgrid4_dump_eeprom (irgrid4_t *ctx)
 IR Grid 4 dump EEPROM function. More...
 
err_t irgrid4_sync_frame (irgrid4_t *ctx)
 IR Grid 4 sync frame function. More...
 
err_t irgrid4_trigger_measurement (irgrid4_t *ctx)
 IR Grid 4 trigger measurement function. More...
 
err_t irgrid4_get_frame_data (irgrid4_t *ctx, uint16_t *frame_data)
 IR Grid 4 get frame data function. More...
 
err_t irgrid4_get_parameters (irgrid4_t *ctx)
 IR Grid 4 get parameters function. More...
 
float irgrid4_get_vdd (irgrid4_t *ctx, uint16_t *frame_data)
 IR Grid 4 get VDD function. More...
 
float irgrid4_get_ta (irgrid4_t *ctx, uint16_t *frame_data)
 IR Grid 4 get TA function. More...
 
void irgrid4_get_to (irgrid4_t *ctx, uint16_t *frame_data, float tr_val, float *result)
 IR Grid 4 get TO function. More...
 
err_t irgrid4_set_resolution (irgrid4_t *ctx, uint8_t resolution)
 IR Grid 4 set resolution function. More...
 
err_t irgrid4_get_resolution (irgrid4_t *ctx, uint8_t *resolution)
 IR Grid 4 get resolution function. More...
 
err_t irgrid4_set_refresh_rate (irgrid4_t *ctx, uint8_t refresh_rate)
 IR Grid 4 set refresh rate function. More...
 
err_t irgrid4_get_refresh_rate (irgrid4_t *ctx, uint8_t *refresh_rate)
 IR Grid 4 get refresh rate function. More...
 
err_t irgrid4_get_measurement (irgrid4_t *ctx, float *t_amb, float *t_obj)
 IR Grid 4 get measurement function. More...
 

Detailed Description

This file contains API for IR Grid 4 Click Driver.

Enumeration Type Documentation

◆ irgrid4_return_value_t

IR Grid 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
IRGRID4_OK 
IRGRID4_ERROR