irsense3 2.0.0.0

Functions

void irsense3_cfg_setup (irsense3_cfg_t *cfg)
 Config Object Initialization function.
 
IRSENSE3_RETVAL irsense3_init (irsense3_t *ctx, irsense3_cfg_t *cfg)
 Initialization function.
 
void irsense3_default_cfg (irsense3_t *ctx)
 Click Default Configuration function.
 
void irsense3_generic_write (irsense3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void irsense3_generic_read (irsense3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t irsense3_get_interrupt_state (irsense3_t *ctx)
 Get Interrupt state.
 
float irsense3_get_temperature_data (irsense3_t *ctx)
 Temperature data.
 
float irsense3_get_ir_sensor_data (irsense3_t *ctx)
 Output current of IR sensor.
 
uint8_t irsense3_human_approach_detect (irsense3_t *ctx)
 Human approach detection.
 
void irsense3_software_reset (irsense3_t *ctx)
 Software reset.
 

Detailed Description

Function Documentation

◆ irsense3_cfg_setup()

void irsense3_cfg_setup ( irsense3_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.

◆ irsense3_default_cfg()

void irsense3_default_cfg ( irsense3_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for IrSense3 click.

◆ irsense3_generic_read()

void irsense3_generic_read ( irsense3_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.

◆ irsense3_generic_write()

void irsense3_generic_write ( irsense3_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.

◆ irsense3_get_interrupt_state()

uint8_t irsense3_get_interrupt_state ( irsense3_t * ctx)

Get Interrupt state.

Parameters
ctxClick object.
Return values
Interruptstate on the INT pin

◆ irsense3_get_ir_sensor_data()

float irsense3_get_ir_sensor_data ( irsense3_t * ctx)

Output current of IR sensor.

Parameters
ctxClick object.
Return values
Currentof the IR sensor in [pA]

◆ irsense3_get_temperature_data()

float irsense3_get_temperature_data ( irsense3_t * ctx)

Temperature data.

Parameters
ctxClick object.
Return values
Temperaturedata in [C]

◆ irsense3_human_approach_detect()

uint8_t irsense3_human_approach_detect ( irsense3_t * ctx)

Human approach detection.

Parameters
ctxClick object.
Return values
1- if presence is detected or 0 - if there isn't presence detected

◆ irsense3_init()

IRSENSE3_RETVAL irsense3_init ( irsense3_t * ctx,
irsense3_cfg_t * cfg )

Initialization function.

Parameters
irsense3Click object.
cfgClick configuration structure.

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

◆ irsense3_software_reset()

void irsense3_software_reset ( irsense3_t * ctx)

Software reset.

Parameters
ctxClick object.