home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / parallel.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  9.5 KB  |  282 lines

  1. TABLE OF CONTENTS
  2.  
  3. parallel.device/CMD_CLEAR
  4. parallel.device/CMD_FLUSH
  5. parallel.device/CMD_READ
  6. parallel.device/CMD_RESET
  7. parallel.device/CMD_START
  8. parallel.device/CMD_STOP
  9. parallel.device/CMD_WRITE
  10. parallel.device/OpenDevice
  11. parallel.device/PDCMD_QUERY
  12. parallel.device/PDCMD_SETPARAMS
  13.  
  14.  
  15. parallel.device/CMD_CLEAR                          parallel.device/CMD_CLEAR
  16.  
  17.    NAME
  18.        Clear -- clear the parallel port buffer
  19.  
  20.    FUNCTION
  21.        This command just RTS's (no buffer to clear)
  22.  
  23.    IO REQUEST
  24.        io_Message      mn_ReplyPort initialized
  25.        io_Device       set by OpenDevice
  26.        io_Unit         set by OpenDevice
  27.        io_Command      CMD_CLEAR (05)
  28.  
  29.  
  30. parallel.device/CMD_FLUSH                          parallel.device/CMD_FLUSH
  31.  
  32.    NAME
  33.        Flush -- clear all queued I/O requests for the parallel port
  34.  
  35.    FUNCTION
  36.        This command purges the read and write request queues for the
  37.        parallel device. 
  38.  
  39.    IO REQUEST
  40.        io_Message      mn_ReplyPort initialized
  41.        io_Device       set by OpenDevice
  42.        io_Unit         set by OpenDevice
  43.        io_Command      CMD_FLUSH (08)
  44.  
  45.  
  46. parallel.device/CMD_READ                            parallel.device/CMD_READ
  47.  
  48.    NAME
  49.        Read -- read input from parallel port
  50.  
  51.    FUNCTION
  52.        This command causes a stream of characters to be read from the
  53.        parallel I/O register. The number of characters is specified in
  54.        io_Length.
  55.        The parallel.device has no internal buffer; if no read request has
  56.        been made, pending input (i.e. handshake request) is not
  57.        acknowledged.
  58.  
  59.    IO REQUEST
  60.        io_Message      mn_ReplyPort initialized
  61.        io_Device       set by OpenDevice
  62.        io_Unit         set by OpenDevice
  63.        io_Command      CMD_READ (02)
  64.        io_Flags        If IOF_QUICK is set, driver will attempt Quick IO
  65.        io_Length       number of characters to receive.
  66.        io_Data         pointer where to put the data.
  67.  
  68.    RESULTS
  69.        io_Error -- if the Read succeded, then io_Error will be null.
  70.            If the Read failed, then io_Error will contain an error code.
  71.  
  72.    SEE ALSO
  73.        parallel.device/PDCMD_SETPARAMS
  74.  
  75.  
  76. parallel.device/CMD_RESET                          parallel.device/CMD_RESET
  77.  
  78.    NAME
  79.        Reset -- reinitializes the parallel device
  80.  
  81.    FUNCTION
  82.        This command resets the parallel device to its freshly initialized
  83.        condition. It aborts all I/O requests both queued and current and
  84.        sets the devices's flags and parameters to their boot-up time 
  85.        default values.
  86.  
  87.    IO REQUEST
  88.        io_Message      mn_ReplyPort initialized
  89.        io_Device       set by OpenDevice
  90.        io_Unit         set by OpenDevice
  91.        io_Command      CMD_RESET (01)
  92.  
  93.    RESULTS
  94.        Error -- if the Reset succeded, then io_Error will be null.
  95.            If the Reset failed, then the io_Error will be non-zero.
  96.  
  97.  
  98. parallel.device/CMD_START                          parallel.device/CMD_START
  99.  
  100.    NAME
  101.        Start -- restart paused I/O over the parallel port
  102.  
  103.    FUNCTION
  104.        This command restarts the current I/O activity on the parallel
  105.        port by reactivating the handshaking sequence.
  106.  
  107.    IO REQUEST
  108.        io_Message      mn_ReplyPort initialized
  109.        io_Device       set by OpenDevice
  110.        io_Unit         set by OpenDevice
  111.        io_Command      CMD_START (07)
  112.  
  113.    SEE ALSO
  114.        parallel.device/CMD_STOP
  115.  
  116.  
  117. parallel.device/CMD_STOP                            parallel.device/CMD_STOP
  118.  
  119.    NAME
  120.        Stop -- pause current activity on the parallel device
  121.  
  122.    FUNCTION
  123.        This command halts the current I/O activity on the parallel
  124.        device by discontinuing the handshaking sequence.
  125.  
  126.    IO REQUEST
  127.        io_Message      mn_ReplyPort initialized
  128.        io_Device       set by OpenDevice
  129.        io_Unit         set by OpenDevice
  130.        io_Command      CMD_STOP (06)
  131.  
  132.    SEE ALSO
  133.        parallel.device/CMD_START
  134.  
  135.    BUGS
  136.     Using any other parallel.device command will restart IO.
  137.  
  138.  
  139. parallel.device/CMD_WRITE                          parallel.device/CMD_WRITE
  140.  
  141.    NAME
  142.        Write -- send output to parallel port
  143.  
  144.    FUNCTION
  145.        This command causes a stream of characters to be written to the
  146.        parallel output register. The number of characters is specified in
  147.        io_Length, unless -1 is used, in which case output is sent until
  148.        a zero byte in the data: note that this is independent of setting
  149.        EOFMODE in io_ParFlags and using the PTermArray to terminate the
  150.        write.
  151.  
  152.    IO REQUEST
  153.        io_Message      mn_ReplyPort initialized
  154.        io_Device       set by OpenDevice
  155.        io_Unit         set by OpenDevice
  156.        io_Command      CMD_WRITE (03)
  157.        io_Flags        If IOF_QUICK is set, driver will attempt Quick IO
  158.        io_Length       number of characters to transmit, or if set
  159.                        to -1 send until zero byte encountered
  160.        io_Data         pointer to block of data to transmit
  161.  
  162.    RESULTS
  163.        io_Error -- If the Write succeded, then io_Error will be null.
  164.             If the Write failed, then io_Error will contain an error code.
  165.  
  166.    SEE ALSO
  167.        parallel.device/PDCMD_SETPARAMS
  168.  
  169.  
  170. parallel.device/OpenDevice                        parallel.device/OpenDevice
  171.  
  172.    NAME
  173.        Open -- a request to open the parallel port
  174.  
  175.    SYNOPSIS
  176.        error = OpenDevice("parallel.device", unit, ioExtPar, flags)
  177.        D0                  A0                D0    A1        D1
  178.                   
  179.  
  180.    FUNCTION
  181.        This is an exec call that starts up the parallel.device.
  182.  
  183.        This function allows the requestor software access to the parallel
  184.        device.  Unless the shared-access bit (bit 5 of io_ParFlags) is
  185.        set, exclusive use is granted and no other access is allowed
  186.        until the owner closes the device.  The PTermArray of the ioExtPar
  187.        is initialized only if the EOFMODE bit is set in io_ParFlags.
  188.  
  189.    INPUTS
  190.        "parallel.device" - a pointer to literal string "parallel.device"
  191.        unit - Must be zero for future compatibility
  192.        ioExtPar - pointer to an IO Request block of structure IOExtPar
  193.      to be initialized by the Open routine.  (see devices/parallel.h for
  194.      definition) 
  195.      The io_ParFlags field must be set as desired (see shared-access
  196.      description, above).  Note that this is not a standard IO Request
  197.      structure.
  198.        flags - Must be zero for future compatibility
  199.  
  200.    RESULTS
  201.     d0 -- same as io_Error
  202.        io_Error -- if the Open succeded, then io_Error will be null.
  203.            If the Open failed, then io_Error will be non-zero.
  204.        
  205.    SEE ALSO
  206.        exec/CloseDevice
  207.  
  208.  
  209. parallel.device/PDCMD_QUERY                      parallel.device/PDCMD_QUERY
  210.  
  211.    NAME
  212.        Query -- query parallel port/line status
  213.  
  214.    FUNCTION
  215.        This command return the status of the parallel port lines and
  216.        registers. 
  217.  
  218.    IO REQUEST
  219.        io_Message      must have mn_ReplyPort initialized
  220.        io_Device       set by OpenDevice
  221.        io_Unit         set by OpenDevice
  222.        io_Command      PDCMD_QUERY (09)
  223.  
  224.    RESULTS
  225.        io_Status        BIT  ACTIVE  FUNCTION
  226.  
  227.                         0     high   printer busy toggle (offline)
  228.                         1     high   paper out
  229.                         2     high   printer selected on the A1000
  230.                                      printer selected & serial "Ring
  231.                                      Indicator" on the A500/A2000
  232.                                      Use care when making cables.
  233.                         3      -     read=0,write=1
  234.                       4-7            reserved
  235.  
  236.    BUGS
  237.     In a earlier version of this AutoDoc, BUSY and PSEL were reversed.
  238.     The function has always been correct.
  239.  
  240.  
  241. parallel.device/PDCMD_SETPARAMS              parallel.device/PDCMD_SETPARAMS
  242.  
  243.    NAME
  244.        SetParams -- change parameters for the parallel device
  245.  
  246.    FUNCTION
  247.        This command allows the caller to change parameters for the
  248.        parallel port device. It will disallow changes if any reads or
  249.        writes are active or queued.  The PARB_EOFMODE bit of io_ParFlags
  250.        controlls whether the io_PTermArray is to be used as an additional
  251.        termination criteria for reads and writes.  It may be set directly
  252.        without a call to SetParams, setting it here performs the
  253.        additional service of copying the PTermArray into the device
  254.        default array which is used as the initial array for subsequent
  255.        device opens. The Shared bit can be changed here, and overrides the
  256.        current device access mode set at OpenDevice time.
  257.  
  258.    IO REQUEST
  259.        io_Message      mn_ReplyPort initialized
  260.        io_Device       preset by OpenDevice
  261.        io_Unit         preset by OpenDevice
  262.        io_Command      PDCMD_SETPARAMS (0A)
  263.               NOTE that the following fields of your IORequest
  264.                        are filled by Open to reflect the parallel device's
  265.                        current configuration.
  266.        io_PExtFlags    must be set to zero, unless used
  267.        io_ParFlags     see definition in parallel.i or parallel.h
  268.               NOTE that x00 yields exclusive access, termarray
  269.                        inactive.
  270.        io_PTermArray   ASCII descending-ordered 8-byte array of
  271.                        termination characters. If less than 8 chars
  272.                        used, fill out array w/lowest valid value.
  273.                        Terminators are used only if EOFMODE bit of
  274.                        io_Parflags is set. (e.g. x512F040303030303 )
  275.                        This field is filled on OpenDevice only if the
  276.                        EOFMODE bit is set.
  277.  
  278.    RESULTS
  279.        io_Error -- if the SetParams succeded, then io_Error will be null.
  280.            If the SetParams failed, then io_Error will be non-zero.
  281.  
  282.