Difference between revisions of "Example atod"
(→What atod_test does) |
|||
Line 27: | Line 27: | ||
<br clear=all> | <br clear=all> | ||
+ | ====3. Build it==== | ||
− | + | '''This is intentionally left blank pending new build system.''' | |
− | |||
− | |||
− | |||
====What it does==== | ====What it does==== | ||
Line 37: | Line 35: | ||
''atod_test'' reads all channels of an indexed atod device and outputs the results to the terminal. | ''atod_test'' reads all channels of an indexed atod device and outputs the results to the terminal. | ||
− | Usage: indexed_atod_test DEVICE CHANNELS | + | Usage: indexed_atod_test DEVICE CHANNELS<br /> |
i.e. : ./indexed_atod_test /dev/indexed_atod 4 | i.e. : ./indexed_atod_test /dev/indexed_atod 4 | ||
− | From the comments in <code>index_atod_test.c</code> | + | ''From the comments in <code>index_atod_test.c</code>'' |
− | Example application for reading all channels of an indexed atod device | + | Example application for reading all channels of an indexed atod device |
− | on EMAC OE Linux. Examples of this type of device are the processor | + | on EMAC OE Linux. Examples of this type of device are the processor |
− | AtoDs on the SoM-9260/9G20 and the IPAC-9302 and the mcp3208 external | + | AtoDs on the SoM-9260/9G20 and the IPAC-9302 and the mcp3208 external |
− | AtoD devices on the SoM-150ES carrier (through the /dev/mcp3208-gpio | + | AtoD devices on the SoM-150ES carrier (through the /dev/mcp3208-gpio |
− | device. This interface uses the EMAC ioex class to provide a GPIO-like | + | device. This interface uses the EMAC ioex class to provide a GPIO-like |
− | device where each channel can be read directly.(see also the egpc project). | + | device where each channel can be read directly.(see also the egpc project). |
Revision as of 12:55, 13 November 2013
This procedure provides an overview of how to compile and run the atod_test C example project. It assumes familiarity with the C programming language and is intended to be used by experienced programmers who are looking to learn the EMAC SDK.
Contents
1. Open the C/C++ editing perspective
From the Eclipse menubar select Window->Open Perspective->Other...
Select C/C++ and click OK.
2. Open the atod_test project
From the Eclipse menubar select File->New->Makefile Project With Existing Code...
Click the Browse button and navigate to the directory of the atod_test example project.
The atod_test example project source can be found in the projects/ subdirectory of the EMAC OE SDK root directory. The full path is:
/path/to/sdk/EMAC-OE-arm-linux-gnueabi-SDK_4.0/projects/atod_test/
After you have successfully specified the path to the atod_test project directory, click Finish.
3. Build it
This is intentionally left blank pending new build system.
What it does
atod_test reads all channels of an indexed atod device and outputs the results to the terminal.
Usage: indexed_atod_test DEVICE CHANNELS
i.e. : ./indexed_atod_test /dev/indexed_atod 4
From the comments in index_atod_test.c
Example application for reading all channels of an indexed atod device on EMAC OE Linux. Examples of this type of device are the processor AtoDs on the SoM-9260/9G20 and the IPAC-9302 and the mcp3208 external AtoD devices on the SoM-150ES carrier (through the /dev/mcp3208-gpio device. This interface uses the EMAC ioex class to provide a GPIO-like device where each channel can be read directly.(see also the egpc project).