irgrid2 2.0.0.0
irgrid2.h File Reference

This file contains API for IR Grid 2 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  irgrid2_params_t
 IR Grid 2 Click params definition. More...
 
struct  irgrid2_t
 IR Grid 2 Click context object. More...
 
struct  irgrid2_cfg_t
 IR Grid 2 Click configuration object. More...
 

Macros

#define IRGRID2_SET_DEV_ADDR   0x33
 IR Grid 2 device address setting.
 
#define IRGRID2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  irgrid2_return_value_t {
  IRGRID2_OK = 0 , IRGRID2_ERROR = -1 , IRGRID2_INIT_ERROR = 0xFF , IRGRID2_EEPROM_OK = 0x00 ,
  IRGRID2_EEPROM_ERROR = 0xF0 , IRGRID2_ADJ_PIXELS_ERROR = 0xF1 , IRGRID2_ADJ_PIXELS_OK = 0x00 , IRGRID2_BROKEN_PIX_ERROR = 0xF2 ,
  IRGRID2_OUTLIER_PIX_ERROR = 0xF3 , IRGRID2_2_PIX_ERROR = 0xF4
}
 IR Grid 2 Click return value data. More...
 

Functions

void irgrid2_cfg_setup (irgrid2_cfg_t *cfg)
 IR Grid 2 configuration object setup function.
 
err_t irgrid2_init (irgrid2_t *ctx, irgrid2_cfg_t *cfg)
 IR Grid 2 initialization function.
 
void irgrid2_default_cfg (irgrid2_t *ctx)
 IR Grid 2 default configuration function.
 
void irgrid2_generic_write (irgrid2_t *ctx, uint16_t reg, uint8_t *data_buf, uint16_t len)
 IR Grid 2 I2C writing function.
 
void irgrid2_generic_read (irgrid2_t *ctx, uint16_t reg, uint8_t *rx_buf, uint16_t rx_len)
 IR Grid 2 I2C reading function.
 
void irgrid2_read_eeprom (irgrid2_t *ctx, uint16_t *eeprom_data)
 Function for reading EEPROM.
 
uint8_t irgrid2_extract_parameters (irgrid2_t *ctx, uint16_t *eeprom_data)
 Parameters storage function.
 
void irgrid2_set_refresh_rate (irgrid2_t *ctx, uint8_t refresh_rate)
 Function for setting refresh rate.
 
uint16_t irgrid2_get_frame_data (irgrid2_t *ctx, uint16_t *frame_data)
 Function for getting frame data.
 
void irgrid2_set_resolution (irgrid2_t *ctx, uint8_t resolution)
 Function for setting resolution.
 
uint16_t irgrid2_get_current_res (irgrid2_t *ctx)
 Function for getting current resolution.
 
uint16_t irgrid2_get_refresh_rate (irgrid2_t *ctx)
 Function for getting current refresh Rate.
 
void irgrid2_set_interleaved_mode (irgrid2_t *ctx)
 Function for setting interleaved mode.
 
void irgrid2_set_chess_mode (irgrid2_t *ctx)
 Function for setting chess mode.
 
uint16_t irgrid2_get_current_mode (irgrid2_t *ctx)
 Function for getting current mode.
 
void irgrid2_get_pixel_temperature (irgrid2_t *ctx, float *temp_ambient, float *pixel_temp)
 Function for getting pixels temperature.
 
float irgrid2_get_temp_ambient (irgrid2_t *ctx, uint16_t *frame_data)
 Function for getting Ambient temperature.
 
uint16_t irgrid2_get_subpage_number (uint16_t *frame_data)
 Function for getting sub page number.
 
float irgrid2_get_vdd (irgrid2_t *ctx, uint16_t *frame_data)
 Function for getting Vdd.
 
void irgrid2_calculate_temp_obj (irgrid2_t *ctx, uint16_t *frame_data, float tr_data, float *px_matrix)
 Function for calculating temperature objects.
 
void irgrid2_get_image (irgrid2_t *ctx, uint16_t *frame_data, float *px_matrix)
 Function for getting Image.
 

Detailed Description

This file contains API for IR Grid 2 Click Driver.

Enumeration Type Documentation

◆ irgrid2_return_value_t

IR Grid 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
IRGRID2_OK 
IRGRID2_ERROR 
IRGRID2_INIT_ERROR 
IRGRID2_EEPROM_OK 
IRGRID2_EEPROM_ERROR 
IRGRID2_ADJ_PIXELS_ERROR 
IRGRID2_ADJ_PIXELS_OK 
IRGRID2_BROKEN_PIX_ERROR 
IRGRID2_OUTLIER_PIX_ERROR 
IRGRID2_2_PIX_ERROR