Difference between revisions of "Unit Devices"
(14 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '''Ultibo Device | + | '''Ultibo Device Interface unit''' |
− | + | ||
− | + | ||
=== Constants === | === Constants === | ||
Line 31: | Line 29: | ||
| <code>DEVICE_SIGNATURE = $AD03FE3C;</code> | | <code>DEVICE_SIGNATURE = $AD03FE3C;</code> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <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;">'''Device name''' <code> DEVICE_*_LENGTH </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>DEVICE_NAME_LENGTH = SIZE_64;</code> | ||
+ | | Length of device name | ||
+ | |- | ||
+ | | <code>DEVICE_DESC_LENGTH = SIZE_128;</code> | ||
+ | | Length of device description | ||
|- | |- | ||
|} | |} | ||
Line 331: | Line 343: | ||
| <code>DEVICE_CLASS_GENERIC = 56;</code> | | <code>DEVICE_CLASS_GENERIC = 56;</code> | ||
| A Generic Device | | A Generic Device | ||
+ | |- | ||
+ | | <code>DEVICE_CLASS_VIRTIO = 57;</code> | ||
+ | | A VIRTIO Device (eg Block/Network/Memory/Console/Input etc) (Implementing a standard VIRTIO device interface) | ||
+ | |- | ||
+ | | <code>DEVICE_CLASS_BLUETOOTHHOST = 58;</code> | ||
+ | | A Bluetooth Host Controller (Implementing a standard Bluetooth host interface) | ||
+ | |- | ||
+ | | <code>DEVICE_CLASS_JOYSTICK = 59;</code> | ||
+ | | A Joystick or Gamepad Device | ||
+ | |- | ||
+ | | <code>DEVICE_CLASS_HID = 60;</code> | ||
+ | | A Human Interface Device (HID) | ||
|- | |- | ||
|colspan="2"| | |colspan="2"| | ||
|- | |- | ||
− | | <code>DEVICE_CLASS_MAX = | + | | <code>DEVICE_CLASS_MAX = 60;</code> |
| | | | ||
|- | |- | ||
Line 341: | Line 365: | ||
| <code>DEVICE_CLASS_ANY = $FFFFFFFF;</code> | | <code>DEVICE_CLASS_ANY = $FFFFFFFF;</code> | ||
| Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices) | | Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Device Class Names'' | ||
+ | |- | ||
+ | |colspan="2"|<code>DEVICE_CLASS_NAMES:array[DEVICE_CLASS_NONE..DEVICE_CLASS_MAX] of String = (</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_NONE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_USBHOST',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_PCIHOST',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_USB',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_PCI',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_NETWORK',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_STORAGE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_FILESYSTEM',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_PROTOCOL',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_KEYBOARD',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_MOUSE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_BLUETOOTH',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SERIAL',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_AUDIO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_VIDEO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SCSI',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_ATA',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_IMAGE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_PRINTER',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_COMMUNICATIONS',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SMART_CARD',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_MONITOR',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_DISPLAY',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_AUDIOVIDEO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_IRDA',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SPI',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_I2C',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_UART',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_MMC',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SD',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SDHCI',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_DFU',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_GPIO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_MAILBOX',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_OPENGL',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_DVB',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_DAB',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_DMA',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_SCSIHOST',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_ATAHOST',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_TIMER',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_RANDOM',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_FRAMEBUFFER',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_WATCHDOG',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_CLOCK',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_CONSOLE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_RTC',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_USBHUB',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_LOGGING',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_PCM',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_PWM',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_1WIRE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_CLOCK_MANAGER',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_CODEC',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_TOUCH',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_MEMORY',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_GENERIC',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_VIRTIO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_BLUETOOTHHOST',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_JOYSTICK',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DEVICE_CLASS_HID');</code> | ||
|- | |- | ||
|} | |} | ||
Line 422: | Line 574: | ||
</div></div> | </div></div> | ||
<br /> | <br /> | ||
+ | <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;">'''Firmware name''' <code> FIRMWARE_NAME_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FIRMWARE_NAME_LENGTH = SIZE_256;</code> | ||
+ | | Length of firmware name | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <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;">'''Firmware actions''' <code> FIRMWARE_ACTION_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_NONE = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_SIZE = 1;</code> | ||
+ | | Return the size in bytes of the firmware item | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_OPEN = 2;</code> | ||
+ | | Open the firmware item and return a handle | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_READ = 3;</code> | ||
+ | | Read from the firmware item specified by a given handle | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_SEEK = 4;</code> | ||
+ | | Seek to a location in the firmware item specified by a given handle | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_CLOSE = 5;</code> | ||
+ | | Close a handle to the firmware item | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_ACQUIRE = 6;</code> | ||
+ | | Acquire a memory block containing the firmware item | ||
+ | |- | ||
+ | | <code>FIRMWARE_ACTION_RELEASE = 7;</code> | ||
+ | | Release a memory block containing the firmware item | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <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;">'''Firmware constants''' <code> FIRMWARE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>FIRMWARE_WAIT_DELAY = 100;</code> | ||
+ | | Delay between retries for firmware while waiting for timeout (Milliseconds) | ||
+ | |- | ||
+ | | <code>FIRMWARE_MAX_BUFFER = SIZE_4M;</code> | ||
+ | | Maximum size buffer able to be allocated for firmware by acquire | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <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;">'''Notifier signature''' <code> NOTIFIER_SIGNATURE_* </code></div> | <div style="font-size: 14px; padding-left: 12px;">'''Notifier signature''' <code> NOTIFIER_SIGNATURE_* </code></div> | ||
Line 505: | Line 714: | ||
| <code>DRIVER_SIGNATURE = $1EB4980A;</code> | | <code>DRIVER_SIGNATURE = $1EB4980A;</code> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <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;">'''Driver name''' <code> DRIVER_NAME_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>DRIVER_NAME_LENGTH = SIZE_64;</code> | ||
+ | | Length of driver name | ||
|- | |- | ||
|} | |} | ||
Line 558: | Line 778: | ||
| <code>DRIVER_CLASS_BLUETOOTH = 4;</code> | | <code>DRIVER_CLASS_BLUETOOTH = 4;</code> | ||
| A Bluetooth Driver (Implementing a standard Bluetooth driver interface) | | A Bluetooth Driver (Implementing a standard Bluetooth driver interface) | ||
+ | |- | ||
+ | | <code>DRIVER_CLASS_VIRTIO = 5;</code> | ||
+ | | A VIRTIO Driver (Implementing a standard VIRTIO driver interface) | ||
+ | |- | ||
+ | | <code>DRIVER_CLASS_HID = 6;</code> | ||
+ | | A Human Interface Device (HID) Driver (Implementing a standard HID driver interface) | ||
|- | |- | ||
|colspan="2"| | |colspan="2"| | ||
|- | |- | ||
− | | <code>DRIVER_CLASS_MAX = | + | | <code>DRIVER_CLASS_MAX = 6;</code> |
| | | | ||
|- | |- | ||
Line 568: | Line 794: | ||
| <code>DRIVER_CLASS_ANY = $FFFFFFFF;</code> | | <code>DRIVER_CLASS_ANY = $FFFFFFFF;</code> | ||
| Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers) | | Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Driver Class Names'' | ||
+ | |- | ||
+ | |colspan="2"|<code>DRIVER_CLASS_NAMES:array[DRIVER_CLASS_NONE..DRIVER_CLASS_MAX] of String = (</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_NONE',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_USB',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_PCI',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_SDIO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_BLUETOOTH',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_VIRTIO',</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>'DRIVER_CLASS_HID');</code> | ||
|- | |- | ||
|} | |} | ||
Line 590: | Line 836: | ||
| <code>HOST_SIGNATURE = $F45D30FE;</code> | | <code>HOST_SIGNATURE = $F45D30FE;</code> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <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;">'''Host name''' <code> HOST_NAME_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HOST_NAME_LENGTH = SIZE_64;</code> | ||
+ | | Length of host name | ||
|- | |- | ||
|} | |} | ||
Line 1,038: | Line 1,295: | ||
| Device state (eg Registered/Unregistered) | | Device state (eg Registered/Unregistered) | ||
|- | |- | ||
− | | <code>DeviceName: | + | | <code>DeviceName:array[0..DEVICE_NAME_LENGTH - 1] of Char;</code> |
| The name of the Device (eg Keyboard0, Storage0 or Network0 etc) | | The name of the Device (eg Keyboard0, Storage0 or Network0 etc) | ||
|- | |- | ||
Line 1,056: | Line 1,313: | ||
| A pointer to a class specific Device interface (eg PUSBDevice, PNetworkDevice or PStorageDevice etc) (Used by Drivers) | | A pointer to a class specific Device interface (eg PUSBDevice, PNetworkDevice or PStorageDevice etc) (Used by Drivers) | ||
|- | |- | ||
− | | <code>DeviceDescription: | + | | <code>DeviceDescription:array[0..DEVICE_DESC_LENGTH - 1] of Char;</code> |
| A description of the Device (eg BCM2835 PL011 UART) | | A description of the Device (eg BCM2835 PL011 UART) | ||
|- | |- | ||
Line 1,069: | Line 1,326: | ||
|} | |} | ||
</div></div> | </div></div> | ||
+ | |||
+ | '''Device firmware''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PDeviceFirmware = ^TDeviceFirmware;</code> | ||
+ | |||
+ | <code>TDeviceFirmware = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>DeviceClass:LongWord;</code> | ||
+ | | The Device class supported by this firmware (or DEVICE_CLASS_ANY for all devices) | ||
+ | |- | ||
+ | | <code>Name:array[0..FIRMWARE_NAME_LENGTH - 1] of Char;</code> | ||
+ | | The device specific name of the firmware which may be a filename, a device model, id or type | ||
+ | |- | ||
+ | | <code>Size:LongWord;</code> | ||
+ | | For block (memory) based firmware, the size passed to Create or 0 for other firmware types | ||
+ | |- | ||
+ | | <code>Buffer:Pointer;</code> | ||
+ | | For block (memory) based firmware, the buffer passed to Create or nil for other firmware types | ||
+ | |- | ||
+ | | <code>Handles:PFirmwareHandle;</code> | ||
+ | | List of currently open handles for this firmware | ||
+ | |- | ||
+ | | <code>Handler:TDeviceFirmwareHandler;</code> | ||
+ | | The device specific callback for the handler which provides this firmware | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PDeviceFirmware;</code> | ||
+ | | Previous entry in Device firmware table} | ||
+ | |- | ||
+ | | <code>Next:PDeviceFirmware;</code> | ||
+ | | Next entry in Device firmware table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Device firmware handler''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TDeviceFirmwareHandler = function(Firmware:PDeviceFirmware; Action:LongWord; var Handle:THandle; var Buffer:Pointer; var Value:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Firmware handle''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PFirmwareHandle = ^TFirmwareHandle;</code> | ||
+ | |||
+ | <code>TFirmwareHandle = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Handle:THandle;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Next:PFirmwareHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
'''Notifier entry''' | '''Notifier entry''' | ||
Line 1,138: | Line 1,460: | ||
|- | |- | ||
| <code>Next:PNotifierTask;</code> | | <code>Next:PNotifierTask;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Notifier retry''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PNotifierRetry = ^TNotifierRetry;</code> | ||
+ | |||
+ | <code>TNotifierRetry = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Device:PDevice;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Notification:LongWord;</code> | ||
| | | | ||
|- | |- | ||
Line 1,172: | Line 1,512: | ||
| Driver state (eg Registered/Unregistered) | | Driver state (eg Registered/Unregistered) | ||
|- | |- | ||
− | | <code>DriverName: | + | | <code>DriverName:array[0..DRIVER_NAME_LENGTH - 1] of Char;</code> |
| Descriptive name for the Driver (eg USB Mouse Driver) | | Descriptive name for the Driver (eg USB Mouse Driver) | ||
|- | |- | ||
Line 1,218: | Line 1,558: | ||
| Host state (eg Registered/Unregistered) | | Host state (eg Registered/Unregistered) | ||
|- | |- | ||
− | | <code>HostName: | + | | <code>HostName:array[0..HOST_NAME_LENGTH - 1] of Char;</code> |
| Descriptive name for the Host (eg DWC OTG Host) | | Descriptive name for the Host (eg DWC OTG Host) | ||
|- | |- | ||
Line 1,816: | Line 2,156: | ||
|} | |} | ||
− | '''Random device read | + | '''Random device read double''' |
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code> | + | | <code>TRandomDeviceReadDouble = function(Random:PRandomDevice):Double;</code> |
| style="width: 40%;"| | | style="width: 40%;"| | ||
|- | |- | ||
Line 1,868: | Line 2,208: | ||
| A device specific DeviceReadQuadWord method implementing a standard random device interface (Or nil if the default method is suitable) | | A device specific DeviceReadQuadWord method implementing a standard random device interface (Or nil if the default method is suitable) | ||
|- | |- | ||
− | | <code> | + | | <code>DeviceReadDouble:TRandomDeviceReadDouble;</code> |
− | | A device specific | + | | A device specific DeviceReadDouble method implementing a standard random device interface (Or nil if the default method is suitable) |
|- | |- | ||
|colspan="2"|''Statistics Properties'' | |colspan="2"|''Statistics Properties'' | ||
Line 2,414: | Line 2,754: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 DeviceFindByName(const Name:String):PDevice;</pre> | + | <pre style="border: 0; padding-bottom:0px;">function DeviceFindByName(const Name:String):PDevice; inline;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by name in the device table</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by name in the device table</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;"> | ||
Line 2,429: | Line 2,769: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 DeviceFindByDescription(const Description:String):PDevice;</pre> | + | <pre style="border: 0; padding-bottom:0px;">function DeviceFindByNameEx(DeviceClass:LongWord; const Name:String):PDevice;</pre> |
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by class and name in the device table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of the device to find (eg DEVICE_CLASS_USB) (DEVICE_CLASS_ANY for all classes) | ||
+ | |- | ||
+ | ! Name | ||
+ | | The name of the device to find (eg USB0) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to device entry or nil if not found | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFindByDescription(const Description:String):PDevice; inline;</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by description in the device table</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by description in the device table</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;" | ||
+ | |- | ||
+ | ! Description | ||
+ | | The description of the device to find (eg BCM2836 ARM Timer) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to device entry or nil if not found | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFindByDescriptionEx(DeviceClass:LongWord; const Description:String):PDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by class and description in the device table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of the device to find (eg DEVICE_CLASS_USB) (DEVICE_CLASS_ANY for all classes) | ||
|- | |- | ||
! Description | ! Description | ||
Line 2,487: | Line 2,863: | ||
! Flags | ! Flags | ||
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER) | | The flags to control the notification (eg NOTIFIER_FLAG_WORKER) | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareCreate(DeviceClass:LongWord; const Name:String; Buffer:Pointer; Size:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new block (memory) based firmware entry using the standard block firmware handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of device this firmware applies to (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for all devices) | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | A pointer to a block of memory containing the firmware to be provided to requesting devices | ||
+ | |- | ||
+ | ! Size | ||
+ | | The size in bytes of the block pointed to by buffer | ||
+ | |- | ||
+ | ! Return | ||
+ | | True if the new firmware entry was added or False on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | Can be used by device drivers to register built in firmware as a device firmware provider. The supplied buffer can be statically or dynamically allocated but must not be freed once the device firmware has been created. | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareRegister(DeviceClass:LongWord; const Name:String; Handler:TDeviceFirmwareHandler):THandle;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new device firmware handler for acquiring device specific firmware</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of device this firmware applies to (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for all devices) | ||
+ | |- | ||
+ | ! Name | ||
+ | | The name of the device firmware, device specific may be a filename, a device model, id or type | ||
+ | |- | ||
+ | ! Handler | ||
+ | | The handler function which is to be called when a device requests this firmware | ||
+ | |- | ||
+ | ! Return | ||
+ | | A handle for the new firmware handler on success or INVALID_HANDLE_VALUE on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | Used by device firmware providers to register firmware for device drivers | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareDeregister(Handle:THandle):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister an existing device firmware handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | The handle returned by Register | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS on completion or another error code on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | Used by device firmware providers to deregister firmware for device drivers | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareFind(DeviceClass:LongWord; const Name:String):PDeviceFirmware;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find an existing device firmware handler for a specified device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of device for the firmware (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for any class) | ||
+ | |- | ||
+ | ! Name | ||
+ | | The name of the device firmware which is a device specific value such as a filename, a device model, id or type | ||
+ | |- | ||
+ | ! Return | ||
+ | | A pointer to the device firmware entry which contains the details of the handler | ||
+ | |- | ||
+ | ! Note | ||
+ | | Used internally to locate compatible firmware for a device firmware open request | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareFindByHandle(Handle:THandle):PDeviceFirmware;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find an existing device firmware handler from a returned handle</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | A handle to the firmware returned by Open or Acquire | ||
+ | |- | ||
+ | ! Return | ||
+ | | A pointer to the device firmware entry which contains the details of the handler | ||
+ | |- | ||
+ | ! Note | ||
+ | | Used internally to locate referenced firmware for a device firmware request | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareOpen(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Open the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of device for the firmware (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for any class) | ||
+ | |- | ||
+ | ! Name | ||
+ | | The name of the device firmware which is a device specific value such as a filename, a device model, id or type | ||
+ | |- | ||
+ | ! Timeout | ||
+ | | Number of milliseconds to wait for the device firmware to be ready (0 to not wait, INFINITE to wait forever) | ||
+ | |- | ||
+ | ! Handle | ||
+ | | A variable to receive a handle to the firmware on return | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler can supply firmware or another error code on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | A handler may return ERROR_NOT_READY if the firmware may be accepted but is not available yet | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareClose(Handle:THandle):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Close a handle to the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | The handle to the firmware as returned by Open | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler accepts this firmware or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareSize(Handle:THandle):LongInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return the size of the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | The handle to the firmware as returned by Open | ||
+ | |- | ||
+ | ! Return | ||
+ | | The size of the firmware on success or -1 on failure | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareSeek(Handle:THandle; Position:LongInt):LongInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Seek to a position within the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | The handle to the firmware as returned by Open | ||
+ | |- | ||
+ | ! Position | ||
+ | | The byte position within the firmware to seek to | ||
+ | |- | ||
+ | ! Return | ||
+ | | The new position within the firmware on success or -1 on failure | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareRead(Handle:THandle; Buffer:Pointer; Count:LongInt):LongInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read into a buffer from the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | The handle to the firmware as returned by Open | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | A pointer to a buffer to receive the data | ||
+ | |- | ||
+ | ! Count | ||
+ | | The maximum number of bytes to be read | ||
+ | |- | ||
+ | ! Return | ||
+ | | The number of bytes read on success or -1 on failure | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareAcquire(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle; var Buffer:Pointer; var Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Acquire a memory block containing the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! DeviceClass | ||
+ | | The class of device for the firmware (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for any class) | ||
+ | |- | ||
+ | ! Name | ||
+ | | The name of the device firmware which is a device specific value such as a filename, a device model, id or type | ||
+ | |- | ||
+ | ! Timeout | ||
+ | | Number of milliseconds to wait for the device firmware to be ready (0 to not wait, INFINITE to wait forever) | ||
+ | |- | ||
+ | ! Handle | ||
+ | | A variable to receive a handle to the firmware on return | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | A variable to receive a pointer to the block of memory containing the firmware on return | ||
+ | |- | ||
+ | ! Size | ||
+ | | A variable to receive the size of the memory block pointed to by buffer on return | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler can supply firmware or another error code on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | A handler may return ERROR_NOT_READY if the firmware may be accepted but is not available yet. A handler may return ERROR_MORE_DATA if the size of the firmware is larger than can be returned in a single buffer. | ||
+ | |- | ||
+ | |} | ||
+ | </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 DeviceFirmwareRelease(Handle:THandle; Buffer:Pointer; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Release a memory block containing the firmware for a specified device from a registered handler</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Handle | ||
+ | | The handle to the firmware as returned by Acquire | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | The pointer to the block of memory containing the firmware as returned by Acquire | ||
+ | |- | ||
+ | ! Size | ||
+ | | The size of the memory block as returned by Acquire | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler accepts this firmware or another error code on failure | ||
|- | |- | ||
|} | |} | ||
Line 2,529: | Line 3,160: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 NotifierNotify(Device:PDevice; Notification:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function NotifierNotify(Device:PDevice; Notification:LongWord):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;">procedure NotifierRetry(Retry:PNotifierRetry);</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 3,117: | Line 3,760: | ||
! Timer | ! Timer | ||
| The Timer device to schedule the callback for | | The Timer device to schedule the callback for | ||
+ | |- | ||
+ | ! Flags | ||
+ | | The flags to control the event (eg TIMER_EVENT_FLAG_REPEAT) | ||
|- | |- | ||
! Callback | ! Callback | ||
Line 3,122: | Line 3,768: | ||
|- | |- | ||
! Data | ! Data | ||
− | | A pointer to be | + | | A pointer to be passed to the function when the interval expires (Optional) |
|- | |- | ||
! Return | ! Return | ||
Line 3,503: | Line 4,149: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 | + | <pre style="border: 0; padding-bottom:0px;">function RandomDeviceReadDouble(Random:PRandomDevice):Double;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 3,510: | Line 4,156: | ||
! Note | ! Note | ||
| None documented | | 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 RandomDeviceReadExtended(Random:PRandomDevice):Extended; 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 | ||
+ | | Replaced by RandomDeviceReadDouble | ||
|- | |- | ||
|} | |} | ||
Line 4,277: | Line 4,935: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 | + | <pre style="border: 0; padding-bottom:0px;">function SysRandomReadDouble:Double;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 4,343: | Line 5,001: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 DeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function DeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current device count</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;"> | ||
Line 4,367: | Line 5,025: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 NotifierGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function NotifierGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current notifier count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current notifier count</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;"> | ||
Line 4,502: | Line 5,160: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 DriverGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function DriverGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current driver count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current driver count</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;"> | ||
Line 4,553: | Line 5,211: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 ClockDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function ClockDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current clock device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current clock device count</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;"> | ||
Line 4,565: | Line 5,223: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 ClockDeviceGetDefault:PClockDevice | + | <pre style="border: 0; padding-bottom:0px;">function ClockDeviceGetDefault:PClockDevice;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default clock device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default clock device</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;"> | ||
Line 4,628: | Line 5,286: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 TimerDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function TimerDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current timer device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current timer device count</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;"> | ||
Line 4,640: | Line 5,298: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 TimerDeviceGetDefault:PTimerDevice | + | <pre style="border: 0; padding-bottom:0px;">function TimerDeviceGetDefault:PTimerDevice;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default timer device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default timer device</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;"> | ||
Line 4,652: | Line 5,310: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 TimerDeviceSetDefault(Timer:PTimerDevice):LongWord; </pre> | + | <pre style="border: 0; padding-bottom:0px;">function TimerDeviceSetDefault(Timer:PTimerDevice):LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default timer device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default timer device</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;"> | ||
Line 4,755: | Line 5,413: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 RandomDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function RandomDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current random device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current random device count</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;"> | ||
Line 4,767: | Line 5,425: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 RandomDeviceGetDefault:PRandomDevice | + | <pre style="border: 0; padding-bottom:0px;">function RandomDeviceGetDefault:PRandomDevice;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default random device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default random device</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;"> | ||
Line 4,830: | Line 5,488: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 MailboxDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function MailboxDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current mailbox device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current mailbox device count</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;"> | ||
Line 4,842: | Line 5,500: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 MailboxDeviceGetDefault:PMailboxDevice | + | <pre style="border: 0; padding-bottom:0px;">function MailboxDeviceGetDefault:PMailboxDevice;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default mailbox device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default mailbox device</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;"> | ||
Line 4,905: | Line 5,563: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 WatchdogDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function WatchdogDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current watchdog device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current watchdog device count</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;"> | ||
Line 4,917: | Line 5,575: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <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 WatchdogDeviceGetDefault:PWatchdogDevice | + | <pre style="border: 0; padding-bottom:0px;">function WatchdogDeviceGetDefault:PWatchdogDevice;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default watchdog device</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current default watchdog device</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;"> |
Latest revision as of 04:55, 21 June 2023
Return to Unit Reference
Contents
[hide]Description
Ultibo Device Interface unit
Constants
DEVICE_*
DEVICE_SIGNATURE_*
DEVICE_*_LENGTH
DEVICE_BUS_*
DEVICE_STATE_*
DEVICE_ID_*
DEVICE_CLASS_*
DEVICE_NOTIFICATION_*
FIRMWARE_NAME_*
FIRMWARE_ACTION_*
FIRMWARE_*
NOTIFIER_SIGNATURE_*
NOTIFIER_STATE_*
NOTIFIER_FLAG_*
DEVICE_LOG_*
DRIVER_*
DRIVER_SIGNATURE_*
DRIVER_NAME_*
DRIVER_STATE_*
DRIVER_ID_*
DRIVER_CLASS_*
HOST_*
HOST_SIGNATURE_*
HOST_NAME_*
HOST_STATE_*
HOST_ID_*
HOST_CLASS_*
CLOCK_*
CLOCK_TYPE_*
CLOCK_STATE_*
CLOCK_FLAG_*
TIMER_*
TIMER_TYPE_*
TIMER_STATE_*
TIMER_FLAG_*
TIMER_EVENT_FLAG_*
RANDOM_*
RANDOM_TYPE_*
RANDOM_STATE_*
RANDOM_FLAG_*
MAILBOX_*
MAILBOX_TYPE_*
MAILBOX_STATE_*
MAILBOX_FLAG_*
WATCHDOG_*
WATCHDOG_TYPE_*
WATCHDOG_STATE_*
WATCHDOG_FLAG_*
Type definitions
Device enumeration callback
TDeviceEnumerate = function(Device:PDevice; Data:Pointer):LongWord;
|
Device notification callback
TDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Device entry
Device firmware
Device firmware handler
TDeviceFirmwareHandler = function(Firmware:PDeviceFirmware; Action:LongWord; var Handle:THandle; var Buffer:Pointer; var Value:LongWord):LongWord;
|
Firmware handle
Notifier entry
Notifier task
Notifier retry
Driver enumeration callback
TDriverEnumerate = function(Driver:PDriver; Data:Pointer):LongWord;
|
Driver entry
Host enumeration callback
THostEnumerate = function(Host:PHost; Data:Pointer):LongWord;
|
Host entry
Clock properties
Clock enumeration callback
TClockEnumerate = function(Clock:PClockDevice; Data:Pointer):LongWord;
|
Clock notification callback
TClockNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Clock device start
TClockDeviceStart = function(Clock:PClockDevice):LongWord;
|
Clock device stop
TClockDeviceStop = function(Clock:PClockDevice):LongWord;
|
Clock device read
TClockDeviceRead = function(Clock:PClockDevice):LongWord;
|
Clock device read 64
TClockDeviceRead64 = function(Clock:PClockDevice):Int64;
|
Clock device write 64
TClockDeviceWrite64 = function(Clock:PClockDevice; const Value:Int64):LongWord;
|
Clock device get rate
TClockDeviceGetRate = function(Clock:PClockDevice):LongWord;
|
Clock device set rate
TClockDeviceSetRate = function(Clock:PClockDevice; Rate:LongWord):LongWord;
|
Clock device get properties
TClockDeviceGetProperties = function(Clock:PClockDevice; Properties:PClockProperties):LongWord;
|
Clock device
Timer callback
TTimerCallback = TCounterCallback;
|
Counter callback from Platform |
Timer properties
Timer waiter
Timer enumeration callback
TTimerEnumerate = function(Timer:PTimerDevice; Data:Pointer):LongWord;
|
Timer notification callback
TTimerNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
TImer device start
TTimerDeviceStart = function(Timer:PTimerDevice):LongWord;
|
Timer device stop
TTimerDeviceStop = function(Timer:PTimerDevice):LongWord;
|
Timer device read
TTimerDeviceRead = function(Timer:PTimerDevice):LongWord;
|
Timer device read 64
TTimerDeviceRead64 = function(Timer:PTimerDevice):Int64;
|
Timer device wait
TTimerDeviceWait = function(Timer:PTimerDevice):LongWord;
|
Timer device event
TTimerDeviceEvent = function(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
|
Timer device cancel
TTimerDeviceCancel = function(Timer:PTimerDevice):LongWord;
|
Timer device get rate
TTimerDeviceGetRate = function(Timer:PTimerDevice):LongWord;
|
Timer device set rate
TTimerDeviceSetRate = function(Timer:PTimerDevice; Rate:LongWord):LongWord;
|
Timer device get interval
TTimerDeviceGetInterval = function(Timer:PTimerDevice):LongWord;
|
Timer device set interval
TTimerDeviceSetInterval = function(Timer:PTimerDevice; Interval:LongWord):LongWord;
|
Timer device get properties
TTimerDeviceGetProperties = function(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
|
Timer device
Random enumeration callback
TRandomEnumerate = function(Random:PRandomDevice; Data:Pointer):LongWord;
|
Random notification callback
TRandomNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Random device start
TRandomDeviceStart = function(Random:PRandomDevice):LongWord;
|
Random device stop
TRandomDeviceStop = function(Random:PRandomDevice):LongWord;
|
Random device seed
TRandomDeviceSeed = function(Random:PRandomDevice; Seed:LongWord):LongWord;
|
Random device read byte
TRandomDeviceReadByte = function(Random:PRandomDevice):Byte;
|
Random device read word
TRandomDeviceReadWord = function(Random:PRandomDevice):Word;
|
Random device read long word
TRandomDeviceReadLongWord = function(Random:PRandomDevice):LongWord;
|
Random device read quad word
TRandomDeviceReadQuadWord = function(Random:PRandomDevice):Int64;
|
Random device read double
TRandomDeviceReadDouble = function(Random:PRandomDevice):Double;
|
Random device
Mailbox enumeration callback
TMailboxEnumerate = function(Mailbox:PMailboxDevice; Data:Pointer):LongWord;
|
Mailbox notification callback
TMailboxNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Mailbox device start
TMailboxDeviceStart = function(Mailbox:PMailboxDevice):LongWord;
|
Mailbox device stop
TMailboxDeviceStop = function(Mailbox:PMailboxDevice):LongWord;
|
Mailbox device receive
TMailboxDeviceReceive = function(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;
|
Mailbox device send
TMailboxDeviceSend = function(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;
|
Mailbox device call
TMailboxDeviceCall = function(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;
|
Mailbox device get timeout
TMailboxDeviceGetTimeout = function(Mailbox:PMailboxDevice):LongWord;
|
Mailbox device set timeout
TMailboxDeviceSetTimeout = function(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;
|
Mailbox device
Watchdog enumeration callback
TWatchdogEnumerate = function(Watchdog:PWatchdogDevice; Data:Pointer):LongWord;
|
Watchdog notification callback
TWatchdogNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Watchdog device start
TWatchdogDeviceStart = function(Watchdog:PWatchdogDevice):LongWord;
|
Watchdog device stop
TWatchdogDeviceStop = function(Watchdog:PWatchdogDevice):LongWord;
|
Watchdog device refresh
TWatchdogDeviceRefresh = function(Watchdog:PWatchdogDevice):LongWord;
|
Watchdog device get remain
TWatchdogDeviceGetRemain = function(Watchdog:PWatchdogDevice):LongWord;
|
Watchdog device get timeout
TWatchdogDeviceGetTimeout = function(Watchdog:PWatchdogDevice):LongWord;
|
Watchdog device set timeout
TWatchdogDeviceSetTimeout = function(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;
|
Watchdog device
Public variables
Device logging
DEVICE_DEFAULT_LOG_LEVEL:LongWord = DEVICE_LOG_LEVEL_DEBUG;
|
Minimum level for Device messages. Only messages with level greater than or equal to this will be printed. |
DEVICE_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
procedure DevicesInit;
Device functions
function DeviceDestroy(Device:PDevice):LongWord;
function DeviceGetName(Device:PDevice):String;
function DeviceSetName(Device:PDevice; const Name:String):LongWord;
function DeviceGetDescription(Device:PDevice):String;
function DeviceSetDescription(Device:PDevice; const Description:String):LongWord;
function DeviceRegister(Device:PDevice):LongWord;
function DeviceDeregister(Device:PDevice):LongWord;
function DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;
function DeviceFindByDeviceData(DeviceData:Pointer):PDevice;
function DeviceFindByName(const Name:String):PDevice; inline;
function DeviceFindByNameEx(DeviceClass:LongWord; const Name:String):PDevice;
function DeviceFindByDescription(const Description:String):PDevice; inline;
function DeviceFindByDescriptionEx(DeviceClass:LongWord; const Description:String):PDevice;
function DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;
function DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
function DeviceFirmwareCreate(DeviceClass:LongWord; const Name:String; Buffer:Pointer; Size:LongWord):Boolean;
function DeviceFirmwareRegister(DeviceClass:LongWord; const Name:String; Handler:TDeviceFirmwareHandler):THandle;
function DeviceFirmwareDeregister(Handle:THandle):LongWord;
function DeviceFirmwareFind(DeviceClass:LongWord; const Name:String):PDeviceFirmware;
function DeviceFirmwareFindByHandle(Handle:THandle):PDeviceFirmware;
function DeviceFirmwareOpen(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle):LongWord;
function DeviceFirmwareClose(Handle:THandle):LongWord;
function DeviceFirmwareSize(Handle:THandle):LongInt;
function DeviceFirmwareSeek(Handle:THandle; Position:LongInt):LongInt;
function DeviceFirmwareRead(Handle:THandle; Buffer:Pointer; Count:LongInt):LongInt;
function DeviceFirmwareAcquire(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle; var Buffer:Pointer; var Size:LongWord):LongWord;
function DeviceFirmwareRelease(Handle:THandle; Buffer:Pointer; Size:LongWord):LongWord;
function NotifierAllocate(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):PNotifier;
function NotifierRelease(Notifier:PNotifier):LongWord;
function NotifierFind(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer):PNotifier;
function NotifierNotify(Device:PDevice; Notification:LongWord):LongWord;
Driver functions
function DriverDestroy(Driver:PDriver):LongWord;
function DriverGetName(Driver:PDriver):String;
function DriverSetName(Driver:PDriver; const Name:String):LongWord;
function DriverRegister(Driver:PDriver):LongWord;
function DriverDeregister(Driver:PDriver):LongWord;
function DriverFind(DriverClass,DriverId:LongWord):PDriver;
function DriverFindByName(const Name:String):PDriver;
function DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;
Clock device functions
function ClockDeviceStart(Clock:PClockDevice):LongWord;
function ClockDeviceStop(Clock:PClockDevice):LongWord;
function ClockDeviceRead(Clock:PClockDevice):LongWord;
function ClockDeviceRead64(Clock:PClockDevice):Int64;
function ClockDeviceWrite64(Clock:PClockDevice; const Value:Int64):LongWord;
function ClockDeviceGetRate(Clock:PClockDevice):LongWord;
function ClockDeviceSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;
function ClockDeviceProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord; inline;
function ClockDeviceGetProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord;
function ClockDeviceCreateEx(Size:LongWord):PClockDevice;
function ClockDeviceDestroy(Clock:PClockDevice):LongWord;
function ClockDeviceRegister(Clock:PClockDevice):LongWord;
function ClockDeviceDeregister(Clock:PClockDevice):LongWord;
function ClockDeviceFind(ClockId:LongWord):PClockDevice;
function ClockDeviceFindByName(const Name:String):PClockDevice; inline;
function ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;
function ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;
function ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Timer device functions
function TimerDeviceStart(Timer:PTimerDevice):LongWord;
function TimerDeviceStop(Timer:PTimerDevice):LongWord;
function TimerDeviceRead(Timer:PTimerDevice):LongWord;
function TimerDeviceRead64(Timer:PTimerDevice):Int64;
function TimerDeviceWait(Timer:PTimerDevice):LongWord;
function TimerDeviceEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
function TimerDeviceCancel(Timer:PTimerDevice):LongWord;
function TimerDeviceGetRate(Timer:PTimerDevice):LongWord;
function TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;
function TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;
function TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;
function TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord; inline;
function TimerDeviceGetProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
function TimerDeviceCreateEx(Size:LongWord):PTimerDevice;
function TimerDeviceDestroy(Timer:PTimerDevice):LongWord;
function TimerDeviceRegister(Timer:PTimerDevice):LongWord;
function TimerDeviceDeregister(Timer:PTimerDevice):LongWord;
function TimerDeviceFind(TimerId:LongWord):PTimerDevice;
function TimerDeviceFindByName(const Name:String):PTimerDevice; inline;
function TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;
function TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;
function TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Random device functions
function RandomDeviceSeed(Random:PRandomDevice; Seed:LongWord):LongWord;
function RandomDeviceReadLongWord(Random:PRandomDevice):LongWord;
function RandomDeviceReadQuadWord(Random:PRandomDevice):Int64;
function RandomDeviceReadDouble(Random:PRandomDevice):Double;
function RandomDeviceReadExtended(Random:PRandomDevice):Extended; inline;
function RandomDeviceCreateEx(Size:LongWord):PRandomDevice;
function RandomDeviceDestroy(Random:PRandomDevice):LongWord;
function RandomDeviceRegister(Random:PRandomDevice):LongWord;
function RandomDeviceDeregister(Random:PRandomDevice):LongWord;
function RandomDeviceFindByName(const Name:String):PRandomDevice; inline;
function RandomDeviceFindByDescription(const Description:String):PRandomDevice; inline;
function RandomDeviceEnumerate(Callback:TRandomEnumerate; Data:Pointer):LongWord;
function RandomDeviceNotification(Random:PRandomDevice; Callback:TRandomNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Mailbox device functions
function MailboxDeviceStart(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceReceive(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;
function MailboxDeviceSend(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;
function MailboxDeviceCall(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;
function MailboxDeviceGetTimeout(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceSetTimeout(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;
function MailboxDeviceCreateEx(Size:LongWord):PMailboxDevice;
function MailboxDeviceDestroy(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceRegister(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceDeregister(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceFind(MailboxId:LongWord):PMailboxDevice;
function MailboxDeviceFindByName(const Name:String):PMailboxDevice; inline;
function MailboxDeviceFindByDescription(const Description:String):PMailboxDevice; inline;
function MailboxDeviceEnumerate(Callback:TMailboxEnumerate; Data:Pointer):LongWord;
function MailboxDeviceNotification(Mailbox:PMailboxDevice; Callback:TMailboxNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Watchdog device functions
function WatchdogDeviceStart(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceStop(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceRefresh(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceGetRemain(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceGetTimeout(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceSetTimeout(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;
function WatchdogDeviceCreateEx(Size:LongWord):PWatchdogDevice;
function WatchdogDeviceDestroy(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceRegister(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceDeregister(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceFind(WatchdogId:LongWord):PWatchdogDevice;
function WatchdogDeviceFindByName(const Name:String):PWatchdogDevice; inline;
function WatchdogDeviceFindByDescription(const Description:String):PWatchdogDevice; inline;
function WatchdogDeviceEnumerate(Callback:TWatchdogEnumerate; Data:Pointer):LongWord;
function WatchdogDeviceNotification(Watchdog:PWatchdogDevice; Callback:TWatchdogNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
RTL clock functions
RTL timer (counter) functions
function SysTimerWait:LongWord;
function SysTimerEvent(Callback:TTimerCallback; Data:Pointer):LongWord;
function SysTimerCancel:LongWord;
function SysTimerGetRate:LongWord;
function SysTimerSetRate(Rate:LongWord):LongWord;
function SysTimerGetInterval:LongWord;
function SysTimerSetInterval(Interval:LongWord):LongWord;
RTL random functions
function SysRandomAvailable:Boolean;
RTL watchdog functions
function SysWatchdogAvailable:Boolean;
Device helper functions
function DeviceCheck(Device:PDevice):PDevice;
function NotifierCheck(Notifier:PNotifier):PNotifier;
procedure DeviceLog(Level:LongWord; Device:PDevice; const AText:String);
procedure DeviceLogInfo(Device:PDevice; const AText:String); inline;
procedure DeviceLogWarn(Device:PDevice; const AText:String); inline;
procedure DeviceLogError(Device:PDevice; const AText:String); inline;
procedure DeviceLogDebug(Device:PDevice; const AText:String); inline;
Driver helper functions
function DriverCheck(Driver:PDriver):PDriver;
Clock device helper functions
function ClockDeviceGetDefault:PClockDevice;
function ClockDeviceSetDefault(Clock:PClockDevice):LongWord;
function ClockDeviceCheck(Clock:PClockDevice):PClockDevice;
function ClockTypeToString(ClockType:LongWord):String;
function ClockStateToString(ClockState:LongWord):String;
Timer device helper functions
function TimerDeviceGetDefault:PTimerDevice;
function TimerDeviceSetDefault(Timer:PTimerDevice):LongWord;
function TimerDeviceCheck(Timer:PTimerDevice):PTimerDevice;
function TimerTypeToString(TimerType:LongWord):String;
function TimerStateToString(TimerState:LongWord):String;
function TimerDeviceCreateWaiter(Timer:PTimerDevice; Callback:TTimerCallback; Data:Pointer):PTimerWaiter;
function TimerDeviceDestroyWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
function TimerDeviceRegisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
function TimerDeviceDeregisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Random device helper functions
function RandomDeviceGetDefault:PRandomDevice;
function RandomDeviceSetDefault(Random:PRandomDevice):LongWord;
function RandomDeviceCheck(Random:PRandomDevice):PRandomDevice;
function RandomTypeToString(RandomType:LongWord):String;
function RandomStateToString(RandomState:LongWord):String;
Mailbox device helper functions
function MailboxDeviceGetDefault:PMailboxDevice;
function MailboxDeviceSetDefault(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceCheck(Mailbox:PMailboxDevice):PMailboxDevice;
function MailboxTypeToString(MailboxType:LongWord):String;
function MailboxStateToString(MailboxState:LongWord):String;
Watchdog device helper functions
function WatchdogDeviceGetCount:LongWord;
function WatchdogDeviceGetDefault:PWatchdogDevice;
function WatchdogDeviceSetDefault(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceCheck(Watchdog:PWatchdogDevice):PWatchdogDevice;
function WatchdogTypeToString(WatchdogType:LongWord):String;
function WatchdogStateToString(WatchdogState:LongWord):String;
Return to Unit Reference