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. | |
void irsense2_cfg_setup | ( | irsense2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void irsense2_data_read | ( | irsense2_t * | ctx, |
float * | ir_data, | ||
float * | temp_data ) |
Data function.
ctx | Click object. |
ir_data | 16bit Data read and adjusted from the IR sensor. |
temp_data | 16bit Data read and adjusted from the temperature sensor. |
@description This function reads data from IR and Temeprature sensors and adjusts them with apropriate values.
void irsense2_default_cfg | ( | irsense2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for IrSense2 click.
void irsense2_generic_read | ( | irsense2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void irsense2_generic_write | ( | irsense2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
void irsense2_get_int | ( | irsense2_t * | ctx | ) |
Interrupt factor function.
ctx | Click object. |
@description This function reads from interrupt factor information register.
void irsense2_get_int_pin | ( | irsense2_t * | ctx | ) |
Int_pin state function.
ctx | Click object. |
@description This function gets int_pin state.
int16_t irsense2_get_ir_data | ( | irsense2_t * | ctx | ) |
IR Data read function.
ctx | Click object. |
16bit | value from IR sensor's register. |
@description This function reads and returns 16bit value from the IR senor.
int16_t irsense2_get_temperature_data | ( | irsense2_t * | ctx | ) |
Temperatire Data read function.
ctx | Click object. |
16bit | value from Temperature sensor's register. |
@description This function reads and returns 16bit value from the Temperature senor.
IRSENSE2_RETVAL irsense2_init | ( | irsense2_t * | ctx, |
irsense2_cfg_t * | cfg ) |
Initialization function.
irsense2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t irsense_human_detected | ( | irsense2_t * | ctx, |
float | ir_data ) |
Human detection function.
ctx | Click object. |
ir_data | Currently 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.