<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.emacinc.com/index.php?action=history&amp;feed=atom&amp;title=Example_serial</id>
	<title>Example serial - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.emacinc.com/index.php?action=history&amp;feed=atom&amp;title=Example_serial"/>
	<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Example_serial&amp;action=history"/>
	<updated>2026-05-30T05:18:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Example_serial&amp;diff=15112&amp;oldid=prev</id>
		<title>Nperkins at 19:21, 30 November 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Example_serial&amp;diff=15112&amp;oldid=prev"/>
		<updated>2022-11-30T19:21:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:21, 30 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot; &gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Alternatively, the &amp;lt;code&amp;gt;CMakefile.txt&amp;lt;/code&amp;gt; can be used with the &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; command from the commandline to build and upload the example.&amp;#160; For information on this method, please see [[Getting_Started_with_the_EMAC_OE_SDK#Target_Machine_Compiling | Getting Started with the EMAC OE SDK]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Alternatively, the &amp;lt;code&amp;gt;CMakefile.txt&amp;lt;/code&amp;gt; can be used with the &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; command from the commandline to build and upload the example.&amp;#160; For information on this method, please see [[Getting_Started_with_the_EMAC_OE_SDK#Target_Machine_Compiling | Getting Started with the EMAC OE SDK]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Code can be found at http://git.emacinc.com/OE/example-projects&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Usage and Behavior==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Usage and Behavior==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nperkins</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Example_serial&amp;diff=14481&amp;oldid=prev</id>
		<title>Btisler: Renamed page to match 0E5 SDK projects</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Example_serial&amp;diff=14481&amp;oldid=prev"/>
		<updated>2020-09-25T16:27:18Z</updated>

		<summary type="html">&lt;p&gt;Renamed page to match 0E5 SDK projects&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{todo|SEOKWREV (12.31.13-14:56-&amp;gt;JG+);(1.2.14-11:20-&amp;gt;MD+);(1.2.14-15:35-&amp;gt;MG+);(04.07.14-10:00-&amp;gt;BS+);(04.10.14-11:20-&amp;gt;BS+)|Jgreene|project=oe 4,oe 5,jg,md,SEOKWREV,mg,bs}}&lt;br /&gt;
&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=serial test&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=Serial Test,Serial Port,Asynchronous&lt;br /&gt;
|description=This is a guide to the &amp;lt;code&amp;gt;serial&amp;lt;/code&amp;gt; C example project included in the EMAC OE SDK.&lt;br /&gt;
}}&lt;br /&gt;
This is a guide to the &amp;lt;code&amp;gt;serial&amp;lt;/code&amp;gt; C example project included in the EMAC OE SDK.&lt;br /&gt;
&lt;br /&gt;
This application sets up and tests asynchronous IO on a serial port using '''poll()''' and '''fasync()'''.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;serial&amp;lt;/code&amp;gt; project builds one executable: &amp;lt;code&amp;gt;serial_test&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Opening, Building and Uploading the Project Files ==&lt;br /&gt;
&lt;br /&gt;
For information on opening the project from within Eclipse, please see [[Importing the EMAC OE SDK Projects with Eclipse]].  Then, follow [[Using the EMAC OE SDK Projects with Eclipse]] for information on how to build, upload and execute the example.&lt;br /&gt;
&lt;br /&gt;
Alternatively, the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; can be used with the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command from the commandline to build and upload the example.  For information on this method, please see [[Using EMAC OE SDK Example Projects]].&lt;br /&gt;
&lt;br /&gt;
====EMAC SDK 5.X====&lt;br /&gt;
&lt;br /&gt;
For information on opening the project from within QtCreator, please see [[Getting_Started_With_Qt_Creator#Adding_Source_Files | QtCreator: Adding Source Files]].  Then, follow [[Getting Started With Qt Creator]] for information on how to build, upload and execute the example.&lt;br /&gt;
&lt;br /&gt;
Alternatively, the &amp;lt;code&amp;gt;CMakefile.txt&amp;lt;/code&amp;gt; can be used with the &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt; command from the commandline to build and upload the example.  For information on this method, please see [[Getting_Started_with_the_EMAC_OE_SDK#Target_Machine_Compiling | Getting Started with the EMAC OE SDK]].&lt;br /&gt;
&lt;br /&gt;
==Usage and Behavior==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;serial_test&amp;lt;/code&amp;gt; performs an asynchronous IO test on the specified serial device using either '''poll''' or '''FASYNC''' mode. It performs the test, reports, tests, report, etc. It will keep running until it is stopped manually via '''CTRL-C'''.&lt;br /&gt;
&lt;br /&gt;
===Hardware Requirements===&lt;br /&gt;
&lt;br /&gt;
It should run just fine on any device with a serial port. &lt;br /&gt;
&lt;br /&gt;
===Using &amp;lt;code&amp;gt;serial_test&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;./serial_test DEVICE -[p] [-f]&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;DEVICE: The serial device to use&lt;br /&gt;
;-p: Use '''poll''' mode for asynchronous IO&lt;br /&gt;
;-f: Use '''FASYNC''' mode for asynchronous IO&lt;br /&gt;
&lt;br /&gt;
===Usage Example: Test asynchronous IO using the '''poll''' mode===&lt;br /&gt;
&lt;br /&gt;
Perform the test on device &amp;lt;code&amp;gt;/dev/ttyS1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@som9g20:/tmp# ./serial_test /dev/ttyS1 -p&lt;br /&gt;
Testing on /dev/ttyS1 using poll() &lt;br /&gt;
Received: : 21&lt;br /&gt;
Received: : 11&lt;br /&gt;
Received: : 6&lt;br /&gt;
Received: : 2&lt;br /&gt;
Received: : 1&lt;br /&gt;
Received: : 1&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
Received: : 1&lt;br /&gt;
Received: : 1&lt;br /&gt;
Received: : 1&lt;br /&gt;
^C&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hit CTRL-C to stop testing. In this example, no errors were reported.&lt;br /&gt;
&lt;br /&gt;
===Usage Example. Test asynchronous IO using the '''FASYNC''' mode===&lt;br /&gt;
&lt;br /&gt;
Perform the test on device &amp;lt;code&amp;gt;/dev/ttyS1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@som9g20:/tmp# ./serial_test /dev/ttyS1 -f&lt;br /&gt;
Testing on /dev/ttyS1 using FASYNC &lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 21&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 11&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 6&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 2&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 1&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 1&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 1&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 1&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 1&lt;br /&gt;
Received SIGIO signal.&lt;br /&gt;
: : 1&lt;br /&gt;
^C&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hit CTRL-C to stop testing. In this example, no errors were reported.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;serial&amp;lt;/code&amp;gt; C example project application performs an asynchronous IO test on the specified serial device using either '''poll''' or '''FASYNC''' mode.&lt;/div&gt;</summary>
		<author><name>Btisler</name></author>
		
	</entry>
</feed>