irgrid3 2.0.0.0
IR Grid 3 Click Driver

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

Topics

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

Functions

void irgrid3_cfg_setup (irgrid3_cfg_t *cfg)
 IR Grid 3 configuration object setup function.
 
err_t irgrid3_init (irgrid3_t *ctx, irgrid3_cfg_t *cfg)
 IR Grid 3 initialization function.
 
void irgrid3_default_cfg (irgrid3_t *ctx)
 IR Grid 3 default configuration function.
 
void irgrid3_generic_write (irgrid3_t *ctx, uint16_t reg, uint8_t *data_buf, uint16_t len)
 IR Grid 3 I2C writing function.
 
void irgrid3_generic_read (irgrid3_t *ctx, uint16_t reg, uint8_t *rx_buf, uint16_t rx_len)
 IR Grid 3 I2C reading function.
 
void irgrid3_read_eeprom (irgrid3_t *ctx, uint16_t *eeprom_data)
 Function for reading EEPROM.
 
uint8_t irgrid3_extract_parameters (irgrid3_t *ctx, uint16_t *eeprom_data)
 Parameters storage function.
 
void irgrid3_set_refresh_rate (irgrid3_t *ctx, uint8_t refresh_rate)
 Function for setting refresh rate.
 
uint16_t irgrid3_get_frame_data (irgrid3_t *ctx, uint16_t *frame_data)
 Function for getting frame data.
 
void irgrid3_set_resolution (irgrid3_t *ctx, uint8_t resolution)
 Function for setting resolution.
 
uint16_t irgrid3_get_current_res (irgrid3_t *ctx)
 Function for getting current resolution.
 
uint16_t irgrid3_get_refresh_rate (irgrid3_t *ctx)
 Function for getting current refresh Rate.
 
void irgrid3_set_interleaved_mode (irgrid3_t *ctx)
 Function for setting interleaved mode.
 
void irgrid3_set_chess_mode (irgrid3_t *ctx)
 Function for setting chess mode.
 
uint16_t irgrid3_get_current_mode (irgrid3_t *ctx)
 Function for getting current mode.
 
void irgrid3_get_pixel_temperature (irgrid3_t *ctx, float *temp_ambient, float *pixel_temp)
 Function for getting pixels temperature.
 
float irgrid3_get_temp_ambient (irgrid3_t *ctx, uint16_t *frame_data)
 Function for getting Ambient temperature.
 
uint16_t irgrid3_get_subpage_number (uint16_t *frame_data)
 Function for getting sub page number.
 
float irgrid3_get_vdd (irgrid3_t *ctx, uint16_t *frame_data)
 Function for getting Vdd.
 
void irgrid3_calculate_temp_obj (irgrid3_t *ctx, uint16_t *frame_data, float tr_data, float *px_matrix)
 Function for calculating temperature objects.
 
void irgrid3_get_image (irgrid3_t *ctx, uint16_t *frame_data, float *px_matrix)
 Function for getting Image.
 

Detailed Description

API for configuring and manipulating IR Grid 3 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

◆ irgrid3_calculate_temp_obj()

void irgrid3_calculate_temp_obj ( irgrid3_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 irgrid3_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.

◆ irgrid3_cfg_setup()

void irgrid3_cfg_setup ( irgrid3_cfg_t * cfg)

IR Grid 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ irgrid3_default_cfg()

void irgrid3_default_cfg ( irgrid3_t * ctx)

IR Grid 3 default configuration function.

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

Parameters
[in]ctx: Click context object. See irgrid3_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.

◆ irgrid3_extract_parameters()

uint8_t irgrid3_extract_parameters ( irgrid3_t * ctx,
uint16_t * eeprom_data )

Parameters storage function.

This function stpores data from the EEPROM.

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

◆ irgrid3_generic_read()

void irgrid3_generic_read ( irgrid3_t * ctx,
uint16_t reg,
uint8_t * rx_buf,
uint16_t rx_len )

IR Grid 3 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 irgrid3_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.

◆ irgrid3_generic_write()

void irgrid3_generic_write ( irgrid3_t * ctx,
uint16_t reg,
uint8_t * data_buf,
uint16_t len )

IR Grid 3 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 irgrid3_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.

◆ irgrid3_get_current_mode()

uint16_t irgrid3_get_current_mode ( irgrid3_t * ctx)

Function for getting current mode.

This function is used for getting current mode.

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

◆ irgrid3_get_current_res()

uint16_t irgrid3_get_current_res ( irgrid3_t * ctx)

Function for getting current resolution.

This function is used for getting current resolution.

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

◆ irgrid3_get_frame_data()

uint16_t irgrid3_get_frame_data ( irgrid3_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 irgrid3_t object definition for detailed explanation.
[out]frame_data: Buffer in which the data will be stored
Returns
Nothing.

◆ irgrid3_get_image()

void irgrid3_get_image ( irgrid3_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 irgrid3_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.

◆ irgrid3_get_pixel_temperature()

void irgrid3_get_pixel_temperature ( irgrid3_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 irgrid3_t object definition for detailed explanation.
[in]temp_ambient: Ambient temperature data.
[out]pixel_temp: Output matrix pixels.
Returns
Nothing.

◆ irgrid3_get_refresh_rate()

uint16_t irgrid3_get_refresh_rate ( irgrid3_t * ctx)

Function for getting current refresh Rate.

This function is used for getting current refresh Rate.

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

◆ irgrid3_get_subpage_number()

uint16_t irgrid3_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 irgrid3_t object definition for detailed explanation.
[in]frame_data: Frame Data.
Returns
Sub page number.

◆ irgrid3_get_temp_ambient()

float irgrid3_get_temp_ambient ( irgrid3_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 irgrid3_t object definition for detailed explanation.
[in]frame_data: Frame Data
Returns
Ambient temperature.

◆ irgrid3_get_vdd()

float irgrid3_get_vdd ( irgrid3_t * ctx,
uint16_t * frame_data )

Function for getting Vdd.

This function is used for getting Vdd.

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

◆ irgrid3_init()

err_t irgrid3_init ( irgrid3_t * ctx,
irgrid3_cfg_t * cfg )

IR Grid 3 initialization function.

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

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

◆ irgrid3_read_eeprom()

void irgrid3_read_eeprom ( irgrid3_t * ctx,
uint16_t * eeprom_data )

Function for reading EEPROM.

This function reads data from the EEPROM.

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

◆ irgrid3_set_chess_mode()

void irgrid3_set_chess_mode ( irgrid3_t * ctx)

Function for setting chess mode.

This function is used for setting chess mode.

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

◆ irgrid3_set_interleaved_mode()

void irgrid3_set_interleaved_mode ( irgrid3_t * ctx)

Function for setting interleaved mode.

This function is used for interleaved mode.

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

◆ irgrid3_set_refresh_rate()

void irgrid3_set_refresh_rate ( irgrid3_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 irgrid3_t object definition for detailed explanation.
[in]refresh_rate: the refresh Rate data that will be set.
Returns
Nothing.

◆ irgrid3_set_resolution()

void irgrid3_set_resolution ( irgrid3_t * ctx,
uint8_t resolution )

Function for setting resolution.

This function is used for setting resolution.

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