Important: The information in this document is obsolete and should not be used for new development.
SCSIComplete
You use theSCSIComplete
function to complete a SCSI transaction.
FUNCTION SCSIComplete(VAR stat: Integer; VAR message: Integer; wait: LongInt): OSErr;
stat
- The low-order byte contains the status byte from the target device.
message
- The low-order byte contains the message byte from the target device.
wait
- The number of ticks to wait for the command to complete.
DESCRIPTION
TheSCSIComplete
function performs the tasks necessary to properly complete the current SCSI transaction and leave the bus in the bus free phase. This function must be called at the end of each SCSI transaction, even if the transaction does not complete successfully.The
SCSIComplete
function waits for the transaction to complete, and then returns one byte of status information and one byte of message information. If the transaction fails to complete within the number of ticks specified by thewait
parameter, the scCommErr result is returned.The
SCSIComplete
function uses a number of strategies to correct anomalous conditions on the SCSI bus and restore the bus into a known state. These include accepting arbitrary amounts of data sent by the target (and throwing this data away), and sending arbitrary data (bytes with the value of $EE) as requested by the target. The function returns the scComplPhaseErr result if either of these steps were necessary.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forSCSIComplete
are
Trap macro Selector _SCSIDispatch $0004 RESULT CODES
noErr 0 No error scCommErr 2 Communications error, operation timeout scPhaseErr X Phase error on the SCSI bus scComplPhaseErr 10 SCSI bus was not in status phase on entry to SCSIComplete
SEE ALSO
See "Using the SCSIComplete Function," beginning on page 3-21, for more information about this function.