irsense2 2.0.0.0

Functions

void irsense2_cfg_setup (irsense2_cfg_t *cfg)
 Config Object Initialization function.
 
IRSENSE2_RETVAL irsense2_init (irsense2_t *ctx, irsense2_cfg_t *cfg)
 Initialization function.
 
void irsense2_default_cfg (irsense2_t *ctx)
 Click Default Configuration function.
 
void irsense2_generic_write (irsense2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void irsense2_generic_read (irsense2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void irsense2_data_read (irsense2_t *ctx, float *ir_data, float *temp_data)
 Data function.
 
int16_t irsense2_get_ir_data (irsense2_t *ctx)
 IR Data read function.
 
int16_t irsense2_get_temperature_data (irsense2_t *ctx)
 Temperatire Data read function.
 
void irsense2_get_int (irsense2_t *ctx)
 Interrupt factor function.
 
uint8_t irsense_human_detected (irsense2_t *ctx, float ir_data)
 Human detection function.
 
void irsense2_get_int_pin (irsense2_t *ctx)
 Int_pin state function.
 

Detailed Description

Function Documentation

◆ irsense2_cfg_setup()

void irsense2_cfg_setup ( irsense2_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.

◆ irsense2_data_read()

void irsense2_data_read ( irsense2_t * ctx,
float * ir_data,
float * temp_data )

Data function.

Parameters
ctxClick object.
ir_data16bit Data read and adjusted from the IR sensor.
temp_data16bit Data read and adjusted from the temperature sensor.

@description This function reads data from IR and Temeprature sensors and adjusts them with apropriate values.

◆ irsense2_default_cfg()

void irsense2_default_cfg ( irsense2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for IrSense2 click.

◆ irsense2_generic_read()

void irsense2_generic_read ( irsense2_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.

◆ irsense2_generic_write()

void irsense2_generic_write ( irsense2_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.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ irsense2_get_int()

void irsense2_get_int ( irsense2_t * ctx)

Interrupt factor function.

Parameters
ctxClick object.

@description This function reads from interrupt factor information register.

◆ irsense2_get_int_pin()

void irsense2_get_int_pin ( irsense2_t * ctx)

Int_pin state function.

Parameters
ctxClick object.

@description This function gets int_pin state.

◆ irsense2_get_ir_data()

int16_t irsense2_get_ir_data ( irsense2_t * ctx)

IR Data read function.

Parameters
ctxClick object.
Return values
16bitvalue from IR sensor's register.

@description This function reads and returns 16bit value from the IR senor.

◆ irsense2_get_temperature_data()

int16_t irsense2_get_temperature_data ( irsense2_t * ctx)

Temperatire Data read function.

Parameters
ctxClick object.
Return values
16bitvalue from Temperature sensor's register.

@description This function reads and returns 16bit value from the Temperature senor.

◆ irsense2_init()

IRSENSE2_RETVAL irsense2_init ( irsense2_t * ctx,
irsense2_cfg_t * cfg )

Initialization function.

Parameters
irsense2Click object.
cfgClick configuration structure.

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

◆ irsense_human_detected()

uint8_t irsense_human_detected ( irsense2_t * ctx,
float ir_data )

Human detection function.

Parameters
ctxClick object.
ir_dataCurrently read IR sensor data

@description This function calculates differences in read IR sensor data and determines if there was a presence that tireggered a change.