We provide the basic usage and skill in the sample programs with source
code.
Because the sample programs are made as simply as possible, you need to
make good use of these for programming.
Folder structure
The following figure shows the structure of the folder in which API-DIO(LNX) is installed.
User Directory/contec/cdio
|
|________samples
|
|_______jp
|_______inc
Include
files
|_______gcc
gcc
version
| |_______console
Console
samples
| |_______console_curses
Console sample which used curses
|_______python
python
version
|_______console
Console
samples
The following figure shows the structure of folder in which the sample programs are stored by language.
console directory
|
|________BusMaster
| |________infinite
| |________input
| |________output
| |________sync
|________dicounte
|________inout
|________interrupt
|________trigger
|________democtrl
console_curses directory
|
|________BusMaster
|________infinite
|________input
|________output
|________sync
Please refer to the following links for details of each sample.
■Basic I/O function
It is necessary to add DioSet8255Mode function for board DIO-48D-LPE
and PIO-48D(LPCI)H, DIO-48D2-PCI, DIO-48DX-USB.
It is necessary to add DioDmSetDirection function for the board supporting
I/O direction change.
■BusMaster transfer function
The sample which used the curses library, and the sample which is
not used are prepared.
As for the sample which is using the curses library, the display is
legible.
However, the load of a system becomes high.
■Demo Device Control Sample