IRPyro API  (sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
IRPyro_API_single_device_layer.h File Reference

IRPyro data structures and prototype functions More...

#include <stdint.h>
#include "Micro_controller_template.h"
Include dependency graph for IRPyro_API_single_device_layer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AFE_reg
 IRPyro Analog Front End (AFE) register structure definition More...
 
struct  CCP_filter
 IRPyro Channel filter configuration structure More...
 
struct  CCP_reg
 IRPyro Channel Control Package register structure definition More...
 
struct  IRPyro_arg
 IRPyro command argument More...
 
struct  IRPyro_cmd
 IRPyro commands More...
 
struct  IRPyro_sensor_device
 IRPyro device structure definition More...
 
struct  FIFO_reg
 IRPyro FIFO packet structure definition More...
 
struct  power_settings
 IRPyro Power Settings structure definition More...
 
struct  WUP_reg
 IRPyro Wake Up Package register structure definition More...
 

Macros

#define CH_DISABLE   0x00
 
#define CH_ENABLE   0x01
 
#define CLK_DISABLE   0x00
 
#define CLK_ENABLE   0x01
 
#define DEFAULT_NO_EVENTS   0x0A
 
#define IRPyro_CCP_NUMBER_OF_REGISTERS   5
 
#define IRPyro_CHANNEL_DATA_VALUES   6
 
#define IRPyro_DATA_SIZE   17
 
#define FEEDBACK_100_40   0x01
 
#define FEEDBACK_1600_640   0x05
 
#define FEEDBACK_200_80   0x02
 
#define FEEDBACK_3200_1280   0x07
 
#define FEEDBACK_400_160   0x03
 
#define FEEDBACK_50_20   0x00
 
#define FEEDBACK_800_320   0x04
 
#define GAIN_01   0x07
 
#define GAIN_02   0x05
 
#define GAIN_04   0x04
 
#define GAIN_08   0x03
 
#define GAIN_16   0x02
 
#define GAIN_32   0x01
 
#define GAIN_64   0x00
 
#define HIGH_PASS_0_17HZ   0x00
 
#define HIGH_PASS_0_33HZ   0x01
 
#define HIGH_PASS_0_66HZ   0x02
 
#define HIGH_PASS_1_30HZ   0x03
 
#define HIGH_PASS_1HZ   0x00
 
#define HIGH_PASS_2HZ   0x01
 
#define HIGH_PASS_4HZ   0x02
 
#define HIGH_PASS_8HZ   0x03
 
#define HP_DISABLE   0x00
 
#define HP_ENABLE   0x01
 
#define INT_DISABLE   0x00
 
#define INT_ENABLE   0x01
 
#define LOW_PASS_15   0x01
 
#define LOW_PASS_180   0x00
 
#define LOW_PASS_22_5   0x03
 
#define LOW_PASS_30   0x00
 
#define LOW_PASS_3_75   0x03
 
#define LOW_PASS_45   0x02
 
#define LOW_PASS_75   0x02
 
#define LOW_PASS_90   0x01
 
#define LOW_POWER_DISABLE   0x00
 
#define LOW_POWER_ENABLE   0x01
 
#define MASTER   0x00
 
#define MAX_WUP_THRESHOLD   0xFF
 
#define MIN_WUP_THRESHOLD   0x00
 
#define NOT_IN_USE_VALUE   0x00
 
#define REF_CH_0   0x00
 
#define REF_CH_1   0x01
 
#define REF_CH_2   0x02
 
#define REF_CH_3   0x03
 
#define REF_CH_4   0x04
 
#define SAFE_WUP_THRESHOLD   0xB4
 
#define SEL_CH_0   0x00
 
#define SEL_CH_1   0x01
 
#define SEL_CH_2   0x02
 
#define SEL_CH_3   0x03
 
#define SEL_CH_4   0x04
 
#define SLAVE   0x01
 
#define SLEEP_MODE_ONE_CH   0x00
 
#define SLEEP_MODE_TWO_CH   0x01
 
#define TCONDUCT_0_15T   0x03
 
#define TCONDUCT_0_3T   0x02
 
#define TCONDUCT_0_6T   0x01
 
#define TCONDUCT_1_2T   0x00
 
#define TEMP_DISABLE   0x00
 
#define TEMP_ENABLE   0x01
 

Typedefs

typedef struct AFE_reg AFE_reg_type
 IRPyro Analog Front End (AFE) register type definition More...
 
typedef struct CCP_filter CCP_filter_type
 Typedef for filter channel definition. More...
 
typedef struct CCP_reg CCP_reg_type
 IRPyro Channel Control Package register typedef definition More...
 
typedef struct IRPyro_arg IRPyro_arg_type
 
typedef struct IRPyro_cmd IRPyro_cmd_type
 
typedef enum IRPyro_command IRPyro_command_type
 Used by the IOCTL function to act a command that modifies AFE and CCP. More...
 
typedef struct IRPyro_sensor_device IRPyro_sensor_device_type
 
typedef struct FIFO_reg FIFO_reg_type
 IRPyro FIFO Package register typedef definition More...
 
typedef struct power_settings power_settings_type
 
typedef struct WUP_reg WUP_reg_type
 IRPyro Wake Up Package register typedef definition More...
 

Enumerations

enum  IRPyro_command {
  sampling_rate_set, sampling_rate_get, high_pass_set, high_pass_get,
  low_pass_set, low_pass_get, gain_set, gain_get,
  power_off, power_normal, power_low, power_sleep,
  power_wakeup, register_set, register_get
}
 Used by the IOCTL function to act a command that modifies AFE and CCP. More...
 

Functions

uint8_t IRPyro_close (IRPyro_sensor_device_type *this_device)
 Stops streaming, deallocates memory and disable the IRPyro sensor. More...
 
uint8_t IRPyro_ioctl (IRPyro_sensor_device_type *this_device, IRPyro_cmd_type *cmd, IRPyro_arg_type arg)
 access to IRPyro registers More...
 
uint8_t IRPyro_open (IRPyro_sensor_device_type *this_device)
 Initializes the IRPyro device. More...
 
uint8_t IRPyro_read (IRPyro_sensor_device_type *this_device)
 Reads a frame of data from the IRPyro. More...
 

Detailed Description

IRPyro data structures and prototype functions

Author
_KEMET Ltd.
Date
March 2018
Version
Release 1.0.6
Attention

© COPYRIGHT 2018 _KEMET, Ltd

   Copyright (c) 2018, _KEMET, Ltd
   All rights reserved.

   THIS SOFTWARE IS PROVIDED BY _KEMET, Ltd ''AS IS'' AND ANY
   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   DISCLAIMED. IN NO EVENT SHALL _KEMET, Ltd BE LIABLE FOR ANY
   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file IRPyro_API_single_device_layer.h.