USB serial update

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2219 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-11-04 14:54:12 +00:00
parent 041200d562
commit b7511eacdb
2 changed files with 55 additions and 30 deletions

View File

@ -332,6 +332,8 @@ examples/uip
examples/usbserial
^^^^^^^^^^^^^^^^^^
TARGET CONFIGURATION:
This is another implementation of "Hello, World" but this one uses
a USB serial driver. Configuration options can be used to simply
the test. These options include:
@ -345,13 +347,36 @@ examples/usbserial
CONFIG_EXAMPLES_USBSERIAL_ONLYBIG
Send only large, multi-packet messages. Default: Send large and small.
In additional to the target device-side example, there is also
a host-side application in this directory. It can be compiled under
Linux or Cygwin as follows:
If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
the example code will also manage the USB trace output. The amount of trace output
can be controlled using:
CONFIG_EXAMPLES_USBSERIAL_TRACEINIT
Show initialization events
CONFIG_EXAMPLES_USBSERIAL_TRACECLASS
Show class driver events
CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS
Show data transfer events
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER
Show controller events
CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS
Show interrupt-related events.
Error results are always shown in the trace output
HOST-SIDE TEST PROGRAM
In additional to the target device-side example, there is also a
host-side application in this directory. This host side application
must be executed on a Linux host in order to perform the USBSERIAL
test. The host application can be compiled under Linux (or Cygwin?)
as follows:
cd examples/usbserial
make -f Makefile.host TOPDIR=../../.
RUNNING THE TEST
This will generate a small program called 'host'. Usage:
1. Build the examples/usbserial target program and start the target.

View File

@ -159,7 +159,7 @@ static void show_usage(const char *progname, int exitcode)
int main(int argc, char **argv, char **envp)
{
struct termios tty;
#ifndef CONFIG_EXAMPLES_USBSERIAL_INONLY
#ifndef CONFIG_EXAMPLES_USBSERIAL_OUTONLY
ssize_t nbytes;
#endif
#ifdef COUNTER_NEEDED