irsense4 2.1.0.0
|
This file contains API for IR Sense 4 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | irsense4_s |
IR Sense 4 Click context object. More... | |
struct | irsense4_cfg_t |
IR Sense 4 Click configuration object. More... | |
Typedefs | |
typedef err_t(* | irsense4_master_io_t) (struct irsense4_s *, uint8_t, uint8_t *, uint8_t) |
IR Sense 4 Click driver interface. | |
typedef struct irsense4_s | irsense4_t |
IR Sense 4 Click context object. | |
Enumerations | |
enum | irsense4_drv_t { IRSENSE4_DRV_SEL_SPI , IRSENSE4_DRV_SEL_I2C } |
IR Sense 4 Click driver selector. More... | |
enum | irsense4_return_value_t { IRSENSE4_OK = 0 , IRSENSE4_ERROR = -1 } |
IR Sense 4 Click return value data. More... | |
enum | irsense4_ths_sel_t { IRSENSE4_THS_PRESENCE = 0 , IRSENSE4_THS_MOTION = 2 , IRSENSE4_THS_TAMB_SHOCK = 4 } |
IR Sense 4 Click threshold selection data value for detection algorithm. More... | |
Functions | |
void | irsense4_cfg_setup (irsense4_cfg_t *cfg) |
IR Sense 4 configuration object setup function. | |
void | irsense4_drv_interface_selection (irsense4_cfg_t *cfg, irsense4_drv_t drv_sel) |
IR Sense 4 driver interface setup function. | |
err_t | irsense4_init (irsense4_t *ctx, irsense4_cfg_t *cfg) |
IR Sense 4 initialization function. | |
err_t | irsense4_default_cfg (irsense4_t *ctx) |
IR Sense 4 default configuration function. | |
err_t | irsense4_generic_write (irsense4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
IR Sense 4 data writing function. | |
err_t | irsense4_generic_read (irsense4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
IR Sense 4 data reading function. | |
err_t | irsense4_write_reg (irsense4_t *ctx, uint8_t reg, uint8_t data_in) |
IR Sense 4 write register function. | |
err_t | irsense4_read_reg (irsense4_t *ctx, uint8_t reg, uint8_t *data_out) |
IR Sense 4 read register function. | |
err_t | irsense4_read_word (irsense4_t *ctx, uint8_t reg, int16_t *data_out) |
IR Sense 4 read word function. | |
err_t | irsense4_set_lp_filter_motion (irsense4_t *ctx, uint8_t lpf_m) |
IR Sense 4 set low-pass filter for motion function. | |
err_t | irsense4_set_lp_filter_presence (irsense4_t *ctx, uint8_t lpf_p) |
IR Sense 4 set low-pass filter for presence function. | |
err_t | irsense4_set_lp_filter_amb_temp (irsense4_t *ctx, uint8_t lpf_at) |
IR Sense 4 set low-pass filter for ambient temperature function. | |
err_t | irsense4_get_device_id (irsense4_t *ctx, uint8_t *device_id) |
IR Sense 4 get device ID function. | |
err_t | irsense4_set_avr_temp (irsense4_t *ctx, uint8_t avr_amp_temp, uint8_t avr_obj_temp) |
IR Sense 4 set averages for temperature function. | |
err_t | irsense4_set_gain_mode (irsense4_t *ctx, uint8_t gain_mode) |
IR Sense 4 set gain mode function. | |
err_t | irsense4_set_sens_data (irsense4_t *ctx, uint16_t sens) |
IR Sense 4 set sensitivity data function. | |
err_t | irsense4_config_odr (irsense4_t *ctx, uint8_t odr) |
IR Sense 4 set output data rate function. | |
err_t | irsense4_enable_one_shot (irsense4_t *ctx) |
IR Sense 4 enable one-shot mode function. | |
err_t | irsense4_set_int_mask (irsense4_t *ctx, uint8_t int_mask) |
IR Sense 4 set interrupt masks for flag function. | |
err_t | irsense4_config_int_signal (irsense4_t *ctx, uint8_t int_sr) |
IR Sense 4 configur interrupt the signal function. | |
err_t | irsense4_wait_new_data_ready (irsense4_t *ctx) |
IR Sense 4 wait new data ready function. | |
err_t | irsense4_get_status (irsense4_t *ctx, uint8_t *status) |
IR Sense 4 get status function. | |
err_t | irsense4_get_obj_temperature (irsense4_t *ctx, float *temperature) |
IR Sense 4 get the object temperature function. | |
err_t | irsense4_get_amb_temperature (irsense4_t *ctx, float *temperature) |
IR Sense 4 get the ambient temperature function. | |
err_t | irsense4_get_comp_temperature (irsense4_t *ctx, float *temperature) |
IR Sense 4 get the compensated temperature function. | |
err_t | irsense4_get_presence_data (irsense4_t *ctx, int16_t *presence) |
IR Sense 4 get the presence detection data function. | |
err_t | irsense4_get_motion_data (irsense4_t *ctx, int16_t *motion) |
IR Sense 4 get the motion detection data function. | |
err_t | irsense4_get_amb_shock_data (irsense4_t *ctx, int16_t *shock) |
IR Sense 4 get the ambient shock detection data function. | |
err_t | irsense4_write_emb_reg (irsense4_t *ctx, uint8_t reg_emb, uint8_t data_in) |
IR Sense 4 write the embedded register function. | |
err_t | irsense4_read_emb_reg (irsense4_t *ctx, uint8_t reg_emb, uint8_t *data_out) |
IR Sense 4 write register function. | |
err_t | irsense4_set_threshold (irsense4_t *ctx, irsense4_ths_sel_t ths_sel, uint16_t threshold) |
IR Sense 4 set threshold data function. | |
err_t | irsense4_get_threshold (irsense4_t *ctx, irsense4_ths_sel_t ths_sel, uint16_t *threshold) |
IR Sense 4 get the threshold data function. | |
This file contains API for IR Sense 4 Click Driver.
typedef err_t(* irsense4_master_io_t) (struct irsense4_s *, uint8_t, uint8_t *, uint8_t) |
IR Sense 4 Click driver interface.
Definition of driver interface of IR Sense 4 Click driver. Driver serial interface.
typedef struct irsense4_s irsense4_t |
IR Sense 4 Click context object.
Context object definition of IR Sense 4 Click driver.
enum irsense4_drv_t |
enum irsense4_ths_sel_t |
IR Sense 4 Click threshold selection data value for detection algorithm.
Predefined enum values for driver threshold selection data value.
Enumerator | |
---|---|
IRSENSE4_THS_PRESENCE | Presence threshold selection. |
IRSENSE4_THS_MOTION | Motion threshold selection. |
IRSENSE4_THS_TAMB_SHOCK | Ambient temperature shock threshold selection. |