Difference between revisions of "Unit SCSI"

From Ultibo.org
Jump to: navigation, search
 
(11 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
----
 
----
 +
 +
'''Ultibo SCSI Interface unit'''
  
 
The SCSI interface unit is device non specific in that it implements only the SCSI protocol.
 
The SCSI interface unit is device non specific in that it implements only the SCSI protocol.
Line 28: Line 30:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI device type constants''' <code> SCSI_TYPE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI device type''' <code> SCSI_TYPE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 42: Line 44:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI device state constants''' <code> SCSI_STATE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI device state''' <code> SCSI_STATE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 56: Line 58:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI device flag constants''' <code> SCSI_FLAG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI device flag''' <code> SCSI_FLAG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 67: Line 69:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol message constants''' <code> SCSI_MESSAGE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol message''' <code> SCSI_MESSAGE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 158: Line 160:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol status constants''' <code> SCSI_STATUS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol status''' <code> SCSI_STATUS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 199: Line 201:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol sense key constants''' <code> SCSI_SENSE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol sense key''' <code> SCSI_SENSE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 249: Line 251:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol additional sense code constants''' <code> SCSI_ASC_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol additional sense code''' <code> SCSI_ASC_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 278: Line 280:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol additional sense code qualifier constants''' <code> SCSI_ASCQ_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol additional sense code qualifier''' <code> SCSI_ASCQ_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 317: Line 319:
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol command constants''' <code> SCSI_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI protocol command''' <code> SCSI_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 485: Line 487:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI command data constants''' <code> SCSI_COMMAND_MAX_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI command data''' <code> SCSI_COMMAND_MAX_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 496: Line 498:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI service action constants''' <code> SCSI_SAI_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI service action''' <code> SCSI_SAI_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 510: Line 512:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI inquiry data constants''' <code> SCSI_INQUIRY_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI inquiry data''' <code> SCSI_INQUIRY_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 521: Line 523:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI standard inquiry data constants''' <code> SCSI_STANDARD_INQUIRY_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI standard inquiry data''' <code> SCSI_STANDARD_INQUIRY_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 532: Line 534:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI inquiry peripheral device type constants''' <code> SCSI_DEVICE_TYPE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI inquiry peripheral device type''' <code> SCSI_DEVICE_TYPE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 597: Line 599:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI inquiry removable media bit constants''' <code> SCSI_REMOVABLE_MEDIA_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI inquiry removable media bit''' <code> SCSI_REMOVABLE_MEDIA_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 608: Line 610:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI request sense data constants''' <code> SCSI_REQUEST_SENSE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI request sense data''' <code> SCSI_REQUEST_SENSE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 619: Line 621:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI read capacity data constants''' <code> SCSI_READ_CAPACITY_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI read capacity data''' <code> SCSI_READ_CAPACITY_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 633: Line 635:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI read 10 data constants''' <code> SCSI_READ_10_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI read 10 data''' <code> SCSI_READ_10_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 644: Line 646:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI write 10 data constants''' <code> SCSI_WRITE_10_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI write 10 data''' <code> SCSI_WRITE_10_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 655: Line 657:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SCSI logging constants''' <code> SCSI_LOG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SCSI logging''' <code> SCSI_LOG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 667: Line 669:
 
| <code>SCSI_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 
| <code>SCSI_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 
| SCSI error messages
 
| SCSI error messages
 +
|-
 +
| <code>SCSI_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code>
 +
| SCSI warning messages
 
|-
 
|-
 
| <code>SCSI_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 
| <code>SCSI_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
Line 678: Line 683:
 
----
 
----
  
''To be documented''
+
 
 +
'''SCSI host enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TSCSIHostEnumerate = function(Host:PSCSIHost; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''SCSI host'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSIHost = ^TSCSIHost;</code>
 +
 
 +
<code>TSCSIHost = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| The Device entry for this Host
 +
|-
 +
|colspan="2"|''Host Properties''
 +
|-
 +
| <code>HostId:LongWord;</code>
 +
| Unique Id of this Host in the Host table
 +
|-
 +
| <code>HostState:LongWord;</code>
 +
| Host state (eg ?????)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Host lock
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PSCSIHost;</code>
 +
| Previous entry in Host table
 +
|-
 +
| <code>Next:PSCSIHost;</code>
 +
| Next entry in Host table
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''SCSI enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TSCSIEnumerate = function(SCSI:PSCSIDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''SCSI notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TSCSINotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''SCSI device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSIDevice = ^TSCSIDevice;</code>
 +
 
 +
<code>TSCSIDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| The Device entry for this SCSI
 +
|-
 +
|colspan="2"|''SCSI Properties''
 +
|-
 +
| <code>SCSIId:LongWord;</code>
 +
| Unique Id of this SCSI in the SCSI table
 +
|-
 +
| <code>SCSIState:LongWord;</code>
 +
| SCSI state (eg SCSI_STATE_INSERTED)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Vendor:PChar;</code>
 +
| SCSI Vendor
 +
|-
 +
| <code>Product:PChar;</code>
 +
| SCSI Product
 +
|-
 +
| <code>Revision:PChar;</code>
 +
| Firmware Revision
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PSCSIDevice;</code>
 +
| Previous entry in SCSI table
 +
|-
 +
| <code>Next:PSCSIDevice;</code>
 +
| Next entry in SCSI table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''SCSI command block'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSICommandBlock = ^TSCSICommandBlock;</code>
 +
 
 +
<code>TSCSICommandBlock = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Command:array[0..SCSI_COMMAND_MAX_SIZE - 1] of Byte;</code>
 +
| Command
 +
|-
 +
| <code>SenseData:array[0..63] of Byte;</code>
 +
| Request Sense
 +
|-
 +
| <code>Status:Byte;</code>
 +
| SCSI Status
 +
|-
 +
| <code>TargetID:Byte;</code>
 +
| Target ID
 +
|-
 +
| <code>TargetLUN:Byte;</code>
 +
| Target LUN
 +
|-
 +
| <code>CommandLength:Byte;</code>
 +
| Command Length
 +
|-
 +
| <code>DataLength:LongWord;</code>
 +
| Total Data Length
 +
|-
 +
| <code>Data:Pointer;</code>
 +
| Pointer to Data
 +
|-
 +
| <code>MessageOut:array[0..11] of Byte;</code>
 +
| Message out buffer
 +
|-
 +
| <code>MessageIn:array[0..11] of Byte;</code>
 +
| Message in buffer
 +
|-
 +
| <code>SenseCommandLength:Byte;</code>
 +
| Sense Command Length
 +
|-
 +
| <code>SenseDataLength:LongWord;</code>
 +
| Sense Data Length
 +
|-
 +
| <code>SenseCommand:array[0..5] of Byte;</code>
 +
| Sense Command
 +
|-
 +
| <code>ControllerStatus:LongWord;</code>
 +
| Controller Status
 +
|-
 +
| <code>TransferredBytes:LongWord;</code>
 +
| Transferred Bytes
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''SCSI standard inquiry data'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSIStandardInquiryData = ^TSCSIStandardInquiryData;</code>
 +
 
 +
<code>TSCSIStandardInquiryData = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DeviceType:Byte;</code>
 +
| Peripheral Device Type (Bits 4..0)
 +
|-
 +
| <code>RemovableMediaBit:Byte;</code>
 +
| Removable Media Bit (Bit 7) ($80)
 +
|-
 +
| <code>Version:Byte;</code>
 +
| ISO/ECMA/ANSI Version (ISO Bits 7..6)(ECMA Bits 5..3)(ANSI Bits 2..0)
 +
|-
 +
| <code>ResponseFormat:Byte;</code>
 +
| Response Data Format (Bits 3..0)
 +
|-
 +
| <code>AdditionalLength:Byte;</code>
 +
| Additional Length
 +
|-
 +
| <code>Reserved1:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Reserved2:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Vendor:array[0..7] of Char;</code>
 +
| Vendor Information
 +
|-
 +
| <code>Product:array[0..15] of Char;</code>
 +
| Product Identification
 +
|-
 +
| <code>Revision:array[0..3] of Char;</code>
 +
| Product Revision Level
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''SCSI request sense data'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSIRequestSenseData = ^TSCSIRequestSenseData;</code>
 +
 
 +
<code>TSCSIRequestSenseData = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>ErrorCode:Byte;</code>
 +
| Error Code (Bits 6..0) (Bit 7 is Valid bit)
 +
|-
 +
| <code>Reserved1:Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SenseKey:Byte;</code>
 +
| Sense Key (Bits 3..0)
 +
|-
 +
| <code>Information:LongWord;</code>
 +
| Information
 +
|-
 +
| <code>AdditionalLength:Byte;</code>
 +
| Additional Sense Length
 +
|-
 +
| <code>Reserved2:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ASC:Byte;</code>
 +
| Additional Sense Code
 +
|-
 +
| <code>ASCQ:Byte;</code>
 +
| Additional Sense Code Qualifier
 +
|-
 +
| <code>Reserved3:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''SCSI read capacity data'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSIReadCapacityData = ^TSCSIReadCapacityData;</code>
 +
 
 +
<code>TSCSIReadCapacityData = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>LastBlock:LongWord;</code>
 +
| Last Logical Block Address (Big Endian)
 +
|-
 +
| <code>BlockSize:LongWord;</code>
 +
| Block Length In Bytes (Big Endian)
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''SCSI read capacity 16 data'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PSCSIReadCapacity16Data = ^TSCSIReadCapacity16Data;</code>
 +
 
 +
<code>TSCSIReadCapacity16Data = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>LastBlock:Int64;</code>
 +
| Last Logical Block Address (Big Endian)
 +
|-
 +
| <code>BlockSize:LongWord;</code>
 +
| Block Length In Bytes (Big Endian)
 +
|-
 +
| <code>Reserved1:Byte;</code>
 +
| P_TYPE (Bits 3..1) PROT_EN (Bit 0)
 +
|-
 +
| <code>Reserved2:Byte;</code>
 +
| P_I_EXPONENT (Bitss 7..4) LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT (Bits 3..0
 +
|-
 +
| <code>Reserved3:Byte;</code>
 +
| TPE (Bit 7) TPRZ (Bit 6) LOWEST ALIGNED LOGICAL BLOCK ADDRESS (Bits 5..0)(Big Endian)
 +
|-
 +
| <code>Reserved4:Byte;</code>
 +
| LOWEST ALIGNED LOGICAL BLOCK ADDRESS (Bits 7..0)(Big Endian)
 +
|-
 +
| <code>Reserved5:array[0..15] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
 
 +
'''SCSI logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>SCSI_DEFAULT_LOG_LEVEL:LongWord = SCSI_LOG_LEVEL_DEBUG;</code>
 +
| style="width: 40%;"|Minimum level for SCSI messages. Only messages with level greater than or equal to this will be printed.
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>SCSI_LOG_ENABLED:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 697: Line 1,026:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 703: Line 1,032:
 
</div></div>
 
</div></div>
 
<br />
 
<br />
 +
 
'''SCSI functions'''
 
'''SCSI functions'''
  
Line 711: Line 1,041:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 723: Line 1,053:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 735: Line 1,065:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 747: Line 1,077:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 759: Line 1,089:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 771: Line 1,101:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 783: Line 1,113:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 795: Line 1,125:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 807: Line 1,137:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 819: Line 1,149:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new SCSI entry or nil if SCSI could not be created
 
| Pointer to new SCSI entry or nil if SCSI could not be created
 
|-
 
|-
Line 831: Line 1,161:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Size'''
+
! Size
 
| Size in bytes to allocate for new SCSI (Including the SCSI entry)
 
| Size in bytes to allocate for new SCSI (Including the SCSI entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new SCSI entry or nil if SCSI could not be created
 
| Pointer to new SCSI entry or nil if SCSI could not be created
 
|-
 
|-
Line 846: Line 1,176:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 858: Line 1,188:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 870: Line 1,200:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 882: Line 1,212:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 894: Line 1,224:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 906: Line 1,236:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 918: Line 1,248:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 930: Line 1,260:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 942: Line 1,272:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Host entry or nil if host could not be created
 
| Pointer to new Host entry or nil if host could not be created
 
|-
 
|-
Line 954: Line 1,284:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Size'''
+
! Size
 
| Size in bytes to allocate for new host (Including the host entry)
 
| Size in bytes to allocate for new host (Including the host entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Host entry or nil if host could not be created
 
| Pointer to new Host entry or nil if host could not be created
 
|-
 
|-
Line 969: Line 1,299:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 981: Line 1,311:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 993: Line 1,323:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,005: Line 1,335:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,017: Line 1,347:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''SCSI helper functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIGetCount:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current SCSI count</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIDeviceCheck(SCSI:PSCSIDevice):PSCSIDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied SCSI is in the SCSI table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SCSILog(Level:LongWord; SCSI:PSCSIDevice; const AText:String);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SCSILogInfo(SCSI:PSCSIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SCSILogWarn(SCSI:PSCSIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SCSILogError(SCSI:PSCSIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SCSILogDebug(SCSI:PSCSIDevice; const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIDeviceTypeToStorageType(DeviceType:Byte; Removable,Floppy:Boolean):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIHostGetCount:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current Host count</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIHostCheck(Host:PSCSIHost):PSCSIHost;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Host is in the host table</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''SCSI storage functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIStorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIStorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SCSIStorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 
| None documented
 
| None documented
 
|-
 
|-

Latest revision as of 03:36, 15 December 2022

Return to Unit Reference


Description


Ultibo SCSI Interface unit

The SCSI interface unit is device non specific in that it implements only the SCSI protocol.

Actual command transfer is performed by a device specific driver that implements the exact semantics of the device. eg USB Mass Storage devices use the SCSI protocol, the SCSI interface implements the protocol behaviour but the actual command transfer is handled by the USB storage driver.

Constants



[Expand]
SCSI specific constants SCSI_*


[Expand]
SCSI device type SCSI_TYPE_*


[Expand]
SCSI device state SCSI_STATE_*


[Expand]
SCSI device flag SCSI_FLAG_*


[Expand]
SCSI protocol message SCSI_MESSAGE_*


[Expand]
SCSI protocol status SCSI_STATUS_*


[Expand]
SCSI protocol sense key SCSI_SENSE_*


[Expand]
SCSI protocol additional sense code SCSI_ASC_*


[Expand]
SCSI protocol additional sense code qualifier SCSI_ASCQ_*


[Expand]
SCSI protocol command SCSI_COMMAND_*


[Expand]
SCSI command data SCSI_COMMAND_MAX_*


[Expand]
SCSI service action SCSI_SAI_*


[Expand]
SCSI inquiry data SCSI_INQUIRY_*


[Expand]
SCSI standard inquiry data SCSI_STANDARD_INQUIRY_*


[Expand]
SCSI inquiry peripheral device type SCSI_DEVICE_TYPE_*


[Expand]
SCSI inquiry removable media bit SCSI_REMOVABLE_MEDIA_*


[Expand]
SCSI request sense data SCSI_REQUEST_SENSE_*


[Expand]
SCSI read capacity data SCSI_READ_CAPACITY_*


[Expand]
SCSI read 10 data SCSI_READ_10_*


[Expand]
SCSI write 10 data SCSI_WRITE_10_*


[Expand]
SCSI logging SCSI_LOG_*


Type definitions



SCSI host enumeration callback

TSCSIHostEnumerate = function(Host:PSCSIHost; Data:Pointer):LongWord;

SCSI host

[Expand]

PSCSIHost = ^TSCSIHost;

TSCSIHost = record

SCSI enumeration callback

TSCSIEnumerate = function(SCSI:PSCSIDevice; Data:Pointer):LongWord;

SCSI notification callback

TSCSINotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

SCSI device

[Expand]

PSCSIDevice = ^TSCSIDevice;

TSCSIDevice = record

SCSI command block

[Expand]

PSCSICommandBlock = ^TSCSICommandBlock;

TSCSICommandBlock = record

SCSI standard inquiry data

[Expand]

PSCSIStandardInquiryData = ^TSCSIStandardInquiryData;

TSCSIStandardInquiryData = packed record

SCSI request sense data

[Expand]

PSCSIRequestSenseData = ^TSCSIRequestSenseData;

TSCSIRequestSenseData = packed record

SCSI read capacity data

[Expand]

PSCSIReadCapacityData = ^TSCSIReadCapacityData;

TSCSIReadCapacityData = packed record

SCSI read capacity 16 data

[Expand]

PSCSIReadCapacity16Data = ^TSCSIReadCapacity16Data;

TSCSIReadCapacity16Data = packed record


Public variables



SCSI logging

SCSI_DEFAULT_LOG_LEVEL:LongWord = SCSI_LOG_LEVEL_DEBUG; Minimum level for SCSI messages. Only messages with level greater than or equal to this will be printed.
SCSI_LOG_ENABLED:Boolean;


Function declarations



Initialization functions

[Expand]
procedure SCSIInit;
Description: To be documented


SCSI functions

[Expand]
function SCSIDeviceInquiry(SCSI:PSCSIDevice; var DeviceType,DeviceFlags:LongWord; var Vendor,Product,Revision:PChar):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceRequestSense(SCSI:PSCSIDevice; var SenseKey,ASC,ASCQ:Byte):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceReadCapacity(SCSI:PSCSIDevice; var BlockSize,BlockShift:LongWord; var BlockCount:Int64):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceTestUnitReady(SCSI:PSCSIDevice; var DeviceFlags:LongWord):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceRead10(SCSI:PSCSIDevice; Start:LongWord; Count:Word; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceWrite10(SCSI:PSCSIDevice; Start:LongWord; Count:Word; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceRead16(SCSI:PSCSIDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceWrite16(SCSI:PSCSIDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceTransport(SCSI:PSCSIDevice; Command:PSCSICommandBlock):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceCreate:PSCSIDevice;
Description: Create a new SCSI entry


[Expand]
function SCSIDeviceCreateEx(Size:LongWord):PSCSIDevice;
Description: Create a new SCSI entry


[Expand]
function SCSIDeviceDestroy(SCSI:PSCSIDevice):LongWord;
Description: Destroy an existing SCSI entry


[Expand]
function SCSIDeviceRegister(SCSI:PSCSIDevice):LongWord;
Description: Register a new SCSI in the SCSI table


[Expand]
function SCSIDeviceDeregister(SCSI:PSCSIDevice):LongWord;
Description: Deregister a SCSI from the SCSI table


[Expand]
function SCSIDeviceFind(SCSIId:LongWord):PSCSIDevice;
Description: To be documented


[Expand]
function SCSIDeviceFindByName(const Name:String):PSCSIDevice; inline;
Description: To be documented


[Expand]
function SCSIDeviceFindByDescription(const Description:String):PSCSIDevice; inline;
Description: To be documented


[Expand]
function SCSIDeviceEnumerate(Callback:TSCSIEnumerate; Data:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIDeviceNotification(SCSI:PSCSIDevice; Callback:TSCSINotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


[Expand]
function SCSIHostCreate:PSCSIHost;
Description: Create a new Host entry


[Expand]
function SCSIHostCreateEx(Size:LongWord):PSCSIHost;
Description: Create a new Host entry


[Expand]
function SCSIHostDestroy(Host:PSCSIHost):LongWord;
Description: Destroy an existing Host entry


[Expand]
function SCSIHostRegister(Host:PSCSIHost):LongWord;
Description: Register a new Host in the Host table


[Expand]
function SCSIHostDeregister(Host:PSCSIHost):LongWord;
Description: Deregister a Host from the Host table


[Expand]
function SCSIHostFind(HostId:LongWord):PSCSIHost;
Description: To be documented


[Expand]
function SCSIHostEnumerate(Callback:TSCSIHostEnumerate; Data:Pointer):LongWord;
Description: To be documented


SCSI helper functions

[Expand]
function SCSIGetCount:LongWord;
Description: Get the current SCSI count


[Expand]
function SCSIDeviceCheck(SCSI:PSCSIDevice):PSCSIDevice;
Description: Check if the supplied SCSI is in the SCSI table


[Expand]
procedure SCSILog(Level:LongWord; SCSI:PSCSIDevice; const AText:String);
Description: To be documented


[Expand]
procedure SCSILogInfo(SCSI:PSCSIDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure SCSILogWarn(SCSI:PSCSIDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure SCSILogError(SCSI:PSCSIDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure SCSILogDebug(SCSI:PSCSIDevice; const AText:String); inline;
Description: To be documented


[Expand]
function SCSIDeviceTypeToStorageType(DeviceType:Byte; Removable,Floppy:Boolean):LongWord;
Description: To be documented


[Expand]
function SCSIHostGetCount:LongWord;
Description: Get the current Host count


[Expand]
function SCSIHostCheck(Host:PSCSIHost):PSCSIHost;
Description: Check if the supplied Host is in the host table


SCSI storage functions

[Expand]
function SCSIStorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIStorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented


[Expand]
function SCSIStorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: To be documented


Return to Unit Reference