irgrid2 2.0.0.0
IR Grid 2 Click Driver

API for configuring and manipulating IR Grid 2 Click driver. More...

Topics

 IR Grid 2 Registers List
 List of registers of IR Grid 2 Click driver.
 
 IR Grid 2 Registers Settings
 Settings for registers of IR Grid 2 Click driver.
 
 IR Grid 2 MikroBUS Map
 MikroBUS pin mapping of IR Grid 2 Click driver.
 

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

API for configuring and manipulating IR Grid 2 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ irgrid2_calculate_temp_obj()

void irgrid2_calculate_temp_obj ( irgrid2_t * ctx,
uint16_t * frame_data,
float tr_data,
float * px_matrix )

Function for calculating temperature objects.

This function is used for calculating temperature objects.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]frame_data: Frame Data
[in]tr_data: Real temperature
[out]px_matrix: Buffer in which the result of the calculation will be stored
Returns
Nothing.

◆ irgrid2_cfg_setup()

void irgrid2_cfg_setup ( irgrid2_cfg_t * cfg)

IR Grid 2 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See irgrid2_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ irgrid2_default_cfg()

void irgrid2_default_cfg ( irgrid2_t * ctx)

IR Grid 2 default configuration function.

This function executes a default configuration of IR Grid 2 click board.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
Returns
Nothing.

See #err_t definition for detailed explanation.

Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ irgrid2_extract_parameters()

uint8_t irgrid2_extract_parameters ( irgrid2_t * ctx,
uint16_t * eeprom_data )

Parameters storage function.

This function stpores data from the EEPROM.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[out]eeprom_data: EEPROM buffer.
Returns
Nothing.

◆ irgrid2_generic_read()

void irgrid2_generic_read ( irgrid2_t * ctx,
uint16_t reg,
uint8_t * rx_buf,
uint16_t rx_len )

IR Grid 2 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
Nothing.

See #err_t definition for detailed explanation.

Note
None.

◆ irgrid2_generic_write()

void irgrid2_generic_write ( irgrid2_t * ctx,
uint16_t reg,
uint8_t * data_buf,
uint16_t len )

IR Grid 2 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
Nothing.

See #err_t definition for detailed explanation.

Note
None.

◆ irgrid2_get_current_mode()

uint16_t irgrid2_get_current_mode ( irgrid2_t * ctx)

Function for getting current mode.

This function is used for getting current mode.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
Returns
Current mode.

◆ irgrid2_get_current_res()

uint16_t irgrid2_get_current_res ( irgrid2_t * ctx)

Function for getting current resolution.

This function is used for getting current resolution.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
Returns
current resolution

◆ irgrid2_get_frame_data()

uint16_t irgrid2_get_frame_data ( irgrid2_t * ctx,
uint16_t * frame_data )

Function for getting frame data.

This function is used for getting frame data.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[out]frame_data: Buffer in which the data will be stored
Returns
Nothing.

◆ irgrid2_get_image()

void irgrid2_get_image ( irgrid2_t * ctx,
uint16_t * frame_data,
float * px_matrix )

Function for getting Image.

This function is used for getting Image.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]frame_data: Frame Data
[out]px_matrix: Buffer in which the result of the calculation will be stored
Returns
Nothing.

◆ irgrid2_get_pixel_temperature()

void irgrid2_get_pixel_temperature ( irgrid2_t * ctx,
float * temp_ambient,
float * pixel_temp )

Function for getting pixels temperature.

This function is used for getting pixels temperature.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]temp_ambient: Ambient temperature data.
[out]pixel_temp: Output matrix pixels.
Returns
Nothing.

◆ irgrid2_get_refresh_rate()

uint16_t irgrid2_get_refresh_rate ( irgrid2_t * ctx)

Function for getting current refresh Rate.

This function is used for getting current refresh Rate.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
Returns
current refresh Rate

◆ irgrid2_get_subpage_number()

uint16_t irgrid2_get_subpage_number ( uint16_t * frame_data)

Function for getting sub page number.

This function is used for getting sub page number.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]frame_data: Frame Data.
Returns
Sub page number.

◆ irgrid2_get_temp_ambient()

float irgrid2_get_temp_ambient ( irgrid2_t * ctx,
uint16_t * frame_data )

Function for getting Ambient temperature.

This function is used for getting ambient temperature.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]frame_data: Frame Data
Returns
Ambient temperature.

◆ irgrid2_get_vdd()

float irgrid2_get_vdd ( irgrid2_t * ctx,
uint16_t * frame_data )

Function for getting Vdd.

This function is used for getting Vdd.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]frame_data: Frame Data

◆ irgrid2_init()

err_t irgrid2_init ( irgrid2_t * ctx,
irgrid2_cfg_t * cfg )

IR Grid 2 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See irgrid2_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ irgrid2_read_eeprom()

void irgrid2_read_eeprom ( irgrid2_t * ctx,
uint16_t * eeprom_data )

Function for reading EEPROM.

This function reads data from the EEPROM.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[out]eeprom_data: Buffer in which the data will be stored.
Returns
Nothing.

◆ irgrid2_set_chess_mode()

void irgrid2_set_chess_mode ( irgrid2_t * ctx)

Function for setting chess mode.

This function is used for setting chess mode.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
Returns
Nothing.

◆ irgrid2_set_interleaved_mode()

void irgrid2_set_interleaved_mode ( irgrid2_t * ctx)

Function for setting interleaved mode.

This function is used for interleaved mode.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
Returns
Nothing.

◆ irgrid2_set_refresh_rate()

void irgrid2_set_refresh_rate ( irgrid2_t * ctx,
uint8_t refresh_rate )

Function for setting refresh rate.

This function sets settings for refresh rate.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]refresh_rate: the refresh Rate data that will be set.
Returns
Nothing.

◆ irgrid2_set_resolution()

void irgrid2_set_resolution ( irgrid2_t * ctx,
uint8_t resolution )

Function for setting resolution.

This function is used for setting resolution.

Parameters
[in]ctx: Click context object. See irgrid2_t object definition for detailed explanation.
[in]resolution: The resolution that will be set.
Returns
Nothing.