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

Device Command   Operation
--------------   ---------
CMD_CLEAR        Reset the serial port's read buffer pointers.

CMD_FLUSH        Purge all queued requests for the serial device (does not
                 affect active requests).

CMD_READ         Read a stream of characters from the serial port buffer.
                 The number of characters can be specified or a
                 termination character(s) used.

CMD_RESET        Reset the serial port to its initialized state.  All
                 active and queued I/O requests will be aborted and the
                 current buffer will be released.

CMD_START        Restart all paused I/O over the serial port.  Also sends
                 an "xON".

CMD_STOP         Pause all active I/O over the serial port.  Also sends an
                 "xOFF".

CMD_WRITE        Write out a stream of characters to the serial port.  The
                 number of characters can be specified or a
                 NULL-terminated string can be sent.

SDCMD_BREAK      Send a break signal out the serial port.  May be done
                 immediately or queued. Duration of the break (in
                 microseconds) can be set by the application.

SDCMD_QUERY      Return the status of the serial port lines and registers,
                 and the number of bytes in the serial port's read buffer.

SDCMD_SETPARAMS  Set the parameters of the serial port.  This ranges from
                 baud rate to number of microseconds a break will last.


Exec Functions as Used in This Chapter
--------------------------------------
AbortIO()        Abort a command to the serial device. If the command is
                 in progress, it is stopped immediately.  If it is queued,
                 it is removed from the queue.

BeginIO()         Initiate a command and return immediately (asynchronous
                 request).  This is used to minimize the amount of system
                 overhead.

CheckIO()        Determine the current state of an I/O request.

CloseDevice()    Relinquish use of the serial device.  All requests must
                 be complete.

DoIO()           Initiate a command and wait for completion (synchronous
                 request).

OpenDevice()     Obtain use of the serial device.

SendIO()         Initiate a command and return immediately (asynchronous
                 request).

WaitIO()         Wait for the completion of an asynchronous request. When
                 the request is complete the message will be removed from
                 your reply port.


Exec Support Functions as Used in This Chapter
----------------------------------------------
CreateExtIO()    Create an extended I/O request structure of type
                 IOExtSer.  This structure will be used to communicate
                 commands to the serial device.

CreatePort()     Create a signal message port for reply messages from the
                 serial device.  Exec will signal a task when a message
                 arrives at the port.

DeleteExtIO()    Delete an extended I/O request structure created by
                 CreateExtIO().

DeletePort()     Delete the message port created by CreatePort().