Program Interface Library Programming the ARINC Interface
CEI-100/CEI-200/CEI-x20 User’s Manual 59
gcc –o test my_test_program.c –lceix2032
This creates a program called test by compiling and linking the user
program my_test_program.c to the CEI-520/520A/620/820 build of the
CEI-x20 Application Program Interface library.
VxWorks support for the CEI-x20 boards is described in chapter 6.
Programming the ARINC Interface
Programming the board is simple. For a host application to run, you must
first initialize the board and load the firmware. This is done with a call to
the subroutine AR_LOADSLV that is described in a following section.
Next a host must set the characteristics of each transmit and receive
channel with multiple calls to AR_SET_CONFIG (see the enhanced
function AR_SETCHPARMS). Channel numbers are zero-based: the first
channel is channel zero. Then, a typical host application would call
AR_GO to start the interface processing ARINC data. It would then call
AR_PUTWORD and AR_GETWORD (see AR_GETBLOCK and
AR_PUTBLOCK) to send and receive ARINC data respectively. When
communication is complete, the host program may call AR_RESET to
suspend the interface processing ARINC data. Subsequently, the host
program could again call AR_GO to restart the interface.
AR_INIT_SLAVE may be invoked first to reset the slave queue pointers,
which flush out any remaining data in the queues.
Unlike the CEI-100/200 boards, all of the boards in the CEI-x20 family
support independent programming of each channel’s parameters. Further,
each channel may be reprogrammed at any time without affecting the
programming of any other channel, and without interfering with
transmission or reception of data on the other channels.
Refer to the AR_SET_PRELOAD_CONFIG documentation for special
programming considerations when using the CEI-x20 API in conjunction
with multiple processes and/or threads.
When calling the utility routines, it is important to verify for all routines
that return a status value that the returned status indicates success.
Otherwise, an important function may have failed and you may not
become aware of it until an inappropriate time.
The ARINC 561 software interface on the CEI-220 and the CEI-820 is
identical to the ARINC 429 interface. It appears as channel 4 to the
software (counting the first channel as channel zero). The transmit
configuration register isn’t used and only the WRAP bit is used in the
receive configuration register.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com