Sample Programs

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

■BusMaster transfer function

■Demo Device Control Sample