[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

The more characters that are processed in each I/O request, the higher the
total throughput of the device.  The following technique will minimize
device overhead for reads:

   *  Use the SDCMD_QUERY command to get the number of characters currently
      in the buffer (see the devices/serial.h Autodocs for information on
      SDCMD_QUERY).

   *  Use DoIO() to read all available characters (or the maximum size of
      your buffer).  In this case, DoIO() is guaranteed to return without
      waiting.

   *  If zero characters are in the buffer, post an asynchronous request
      (SendIO()) for 1 character.  When at least one is ready, the device
      will return it.  Now go back to the first step.

   *  If the user decides to quit the program, AbortIO() any pending
      requests.