USB LISM-PI26xx V2.0
C / Linux x86-64 / Legacy API Examples

This package contains the same legacy examples as the Lazarus example
package, but implemented as portable C console applications.

Directory structure:

  ADCSettings/
  IFConfig/
  IntegrationTime/
  LineRate/
  ModeConfig/
  OpenCloseDevice/
  PacketLength/
  SaveTIFF/
  TriggerOutput/
  Lib/
  build_all.sh
  clean_all.sh

The Lib directory contains:

  usblismpi26.h
  LegacyExampleCommon.h
  LegacyExampleCommon.c
  libusblismpi2664.so*

Each example directory contains:

  <Example>.c
  build.sh
  run.sh

Requirements:

- A system C compiler available through the command "cc".
- libusb-1.0.so.0 must be installed on the system.
- To access the USB device without root privileges, a udev rule for
  VID 19D1 / PID 0011 must be installed.

No IDE, CMake, Makefile, or TIFF library is required. SaveTIFF writes the
uncompressed 16-bit TIFF file directly.

Build all examples:

  chmod +x build_all.sh clean_all.sh
  ./build_all.sh

Build and run a single example:

  cd OpenCloseDevice
  ./build.sh
  ./run.sh

The executable files contain the following relative runtime library path:

  $ORIGIN/../Lib

Therefore, LD_LIBRARY_PATH does not need to be set and the shared library
does not need to be copied to /usr/lib. However, the package directory
structure must remain unchanged.

Check the shared-library resolution, for example:

  ldd ./OpenCloseDevice/OpenCloseDevice

The output should include entries similar to:

  libusblismpi2664.so.2 => .../Lib/libusblismpi2664.so.2
  libusb-1.0.so.0       => /lib/.../libusb-1.0.so.0

Important notes:

- The programs use the legacy API and therefore operate with exactly one
  USB LISM-PI26xx interface at a time.
- The IFConfig, ModeConfig, IntegrationTime, LineRate, TriggerOutput, and
  ADCSettings examples modify hardware parameters.
- The sensor-specific constants in IntegrationTime and LineRate match the
  Lazarus examples and must be adjusted when using a different sensor.
- SaveTIFF is preconfigured for 2048 x 2048 pixels and creates frame.tiff
  in the SaveTIFF directory.
