grideye 2.0.0.0
Public function

Functions

void grideye_cfg_setup (grideye_cfg_t *cfg)
 Config Object Initialization function.
 
GRIDEYE_RETVAL grideye_init (grideye_t *ctx, grideye_cfg_t *cfg)
 Initialization function.
 
void grideye_default_cfg (grideye_t *ctx)
 Click Default Configuration function.
 
void grideye_generic_write (grideye_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void grideye_generic_read (grideye_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void grideye_write_data (grideye_t *ctx, uint8_t wr_addr, uint16_t wr_data)
 Write data function.
 
uint16_t grideye_read_data (grideye_t *ctx, uint8_t rd_addr)
 Data read function.
 
void grideye_read_grid (grideye_t *ctx, int16_t *buffer)
 Read whole grid function.
 
uint8_t grideye_check_interrupt (grideye_t *ctx)
 Get Interrupt state function.
 
void grideye_set_power_control (grideye_t *ctx, uint8_t pow_cnt)
 Set Power Control function.
 
uint8_t grideye_read_power_control (grideye_t *ctx)
 Read Power Control function.
 
void grideye_flag_reset (grideye_t *ctx)
 Flag reset function.
 
void grideye_initial_reset (grideye_t *ctx)
 Initial reset function.
 
void grideye_set_fps1 (grideye_t *ctx)
 Set FPS 1 function.
 
void grideye_set_fps10 (grideye_t *ctx)
 Set FPS 10 function.
 
uint8_t grideye_check_fps (grideye_t *ctx)
 Check FPS function.
 
void grideye_set_int_ctl_reg (grideye_t *ctx, uint8_t int_cnt)
 Set Interrupt Control Register function.
 
uint8_t grideye_read_int_ctl_reg (grideye_t *ctx)
 Read Interrupt Control Register function.
 
uint8_t grideye_read_stat_reg (grideye_t *ctx)
 Read Status Register function.
 
void grideye_set_stat_clr_reg (grideye_t *ctx, uint8_t int_cnt)
 Set Status Clear Register function.
 
void grideye_set_ave_reg (grideye_t *ctx, uint8_t mamod)
 Set Average Register function.
 
uint8_t grideye_read_ave_reg (grideye_t *ctx)
 Read Average Register function.
 
void grideye_write_int_lvl_high (grideye_t *ctx, uint16_t wr_data)
 Set interrupt level high function.
 
void grideye_write_int_lvl_low (grideye_t *ctx, uint16_t wr_data)
 Set interrupt level low function.
 
uint16_t grideye_read_int_lvl_high (grideye_t *ctx)
 Read interrupt level high function.
 
uint16_t grideye_read_int_lvl_low (grideye_t *ctx)
 Read interrupt level low function.
 
void grideye_write_int_hyst_lvl (grideye_t *ctx, uint16_t wr_data)
 Set interrupt hysteresis level function.
 
uint16_t grideye_read_int_hyst_lvl (grideye_t *ctx)
 Read interrupt hysteresis level function.
 
float grideye_read_therm_temp_reg (grideye_t *ctx)
 Read Thermistor Temperature Register function.
 
uint8_t grideye_read_int0 (grideye_t *ctx)
 Read Interrupt Table Register 0 function.
 
uint8_t grideye_read_int1 (grideye_t *ctx)
 Read Interrupt Table Register 1 function.
 
uint8_t grideye_read_int2 (grideye_t *ctx)
 Read Interrupt Table Register 2 function.
 
uint8_t grideye_read_int3 (grideye_t *ctx)
 Read Interrupt Table Register 3 function.
 
uint8_t grideye_read_int4 (grideye_t *ctx)
 Read Interrupt Table Register 4 function.
 
uint8_t grideye_read_int5 (grideye_t *ctx)
 Read Interrupt Table Register 5 function.
 
uint8_t grideye_read_int6 (grideye_t *ctx)
 Read Interrupt Table Register 6 function.
 
uint8_t grideye_read_int7 (grideye_t *ctx)
 Read Interrupt Table Register 7 function.
 

Detailed Description

Function Documentation

◆ grideye_cfg_setup()

void grideye_cfg_setup ( grideye_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ grideye_check_fps()

uint8_t grideye_check_fps ( grideye_t * ctx)

Check FPS function.

Parameters
ctxClick object.
Returns
result 8-bit data representing FPS

@description Function is used to check what fps setting is applied.

Note
Consult datasheet in order to discern what value represents.

◆ grideye_check_interrupt()

uint8_t grideye_check_interrupt ( grideye_t * ctx)

Get Interrupt state function.

Parameters
ctxClick object.
Returns
  • 1 : Interrupt has occured
  • 0 : Interrupt has not occured

@description Function is used to check if an interrupt has occured.

◆ grideye_default_cfg()

void grideye_default_cfg ( grideye_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Grideye click.

◆ grideye_flag_reset()

void grideye_flag_reset ( grideye_t * ctx)

Flag reset function.

Parameters
ctxClick object.

@description Function is used to reset flags.

Note
Flag reset function clears the Status Register, Interrupt Flag and Interrupt Table.

◆ grideye_generic_read()

void grideye_generic_read ( grideye_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

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

@description This function reads data from the desired register.

◆ grideye_generic_write()

void grideye_generic_write ( grideye_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.

@description This function writes data to the desired register.

◆ grideye_init()

GRIDEYE_RETVAL grideye_init ( grideye_t * ctx,
grideye_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ grideye_initial_reset()

void grideye_initial_reset ( grideye_t * ctx)

Initial reset function.

Parameters
ctxClick object.

@description Function is used to perform initial reset.

Note
Initial Reset brings Flag reset and returns to initial setting.

◆ grideye_read_ave_reg()

uint8_t grideye_read_ave_reg ( grideye_t * ctx)

Read Average Register function.

Parameters
ctxClick object.
Returns
result 8-bit data representing average output mode

@description Function is used to check average output mode.

Note
Consult datasheet in order to discern what value represents.

◆ grideye_read_data()

uint16_t grideye_read_data ( grideye_t * ctx,
uint8_t rd_addr )

Data read function.

Parameters
ctxClick object.
rd_addr8-bit register address
Returns
result 16-bit data from two consecutive registers.

@description Function reads two bytes of data from two consecutive registers.

◆ grideye_read_grid()

void grideye_read_grid ( grideye_t * ctx,
int16_t * buffer )

Read whole grid function.

Parameters
ctxClick object.
bufferdata array used to store data from each of 128 registers of the grid

@description Function is used to reada data from the whole sensor grid.

◆ grideye_read_int0()

uint8_t grideye_read_int0 ( grideye_t * ctx)

Read Interrupt Table Register 0 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int1()

uint8_t grideye_read_int1 ( grideye_t * ctx)

Read Interrupt Table Register 1 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int2()

uint8_t grideye_read_int2 ( grideye_t * ctx)

Read Interrupt Table Register 2 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int3()

uint8_t grideye_read_int3 ( grideye_t * ctx)

Read Interrupt Table Register 3 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int4()

uint8_t grideye_read_int4 ( grideye_t * ctx)

Read Interrupt Table Register 4 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int5()

uint8_t grideye_read_int5 ( grideye_t * ctx)

Read Interrupt Table Register 5 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int6()

uint8_t grideye_read_int6 ( grideye_t * ctx)

Read Interrupt Table Register 6 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int7()

uint8_t grideye_read_int7 ( grideye_t * ctx)

Read Interrupt Table Register 7 function.

Parameters
ctxClick object.
Returns
result 8-bit data representing pixels which temperature outputs are over the threshold.

@description Function is used to check pixels with temperature outputs are over the threshold.

◆ grideye_read_int_ctl_reg()

uint8_t grideye_read_int_ctl_reg ( grideye_t * ctx)

Read Interrupt Control Register function.

Parameters
ctxClick object.
Returns
result 8-bit data representing interrupt control settings

@description Function is used to check interrupt control settings.

Note
Consult datasheet in order to discern what value represents.

◆ grideye_read_int_hyst_lvl()

uint16_t grideye_read_int_hyst_lvl ( grideye_t * ctx)

Read interrupt hysteresis level function.

Parameters
ctxClick object.
Returns
result 16-bit data representing interrupt hysteresis level setting

@description Funkction is used to check interrupt hysteresis level limit.

◆ grideye_read_int_lvl_high()

uint16_t grideye_read_int_lvl_high ( grideye_t * ctx)

Read interrupt level high function.

Parameters
ctxClick object.
Returns
result 16-bit data representing interrupt level upper limit setting

@description Funkction is used to check interrupt level upper limit.

◆ grideye_read_int_lvl_low()

uint16_t grideye_read_int_lvl_low ( grideye_t * ctx)

Read interrupt level low function.

Parameters
ctxClick object.
Returns
result 16-bit data representing interrupt level lower limit setting

@description Funkction is used to check interrupt level lower limit.

◆ grideye_read_power_control()

uint8_t grideye_read_power_control ( grideye_t * ctx)

Read Power Control function.

Parameters
ctxClick object.
Returns
result 8-bit data representing operating mode of device

@description Function is used to read Power Control register.

Note
Consult datasheet in order to discern what value represents.

◆ grideye_read_stat_reg()

uint8_t grideye_read_stat_reg ( grideye_t * ctx)

Read Status Register function.

Parameters
ctxClick object.
Returns
result 8-bit data representing contents of status register

@description Function is used to read status register.

Note
Consult datasheet in order to discern what value represents.

◆ grideye_read_therm_temp_reg()

float grideye_read_therm_temp_reg ( grideye_t * ctx)

Read Thermistor Temperature Register function.

Parameters
ctxClick object.
Returns
result float value representing temperature in centigrade

@description Function is used to read register which indicate thermistor temperature data.

◆ grideye_set_ave_reg()

void grideye_set_ave_reg ( grideye_t * ctx,
uint8_t mamod )

Set Average Register function.

Parameters
ctxClick object.
mamod8-bit data representing average output mode

@description Function is used to set average output mode.

Note
Consult datasheet or use predefined values.

◆ grideye_set_fps1()

void grideye_set_fps1 ( grideye_t * ctx)

Set FPS 1 function.

Parameters
ctxClick object.

@description Function is used for setting Frame Rate to 1FPS.

◆ grideye_set_fps10()

void grideye_set_fps10 ( grideye_t * ctx)

Set FPS 10 function.

Parameters
ctxClick object.

@description Function is used for setting Frame Rate to 10FPS.

◆ grideye_set_int_ctl_reg()

void grideye_set_int_ctl_reg ( grideye_t * ctx,
uint8_t int_cnt )

Set Interrupt Control Register function.

Parameters
ctxClick object.
int_cnt8-bit data representing interrupt control settings

@description Function is used to apply interrupt control settings.

Note
Consult datasheet or use predefined values.

◆ grideye_set_power_control()

void grideye_set_power_control ( grideye_t * ctx,
uint8_t pow_cnt )

Set Power Control function.

Parameters
ctxClick object.
pow_cnt8-bit data representing operating mode of device

@description Function is used to set operating mode of device.

Note
Consult datasheet or use predefined values.

◆ grideye_set_stat_clr_reg()

void grideye_set_stat_clr_reg ( grideye_t * ctx,
uint8_t int_cnt )

Set Status Clear Register function.

Parameters
ctxClick object.
int_cnt8-bit data representing status clear settings

@description Function is used to clear the Overflow Flags and Interrupt Flag.

Note
Consult datasheet or use predefined values.

◆ grideye_write_data()

void grideye_write_data ( grideye_t * ctx,
uint8_t wr_addr,
uint16_t wr_data )

Write data function.

Parameters
ctxClick object.
wr_addr8-bit register address
wr_data16-bit data to be written into registers
Returns
What function returns

@description Function writes two bytes of data into two consecutive registers.

◆ grideye_write_int_hyst_lvl()

void grideye_write_int_hyst_lvl ( grideye_t * ctx,
uint16_t wr_data )

Set interrupt hysteresis level function.

Parameters
ctxClick object.
wr_data16-bit data representing interrupt hysteresis level limit setting

@description Funkction is used to set interrupt hysteresis level limit.

◆ grideye_write_int_lvl_high()

void grideye_write_int_lvl_high ( grideye_t * ctx,
uint16_t wr_data )

Set interrupt level high function.

Parameters
ctxClick object.
wr_data16-bit data representing interrupt level upper limit setting

@description Funkction is used to set interrupt level upper limit.

◆ grideye_write_int_lvl_low()

void grideye_write_int_lvl_low ( grideye_t * ctx,
uint16_t wr_data )

Set interrupt level low function.

Parameters
wr_data16-bit data representing interrupt level lower limit setting

@description Funkction is used to set interrupt level lower limit.