grideye 2.0.0.0
grideye.h File Reference

This file contains API for GRID EYE Click driver. More...

#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  grideye_t
 Click ctx object definition. More...
 
struct  grideye_cfg_t
 Click configuration structure definition. More...
 

Macros

#define GRIDEYE_MAP_MIKROBUS(cfg, mikrobus)
 
#define GRIDEYE_RETVAL   int8_t
 
#define GRIDEYE_OK   0
 
#define GRIDEYE_INIT_ERROR   (-1)
 
#define GRIDEYE_I2C_ADDR   0x68
 
#define GRIDEYE_PCLT   0x00
 
#define GRIDEYE_RST   0x01
 
#define GRIDEYE_FPSC   0x02
 
#define GRIDEYE_INTC   0x03
 
#define GRIDEYE_STAT   0x04
 
#define GRIDEYE_SCLR   0x05
 
#define GRIDEYE_AVE   0x07
 
#define GRIDEYE_INTHL   0x08
 
#define GRIDEYE_INTHH   0x09
 
#define GRIDEYE_INTLL   0x0A
 
#define GRIDEYE_INTLH   0x0B
 
#define GRIDEYE_IHYSL   0x0C
 
#define GRIDEYE_IHYSH   0x0D
 
#define GRIDEYE_TTHL   0x0E
 
#define GRIDEYE_TTHH   0x0F
 
#define GRIDEYE_INT0   0x10
 
#define GRIDEYE_INT1   0x11
 
#define GRIDEYE_INT2   0x12
 
#define GRIDEYE_INT3   0x13
 
#define GRIDEYE_INT4   0x14
 
#define GRIDEYE_INT5   0x15
 
#define GRIDEYE_INT6   0x16
 
#define GRIDEYE_INT7   0x17
 
#define GRIDEYE_PCLT_NORMAL   0x00
 
#define GRIDEYE_PCLT_SLEEP   0x10
 
#define GRIDEYE_PCLT_STANDBY_60   0x20
 
#define GRIDEYE_PCLT_STANDBY_10   0x21
 
#define GRIDEYE_RST_FLAG   0x30
 
#define GRIDEYE_RST_INIT   0x3F
 
#define GRIDEYE_FPSC_1FPS   0x01
 
#define GRIDEYE_FPSC_10FPS   0x00
 
#define GRIDEYE_INTC_INTEN_ACTIVE   0x01
 
#define GRIDEYE_INTC_INTEN_INACTIVE   0x00
 
#define GRIDEYE_INTC_INTMOD_ABSO   0x10
 
#define GRIDEYE_INTC_INTMOD_DIFE   0x00
 
#define GRIDEYE_SCLR_INTCLR   0x02
 
#define GRIDEYE_SCLR_OVS_CLR   0x04
 
#define GRIDEYE_SCLR_OVT_CLR   0x08
 
#define GRIDEYE_AVE_MAMOD_ACTIVE   0x20
 
#define GRIDEYE_AVE_MAMOD_INACTIVE   0x00
 
#define GRIDEYE_PIXELS   0x80
 

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

This file contains API for GRID EYE Click driver.