irreflect  2.0.0.0
Functions

Functions

void irreflect_cfg_setup (irreflect_cfg_t *cfg)
 Config Object Initialization function. More...
 
IRREFLECT_RETVAL irreflect_init (irreflect_t *ctx, irreflect_cfg_t *cfg)
 Initialization function. More...
 
uint8_t irreflect_reflect_status (irreflect_t *ctx)
 Detecting interrupt states of IR reflection from GP2S700HCP reflective photointerrupter sensor. More...
 
uint8_t irreflect_analog_status (irreflect_t *ctx)
 Detecting states of analog pin of IR reflection from GP2S700HCP reflective photointerrupter sensor. More...
 

Detailed Description

Function Documentation

◆ irreflect_analog_status()

uint8_t irreflect_analog_status ( irreflect_t ctx)

Detecting states of analog pin of IR reflection from GP2S700HCP reflective photointerrupter sensor.

Parameters
ctxClick object.
Returns
result state of AN pin

Function detecting states of analog pin of IR reflection from GP2S700HCP reflective photointerrupter sensor and returns the state of the AN pin.

◆ irreflect_cfg_setup()

void irreflect_cfg_setup ( irreflect_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ irreflect_init()

IRREFLECT_RETVAL irreflect_init ( irreflect_t ctx,
irreflect_cfg_t cfg 
)

Initialization function.

Parameters
irreflectClick object.
cfgClick configuration structure.

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

◆ irreflect_reflect_status()

uint8_t irreflect_reflect_status ( irreflect_t ctx)

Detecting interrupt states of IR reflection from GP2S700HCP reflective photointerrupter sensor.

Parameters
ctxClick object.
Returns
result state of INT pin
  • 0 : interrupt not detected;
  • 1 : interrupt is detected;

Function detecting interrupt states of IR reflection from GP2S700HCP reflective photointerrupter sensor and returns the state of the INT pin.