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

Public functions of IRPyro: Open, Read, IOCTL and Close. More...

Collaboration diagram for IRPyro sensor device functions:

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

Public functions of IRPyro: Open, Read, IOCTL and Close.

Function Documentation

◆ IRPyro_close()

uint8_t IRPyro_close ( IRPyro_sensor_device_type this_device)

Stops streaming, deallocates memory and disable the IRPyro sensor.

Parameters
this_devicepointer to the IRPyro data structure
Return values
None

Definition at line 345 of file IRPyro_API_single_device_layer.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IRPyro_ioctl()

uint8_t IRPyro_ioctl ( IRPyro_sensor_device_type this_device,
IRPyro_cmd_type cmd,
IRPyro_arg_type  arg 
)

access to IRPyro registers

Parameters
this_devicepointer to the IRPyro data structure
cmdpointer to command data structure
argpointer to argument data structure
Return values
1success / 0 fail

Definition at line 426 of file IRPyro_API_single_device_layer.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IRPyro_open()

uint8_t IRPyro_open ( IRPyro_sensor_device_type this_device)

Initializes the IRPyro device.

Parameters
this_devicepointer to the IRPyro data structure
Return values
op_result1 success / 0 error

Definition at line 321 of file IRPyro_API_single_device_layer.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IRPyro_read()

uint8_t IRPyro_read ( IRPyro_sensor_device_type this_device)

Reads a frame of data from the IRPyro.

    Sensor data sampling into the FIFO (SECTION 12.6.1 )
    There are two methods of sampling the data available in the FIFO:
    Polling mode or Interrupt mode.
     - In interrupt mode the host can wait till the interrupt line goes
       low in order to read data from the FIFO. The interrupt remains
       low till the FIFO is cleared from data.
     - In polling mode the host has to read the FIFO status packet to
       determine if data is available in order to read it. The number of
       data packets available can also be determined from the status
       packet allowing multiple reads without having to keep reading the
       status packet.
    Interrupt mode is a single step operation, polling mode is a two step
    operation.

IMPORTANT:
  FIFO data collected is stored in the first available position of the
  channel_value array.

  One channel active:
       channel 2 -> channel_value[0]
  Four channels active:
       channel 1 -> channel_value[0]
       channel 2 -> channel_value[1]
       channel 3 -> channel_value[2]
       channel 4 -> channel_value[3]
  For both cases:
       frame counter -> channel_value[5]
Parameters
this_devicepointer to the IRPyro data structure
Return values
op_result1 success / 0 error

Definition at line 385 of file IRPyro_API_single_device_layer.c.

Here is the call graph for this function:
Here is the caller graph for this function: