irreflect 2.0.0.0

Functions

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

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

@description 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.

@description 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.

@description 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;

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