irgrid 2.0.0.0
IR Grid Click Driver

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

Topics

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

Functions

void irgrid_cfg_setup (irgrid_cfg_t *cfg)
 IR Grid configuration object setup function.
 
err_t irgrid_init (irgrid_t *ctx, irgrid_cfg_t *cfg)
 IR Grid initialization function.
 
uint8_t irgrid_device_init (irgrid_t *ctx, irgrid_data_t *data_str, uint8_t refrate)
 Device Initialization.
 
void irgrid_write_ram (irgrid_t *ctx, uint8_t *data_buf, uint8_t len)
 Write function using RAM slave adress.
 
void irgrid_read_ram (irgrid_t *ctx, uint8_t *reg, uint8_t *data_buf, uint8_t len)
 Read function using RAM slave adress.
 
void irgrid_write_eeprom (irgrid_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Write function using EEPROM slave adress.
 
void irgrid_read_eeprom (irgrid_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Read function using EEPROM slave adress.
 
uint8_t irgrid_measure (irgrid_t *ctx, irgrid_data_t *data_str)
 Measurement.
 
void irgrid_get_ir_raw (irgrid_data_t *data_str, int16_t *buffer)
 Read Raw Temperature buffer.
 
void irgrid_get_temperature (irgrid_data_t *data_str, float *buffer)
 Read Calculated Temperature buffer.
 
float irgrid_get_amb_temperature (irgrid_t *ctx)
 Read Ambient Temperature.
 

Detailed Description

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

◆ irgrid_cfg_setup()

void irgrid_cfg_setup ( irgrid_cfg_t * cfg)

IR Grid configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ irgrid_device_init()

uint8_t irgrid_device_init ( irgrid_t * ctx,
irgrid_data_t * data_str,
uint8_t refrate )

Device Initialization.

Parameters
ctxClick object.
data_strData click object.
refrateRefresh Rate
Returns
0 - OK

@description Initializes device, reads eeprom memory and places it inside internal buffers.

◆ irgrid_get_amb_temperature()

float irgrid_get_amb_temperature ( irgrid_t * ctx)

Read Ambient Temperature.

Parameters
ctxClick object.
Returns
Ambient temperature.

@description Read Ambient temperautre.

◆ irgrid_get_ir_raw()

void irgrid_get_ir_raw ( irgrid_data_t * data_str,
int16_t * buffer )

Read Raw Temperature buffer.

Parameters
data_strData click object.
bufferOutput data buf.

@description Populates provided buffer with raw measurements. Buffer must have at least 64 members.

◆ irgrid_get_temperature()

void irgrid_get_temperature ( irgrid_data_t * data_str,
float * buffer )

Read Calculated Temperature buffer.

Parameters
data_strData click object.
bufferOutput data buf.

@description Populates provided buffer with calculated temperatures. Buffer must have at least 64 members.

◆ irgrid_init()

err_t irgrid_init ( irgrid_t * ctx,
irgrid_cfg_t * cfg )

IR Grid initialization function.

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

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

◆ irgrid_measure()

uint8_t irgrid_measure ( irgrid_t * ctx,
irgrid_data_t * data_str )

Measurement.

Parameters
ctxClick object.
data_strData click object.
Returns
0 - OK

@description Measures temperature and places it inside internal buffers. This function is needed to be called prior to irgrid_get_ir_raw or irgrid_get_temperature.

◆ irgrid_read_eeprom()

void irgrid_read_eeprom ( irgrid_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Read function using EEPROM slave adress.

Parameters
ctxClick object.
regRegister address pointer.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ irgrid_read_ram()

void irgrid_read_ram ( irgrid_t * ctx,
uint8_t * reg,
uint8_t * data_buf,
uint8_t len )

Read function using RAM slave adress.

Parameters
ctxClick object.
regRegister address pointer.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ irgrid_write_eeprom()

void irgrid_write_eeprom ( irgrid_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Write function using EEPROM slave adress.

Parameters
ctxData click object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ irgrid_write_ram()

void irgrid_write_ram ( irgrid_t * ctx,
uint8_t * data_buf,
uint8_t len )

Write function using RAM slave adress.

Parameters
ctxData click object.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.