[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().