The serial tests, Serial filter usage – Comtrol eCos User Manual
Page 386
Chapter 17. How to Write a Driver
DUPLEX_ECHO
(serial driver duplex receive and send test) Smaller packets of data are sent back and forth in a pattern
that ensures that the serial driver will be both sending and receiving at the same time. Again, checksums
are computed and verified resulting in PASS/FAIL.
TEXT
This is a test of the text translations in the TTY layer. Requests a transfer of text data from the target to
the filter and possibly back again. The filter treats this as a binary transfer, while the target ma be doing
translations on the data. The target provides the filter with checksums for what it should expect to see. This
test is not implemented yet.
The above commands may be extended, and new commands added, as required to test (new) parts of the serial
drivers in eCos.
The Serial Tests
The serial tests are built as any other eCos test. After running the make tests command, the tests can be found in
install/tests/io_serial/
serial1
A simple API test.
serial2
A simple serial send test. It writes out two strings, one raw and one encoded as a GDB O-packet
serial3
[ requires the serial filter ]
This tests the half-duplex send and receive capabilities of the serial driver.
serial4
[ requires the serial filter ]
This test attempts to use a few different serial configurations, testing the driver’s configuration/setup function-
ality.
serial5
[ requires the serial filter ]
This tests the duplex send and receive capabilities of the serial driver.
All tests should complete in less than 30 seconds.
Serial Filter Usage
Running the ser_filter program with no (or wrong) arguments results in the following output:
Usage: ser_filter [-t -S] TcpIPport SerialPort BaudRate
or: ser_filter -n [-t -S] SerialPort BaudRate
-t: Enable tracing.
-S: Output data read from serial line.
282