Public functions of IRPyro: Open, Read, IOCTL and Close.
More...
Public functions of IRPyro: Open, Read, IOCTL and Close.
◆ IRPyro_close()
Stops streaming, deallocates memory and disable the IRPyro sensor.
- Parameters
-
this_device | pointer to the IRPyro data structure |
- Return values
-
Definition at line 345 of file IRPyro_API_single_device_layer.c.
◆ IRPyro_ioctl()
access to IRPyro registers
- Parameters
-
this_device | pointer to the IRPyro data structure |
cmd | pointer to command data structure |
arg | pointer to argument data structure |
- Return values
-
Definition at line 426 of file IRPyro_API_single_device_layer.c.
◆ IRPyro_open()
Initializes the IRPyro device.
- Parameters
-
this_device | pointer to the IRPyro data structure |
- Return values
-
op_result | 1 success / 0 error |
Definition at line 321 of file IRPyro_API_single_device_layer.c.
◆ IRPyro_read()
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_device | pointer to the IRPyro data structure |
- Return values
-
op_result | 1 success / 0 error |
Definition at line 385 of file IRPyro_API_single_device_layer.c.