Difference between revisions of "Example serport212"
Line 4: | Line 4: | ||
This application is a SOM212ES serial combo port configuration tool. It can set the configuration of the serial combo port on a SOM212ES carrier board to mode '''RS-232''', '''RS-422''' or '''RS-485'''. It can also get the current serial port configuration, reporting it to the console. | This application is a SOM212ES serial combo port configuration tool. It can set the configuration of the serial combo port on a SOM212ES carrier board to mode '''RS-232''', '''RS-422''' or '''RS-485'''. It can also get the current serial port configuration, reporting it to the console. | ||
− | Also included in the project directory is a BASH version of this tool: <code>serport212. | + | Also included in the project directory is a BASH version of this tool: <code>serport212.sh</code>. It performs the same functions and takes the same command parameters as the C executable version. |
The <code>serport212</code> project builds one executable: <code>serport212</code>. | The <code>serport212</code> project builds one executable: <code>serport212</code>. |
Revision as of 13:41, 2 January 2014
This is a guide to the serport212
C example project included in the EMAC OE SDK.
This application is a SOM212ES serial combo port configuration tool. It can set the configuration of the serial combo port on a SOM212ES carrier board to mode RS-232, RS-422 or RS-485. It can also get the current serial port configuration, reporting it to the console.
Also included in the project directory is a BASH version of this tool: serport212.sh
. It performs the same functions and takes the same command parameters as the C executable version.
The serport212
project builds one executable: serport212
.
Contents
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
serport212
gets or sets the configuration of the serial combo port on a SOM212ES carrier board.
Hardware Requirements
The serport212
C example project must be run on a SOM212ES carrier board.
Using serport212
./serport212 [-s CONFIG]
Where CONFIG is a valid serial port configuration specification: 232, 422 or 485
Options:
<no options> | Get serial port configuration |
(--set) -s [232, 422 or 485] | Set serial port configuration |
(--help) -h | Print help message |
(--version) -v | Print version |
Usage Example. Setting the Configuration of the SOM212ES Serial Combo Port
som9g45:/tmp# ./serport212 -s 232
...the configuration of the SOM212ES serial combo port is now set to RS-232 mode.
Usage Example. Getting the Configuration of the SOM212ES Serial Combo Port
som9g45:/tmp# ./serport212
RS-232
...serport212 reports that the SOM212ES serial combo port is set to RS-232 mode.
Summary
The serport212 application is a SOM212ES serial combo port configuration tool. It sets or gets the configuration of the serial combo port on a SOM212ES carrier board.