IRPyro API  (sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor

Functions to configure and sample data from a single device. More...

Collaboration diagram for IRPyro Single Device Layer:

Modules

 Constants to access IRPyro
 Definitions used by the IRPyro_sensor_device_type.
 
 FIFO memory functions
 FIFO memory functions.
 
 IRPyro Constants
 Hexadecimal constants for the IRPyro API.
 
 IRPyro sensor device functions
 Public functions of IRPyro: Open, Read, IOCTL and Close.
 
 Individual sensor initialization and Configuration functions
 Default values defined in IRPyro_API_single_device_layer.c can be applied or user assigned.
 
 Power management functions
 Power management functions.
 
 Structures to access IRPyro
 Collection of structs that define an IRPyro_sensor_device_type.
 
 Support functions
 Data structures manipulation functions.
 

Macros

#define AFE_INIT_DEFAULT(X)
 
#define CCP_INIT_DEFAULT(X)
 
#define LOW_POWER_INIT_DEFAULT(X)
 
#define NORMAL_POWER_INIT_DEFAULT(X)
 
#define WUP_INIT_DEFAULT(X)
 

Functions

static void AFE_to_bytes (AFE_reg_type AFE_register, uint8_t *AFE_byte)
 encodes the AFE register contents of this_device into the IRPyro More...
 
static void bytes_to_AFE (uint8_t *AFE_bytes, AFE_reg_type *AFE_register)
 decodes the AFE register of the IRPyro into this_device More...
 
static void bytes_to_CCP (uint8_t CCP_byte, CCP_reg_type *CCP_register)
 decodes the CCP register of the IRPyro into this_device More...
 
static void bytes_to_WUP (uint8_t *WUP_bytes, WUP_reg_type *WUP_register)
 decodes the WUP register of the IRPyro into this_device More...
 
static void CCP_to_bytes (CCP_reg_type CCP_register, uint8_t *CCP_byte)
 encodes the CCP register contents of this_device into IRPyro More...
 
static struct notice IRPyro_checksum (void)
 
static uint8_t IRPyro_power_settings_init (IRPyro_sensor_device_type *this_device)
 initializes with defaults the power settings of an IRPyro device More...
 
static void WUP_to_bytes (WUP_reg_type WUP_register, uint8_t *WUP_byte)
 encodes the WUP register contents of this_device into the IRPyro More...
 

Detailed Description

Functions to configure and sample data from a single device.

Macro Definition Documentation

◆ AFE_INIT_DEFAULT

#define AFE_INIT_DEFAULT (   X)
Value:
AFE_reg_type X = { \
.S7_S0 = 0, \
.HP = HP_DISABLE, \
.C_LP = LOW_PASS_180, \
.CLK_OUT = CLK_ENABLE, \
.SYNC = MASTER, \
.TEMP = TEMP_DISABLE,\
.INT = INT_ENABLE \
}

Definition at line 192 of file IRPyro_API_single_device_layer.c.

◆ CCP_INIT_DEFAULT

#define CCP_INIT_DEFAULT (   X)
Value:
CCP_reg_type X = { \
.Feedback_transconductance = TCONDUCT_1_2T, \
.High_pass_filter_setting = HIGH_PASS_1HZ, \
.Feedback_cap = FEEDBACK_50_20 \
}

Definition at line 210 of file IRPyro_API_single_device_layer.c.

◆ LOW_POWER_INIT_DEFAULT

#define LOW_POWER_INIT_DEFAULT (   X)
Value:
.S7_S0 = 0x00, \
.C_LP = LOW_PASS_30, \
.CCP_High_pass[0].High_pass_filter_setting = HIGH_PASS_0_17HZ, \
.CCP_High_pass[1].High_pass_filter_setting = HIGH_PASS_0_17HZ, \
.CCP_High_pass[2].High_pass_filter_setting = HIGH_PASS_0_17HZ, \
.CCP_High_pass[3].High_pass_filter_setting = HIGH_PASS_0_17HZ, \
.CCP_High_pass[4].High_pass_filter_setting = HIGH_PASS_0_17HZ, \
.UHT = 0xFF, \
.ULT = 0xFF, \
.LHT = 0x00, \
.LLT = 0x00, \
.WT_Threshold = 0x10, \
}

Definition at line 254 of file IRPyro_API_single_device_layer.c.

◆ NORMAL_POWER_INIT_DEFAULT

#define NORMAL_POWER_INIT_DEFAULT (   X)
Value:
.S7_S0 = 0x00, \
.C_LP = LOW_PASS_180, \
.CCP_High_pass[0].High_pass_filter_setting = HIGH_PASS_1HZ, \
.CCP_High_pass[1].High_pass_filter_setting = HIGH_PASS_1HZ, \
.CCP_High_pass[2].High_pass_filter_setting = HIGH_PASS_1HZ, \
.CCP_High_pass[3].High_pass_filter_setting = HIGH_PASS_1HZ, \
.CCP_High_pass[4].High_pass_filter_setting = HIGH_PASS_1HZ, \
.UHT = 0xFF, \
.ULT = 0xFF, \
.LHT = 0x00, \
.LLT = 0x00, \
.WT_Threshold = 0x10, \
}

Definition at line 239 of file IRPyro_API_single_device_layer.c.

◆ WUP_INIT_DEFAULT

#define WUP_INIT_DEFAULT (   X)
Value:
WUP_reg_type X ={ \
.UHT = 0xFF, \
.ULT = 0xFF, \
.LHT = 0x00, \
.LLT = 0x00, \
.WT_Threshold = 0x10, \
.DP0_DP2 = REF_CH_0, \
.CH0_CH2 = SEL_CH_2, \
}

Definition at line 228 of file IRPyro_API_single_device_layer.c.

Function Documentation

◆ AFE_to_bytes()

static void AFE_to_bytes ( AFE_reg_type  AFE_register,
uint8_t *  AFE_byte 
)
static

encodes the AFE register contents of this_device into the IRPyro

Definition at line 569 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:

◆ bytes_to_AFE()

static void bytes_to_AFE ( uint8_t *  AFE_bytes,
AFE_reg_type AFE_register 
)
static

decodes the AFE register of the IRPyro into this_device

Definition at line 586 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:

◆ bytes_to_CCP()

static void bytes_to_CCP ( uint8_t  CCP_byte,
CCP_reg_type CCP_register 
)
static

decodes the CCP register of the IRPyro into this_device

Definition at line 702 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:

◆ bytes_to_WUP()

static void bytes_to_WUP ( uint8_t *  WUP_bytes,
WUP_reg_type WUP_register 
)
static

decodes the WUP register of the IRPyro into this_device

Definition at line 786 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:

◆ CCP_to_bytes()

static void CCP_to_bytes ( CCP_reg_type  CCP_register,
uint8_t *  CCP_byte 
)
static

encodes the CCP register contents of this_device into IRPyro

Definition at line 689 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:

◆ IRPyro_checksum()

static struct notice IRPyro_checksum ( void  )
static

Definition at line 1191 of file IRPyro_API_single_device_layer.c.

◆ IRPyro_power_settings_init()

static uint8_t IRPyro_power_settings_init ( IRPyro_sensor_device_type this_device)
static

initializes with defaults the power settings of an IRPyro device

Definition at line 1013 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:

◆ WUP_to_bytes()

static void WUP_to_bytes ( WUP_reg_type  WUP_register,
uint8_t *  WUP_byte 
)
static

encodes the WUP register contents of this_device into the IRPyro

Definition at line 768 of file IRPyro_API_single_device_layer.c.

Here is the caller graph for this function:
CCP_reg
IRPyro Channel Control Package register structure definition.
Definition: IRPyro_API_single_device_layer.h:207
AFE_reg::S7_S0
uint8_t S7_S0
Sampling rate (8 bit) :Sampling Rate = 1000/(N+1).
Definition: IRPyro_API_single_device_layer.h:189
HIGH_PASS_0_17HZ
#define HIGH_PASS_0_17HZ
Definition: IRPyro_API_single_device_layer.h:121
LOW_POWER_DISABLE
#define LOW_POWER_DISABLE
Definition: IRPyro_API_single_device_layer.h:74
FEEDBACK_50_20
#define FEEDBACK_50_20
Definition: IRPyro_API_single_device_layer.h:102
TEMP_DISABLE
#define TEMP_DISABLE
Definition: IRPyro_API_single_device_layer.h:66
WUP_reg
IRPyro Wake Up Package register structure definition.
Definition: IRPyro_API_single_device_layer.h:224
REF_CH_0
#define REF_CH_0
Definition: IRPyro_API_single_device_layer.h:145
AFE_reg
IRPyro Analog Front End (AFE) register structure definition.
Definition: IRPyro_API_single_device_layer.h:188
CH_ENABLE
#define CH_ENABLE
Definition: IRPyro_API_single_device_layer.h:101
HP_DISABLE
#define HP_DISABLE
Definition: IRPyro_API_single_device_layer.h:72
WUP_reg::UHT
uint8_t UHT
Byte 0 to 3 (Upper and Lower thresholds) are the 8 MSB of channel ADC data (unsigned value).
Definition: IRPyro_API_single_device_layer.h:226
power_settings::S7_S0
uint8_t S7_S0
sample rate value
Definition: IRPyro_API_single_device_layer.h:282
SEL_CH_2
#define SEL_CH_2
Definition: IRPyro_API_single_device_layer.h:152
TCONDUCT_1_2T
#define TCONDUCT_1_2T
Definition: IRPyro_API_single_device_layer.h:126
SLEEP_MODE_ONE_CH
#define SLEEP_MODE_ONE_CH
Definition: IRPyro_API_single_device_layer.h:155
MASTER
#define MASTER
Definition: IRPyro_API_single_device_layer.h:68
LOW_PASS_30
#define LOW_PASS_30
Definition: IRPyro_API_single_device_layer.h:80
INT_ENABLE
#define INT_ENABLE
Definition: IRPyro_API_single_device_layer.h:65
HIGH_PASS_1HZ
#define HIGH_PASS_1HZ
Definition: IRPyro_API_single_device_layer.h:117
CLK_ENABLE
#define CLK_ENABLE
Definition: IRPyro_API_single_device_layer.h:71
CCP_reg::status_bit
uint8_t status_bit
Status bit : Active (1) / Disable (0)
Definition: IRPyro_API_single_device_layer.h:212
LOW_PASS_180
#define LOW_PASS_180
Definition: IRPyro_API_single_device_layer.h:76
power_settings
IRPyro Power Settings structure definition.
Definition: IRPyro_API_single_device_layer.h:280