This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
flink_lib [2015/02/26 15:08] – [Overview] ursgraf | flink_lib [2020/06/26 14:22] (current) – [Building for a different platform architecture] ursgraf | ||
---|---|---|---|
Line 5: | Line 5: | ||
</ | </ | ||
- | 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:// | + | 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 ===== | ===== Overview ===== | ||
<box green right 38% | **Examples**> | <box green right 38% | **Examples**> | ||
- | * [[.: | + | * [[.: |
* [[.: | * [[.: | ||
</ | </ | ||
Line 26: | Line 26: | ||
===== Building ===== | ===== Building ===== | ||
- | - Clone git repository: < | + | - Clone git repository |
+ | cd flinklib | ||
+ | git submodule init | ||
+ | git submodule update | ||
+ | </ | ||
+ | - Checkout a stable version< | ||
- Create a build directory: < | - Create a build directory: < | ||
- | - Change to the build directory and setup your build environment with CMake: < | + | - Change to the build directory and setup your build environment with CMake: < |
- Build the source code: < | - Build the source code: < | ||
===== Building for a different platform architecture ===== | ===== Building for a different platform architecture ===== | ||
- | - Clone git repository: < | + | - Clone git repository |
+ | cd flinklib | ||
+ | git submodule init | ||
+ | git submodule update</ | ||
+ | - Checkout a branch < | ||
- Create a build directory for the target platform, e.g.: < | - Create a build directory for the target platform, e.g.: < | ||
- Create a CMake toolchain file. For more informations, | - Create a CMake toolchain file. For more informations, | ||
Line 51: | Line 60: | ||
Here, the second subdevice is selected. You could also select a subdevice by its uniqe id. < | Here, the second subdevice is selected. You could also select a subdevice by its uniqe id. < | ||
Here, the subdevice with '' | 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. | + | Now you can 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, | 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. | This sets channel 0 to output and writes a logical 0.As a last step you have to close the device. | ||
< | < | ||
- |