Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
| software:flink:flink_lib [2015-02-06 08:44] – graf | software:flink:flink_lib [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== flink Userspace Library ====== | ||
| - | |||
| - | <box blue right 38% | **Downloads**> | ||
| - | * [[https:// | ||
| - | </ | ||
| - | |||
| - | This is the user documentation for the flink userspace library in C. It provides a device and bus independent interface to the underlying driver modules. For more information about the inner workings see [[https:// | ||
| - | |||
| - | ===== Overview ===== | ||
| - | <box green right 38% | **Examples**> | ||
| - | * [[.: | ||
| - | * [[https:// | ||
| - | </ | ||
| - | When flink is used on a Linux based system the flink userspace library offers an simple interface to communicate with the underlying kernel modules. The userspace library is split in two parts. | ||
| - | * High-Level API: Interface to predefined subdevices, such as PWM or GPIO. | ||
| - | * Low-Level API: Can be used to access user-defined subdevices. | ||
| - | |||
| - | [{{ : | ||
| - | The library must be built for the desired target platform architecture. | ||
| - | |||
| - | ===== Requirements ===== | ||
| - | * Linux based operating system | ||
| - | * GCC 4.6 or newer | ||
| - | * CMake 2.8 or newer | ||
| - | * GNU make | ||
| - | |||
| - | ===== Building ===== | ||
| - | - Clone git repository: < | ||
| - | - Create a build directory: < | ||
| - | - Change to the build directory and setup your build environment with CMake: < | ||
| - | - Build the source code: < | ||
| - | |||
| - | ===== Building for a different platform architecture ===== | ||
| - | - Clone git repository: < | ||
| - | - Create a build directory for the target platform, e.g.: < | ||
| - | - Create a CMake toolchain file. For more informations, | ||
| - | - Change to the build directory and setup your build environment with CMake: < | ||
| - | - Build the source code: < | ||
| - | |||
| - | ===== Installation ===== | ||
| - | - Install the library and header files on your system: < | ||
| - | |||
| - | ===== Using a flink Device ===== | ||
| - | A flink device must be opened before use (see [[software: | ||
| - | < | ||
| - | As a next step one has to choose an appropriate subdevice. This could be done by | ||
| - | < | ||
| - | Here, the second subdevice is selected. You could also select a subdevice by its uniqe id. < | ||
| - | Here, the subdevice with '' | ||
| - | Now you cann communicate with this selected subdevice. Assuming that it's of type GPIO you could configure it as an input or output. | ||
| - | < | ||
| - | flink_dio_set_value(subdev, | ||
| - | This sets channel 0 to output and writes a logical 0.As a last step you have to close the device. | ||
| - | < | ||