Difference between revisions of "Example serial test"

From wiki.emacinc.com
Jump to: navigation, search
(Created page with "{{todo|InProgress(12.31.13-13:58->JG+)|Jgreene|project=oe 4,oe 5,jg,md,Review}} This is a guide to the <code>serial</code> C example project included in the EMAC OE SDK. This...")
 
Line 2: Line 2:
 
This is a guide to the <code>serial</code> C example project included in the EMAC OE SDK.
 
This is a guide to the <code>serial</code> C example project included in the EMAC OE SDK.
  
This is a simple backlight brightness control. It's written for the EMAC PPC-E7 and SoM-9307 but it will probably run on anything with a backlight. It implements a slider application in GTK+ that directly controls the backlight through its sysfs interface. It has been tested under Xfbdev/Matchbox.
+
This application sets up and tests asynchronous IO on a serial port using '''poll()''' and '''fasync()'''.
  
The <code>serial</code> project builds one executable: <code>serial</code>.
+
The <code>serial</code> project builds one executable: <code>serial_test</code>.
  
 
== Opening, Building and Uploading the Project Files ==
 
== Opening, Building and Uploading the Project Files ==
Line 25: Line 25:
  
 
==Usage and Behavior==
 
==Usage and Behavior==
 +
 +
<code>serial_test</code> performs an asynchronous IO test on the specified serial device using either '''poll''' or '''FASYNC''' mode. It performs the test, reports, test, report, etc. It will keep running until it is stopped manually via '''CTRL-C'''.
 +
 +
===Hardware Requirements===
 +
 +
It should run just fine on any device with a serial port.
 +
 +
===Using <code>serial_test</code>===
 +
 +
<code>./serial_test DEVICE -p|-a</code>
 +
 +
;DEVICE: The serial device to use
 +
;-p: Use poll() for asynchronous IO
 +
;-f: Use FASYNC mode for asynchronous IO

Revision as of 15:41, 31 December 2013

TODO: {{#todo:InProgress(12.31.13-13:58->JG+)|Jgreene|oe 4,oe 5,jg,md,Review}}

This is a guide to the serial C example project included in the EMAC OE SDK.

This application sets up and tests asynchronous IO on a serial port using poll() and fasync().

The serial project builds one executable: serial_test.

Opening, Building and Uploading the Project Files

1. Open the C/C++ editing perspective.

stub

2. Open the project files.

stub

3. Build the project.

stub

4. Upload the executables to the target system.

stub

Usage and Behavior

serial_test performs an asynchronous IO test on the specified serial device using either poll or FASYNC mode. It performs the test, reports, test, report, etc. It will keep running until it is stopped manually via CTRL-C.

Hardware Requirements

It should run just fine on any device with a serial port.

Using serial_test

./serial_test DEVICE -p|-a 
DEVICE
The serial device to use
-p
Use poll() for asynchronous IO
-f
Use FASYNC mode for asynchronous IO