Difference between revisions of "Unit Devices"

From Ultibo.org
Jump to: navigation, search
 
(70 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo Device Interface unit'''
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<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 specific constants''' <code> DEVICE_* </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_PREFIX = 'Device';</code>
 +
| Name prefix for Devices
 +
|-
 +
|}
 +
</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 signature''' <code> DEVICE_SIGNATURE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DEVICE_SIGNATURE = $AD03FE3C;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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
 +
|-
 +
|}
 +
</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 bus''' <code> DEVICE_BUS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NONE = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_PCI = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_USB = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_ISA = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_PS2 = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_FIREWIRE = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_SD = 6;</code>
 +
| SD/SDHC/SDXC/SDIO etc
 +
|-
 +
| <code>DEVICE_BUS_MMC = 7;</code>
 +
| MMC/eMMC etc
 +
|-
 +
| <code>DEVICE_BUS_ATA = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_IDE = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_SCSI = 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_ATAPI = 11;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_SATA = 12;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_SERIAL = 13;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_SPI = 14;</code>
 +
| Serial Peripheral Interface device
 +
|-
 +
| <code>DEVICE_BUS_MMIO = 15;</code>
 +
| Memory Mapped IO device (No Bus)
 +
|-
 +
| <code>DEVICE_BUS_PCIE = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_BUS_I2C = 17;</code>
 +
| I2C connected device
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>DEVICE_BUS_MAX = 17;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 state''' <code> DEVICE_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DEVICE_STATE_UNREGISTERED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DEVICE_STATE_REGISTERED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>DEVICE_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 Id''' <code> DEVICE_ID_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DEVICE_ID_ANY = $FFFFFFFF;</code>
 +
| Any Device (Pass to DeviceFind to match all devices)
 +
|-
 +
|}
 +
</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 class''' <code> DEVICE_CLASS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DEVICE_CLASS_NONE = 0;</code>
 +
| No Device
 +
|-
 +
| <code>DEVICE_CLASS_USBHOST = 1;</code>
 +
| A USB Host Controller (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface)
 +
|-
 +
| <code>DEVICE_CLASS_PCIHOST = 2;</code>
 +
| A PCI Host Controller (eg AHCI etc) (Implementing a standard PCI host interface)
 +
|-
 +
| <code>DEVICE_CLASS_USB = 3;</code>
 +
| A USB Device (eg Hub/Keyboard/Mouse/Mass Storage/Vendor Specific etc) (Implementing a standard USB device interface)
 +
|-
 +
| <code>DEVICE_CLASS_PCI = 4;</code>
 +
| A PCI Device (eg Graphics/Controller etc) (Implementing a standard PCI device interface)
 +
|-
 +
| <code>DEVICE_CLASS_NETWORK = 5;</code>
 +
| A Network Device (Implementing a standard Network device interface). May also be a USB or PCI device
 +
|-
 +
| <code>DEVICE_CLASS_STORAGE = 6;</code>
 +
| A Storage Device (Implementing a standard Storage device interface). May also be a USB, PCI, MMC, SCSI or ATA device
 +
|-
 +
| <code>DEVICE_CLASS_BLOCK = DEVICE_CLASS_STORAGE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_FILESYSTEM = 7;</code>
 +
| A FileSystem Device (eg FAT/NTFS/CDFS/EXTFS etc)(Implementing a standard FileSystem device interface)
 +
|-
 +
| <code>DEVICE_CLASS_PROTOCOL = 8;</code>
 +
| A Protocol Device (eg TCP/UDP/IP/ICMP etc) (Implementing a standard Protocol device interface)
 +
|-
 +
| <code>DEVICE_CLASS_TRANSPORT = DEVICE_CLASS_PROTOCOL;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_KEYBOARD = 9;</code>
 +
| A Keyboard Device (Implementing a standard Keyboard device interface)
 +
|-
 +
| <code>DEVICE_CLASS_MOUSE = 10;</code>
 +
| A Mouse Device (Implementing a standard Mouse device interface)
 +
|-
 +
| <code>DEVICE_CLASS_BLUETOOTH = 11;</code>
 +
| A Bluetooth Device (Implementing a standard Bluetooth device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SERIAL = 12;</code>
 +
| A Serial Device (Implementing a standard Serial device interface)
 +
|-
 +
| <code>DEVICE_CLASS_AUDIO = 13;</code>
 +
| An Audio Device (Implementing a standard Audio device interface)
 +
|-
 +
| <code>DEVICE_CLASS_VIDEO = 14;</code>
 +
| A Video Device (Implementing a standard Video device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SCSI = 15;</code>
 +
| A SCSI Device (Implementing a standard SCSI device interface). May also be a PCI device
 +
|-
 +
| <code>DEVICE_CLASS_ATA = 16;</code>
 +
| An ATA/ATAPI Device (Implementing a standard ATA/ATAPI device interface). May also be a PCI device
 +
|-
 +
| <code>DEVICE_CLASS_IDE = DEVICE_CLASS_ATA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_ATAPI = DEVICE_CLASS_ATA;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_IMAGE = 17;</code>
 +
| An Image Device (eg Camera) (Implementing a standard Image device interface)
 +
|-
 +
| <code>DEVICE_CLASS_PRINTER = 18;</code>
 +
| A Printer Device (Implementing a standard Printer device interface)
 +
|-
 +
| <code>DEVICE_CLASS_COMMUNICATIONS = 19;</code>
 +
| A Communications Device (Implementing a standard Communications device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SMART_CARD = 20;</code>
 +
| A Smart Card Device (Implementing a standard Smart Card device interface)
 +
|-
 +
| <code>DEVICE_CLASS_MONITOR = 21;</code>
 +
| A Monitor Device (Implementing a standard Monitor device interface)
 +
|-
 +
| <code>DEVICE_CLASS_DISPLAY = 22;</code>
 +
| A Display Device (eg Billboard) (Implementing a standard Display device interface)
 +
|-
 +
| <code>DEVICE_CLASS_AUDIOVIDEO = 23;</code>
 +
| An Audio/Video Device (Implementing a standard Audio/Video device interface)
 +
|-
 +
| <code>DEVICE_CLASS_IRDA = 24;</code>
 +
| An Infrared Device (Implementing a standard Infrared device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SPI = 25;</code>
 +
| An SPI Device (Implementing a standard SPI device interface)
 +
|-
 +
| <code>DEVICE_CLASS_I2C = 26;</code>
 +
| An I2C Device (Implementing a standard I2C device interface)
 +
|-
 +
| <code>DEVICE_CLASS_UART = 27;</code>
 +
| A UART Device (Implementing a standard UART device interface)
 +
|-
 +
| <code>DEVICE_CLASS_MMC = 28;</code>
 +
| An MMC Device (Implementing a standard MMC device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SD = 29;</code>
 +
| An SD Device (Implementing a standard SD device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SDHCI = 30;</code>
 +
| An SD/MMC Host Controller (Implementing a standard SDHCI device interface)
 +
|-
 +
| <code>DEVICE_CLASS_SDHOST = DEVICE_CLASS_SDHCI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_MMCHOST = DEVICE_CLASS_SDHCI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_MMCIHOST = DEVICE_CLASS_SDHCI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_DFU = 31;</code>
 +
| A Device Firmware Update Device (Implementing a standard DFU device interface)
 +
|-
 +
| <code>DEVICE_CLASS_GPIO = 32;</code>
 +
| A GPIO Device (Implementing a standard GPIO device interface)
 +
|-
 +
| <code>DEVICE_CLASS_MAILBOX = 33;</code>
 +
| A Mailbox Device
 +
|-
 +
| <code>DEVICE_CLASS_OPENGL = 34;</code>
 +
| An OpenGL Device
 +
|-
 +
| <code>DEVICE_CLASS_DVB = 35;</code>
 +
| A Digital Video Broadcast (DVB) Device
 +
|-
 +
| <code>DEVICE_CLASS_DAB = 36;</code>
 +
| A Digital Audio Broadcast (DAB) Device
 +
|-
 +
| <code>DEVICE_CLASS_DMA = 37;</code>
 +
| A DMA Controller Device (Implementing a standard DMA controller interface)
 +
|-
 +
| <code>DEVICE_CLASS_SCSIHOST = 38;</code>
 +
| A SCSI Host Device (Implementing a standard SCSI host interface)
 +
|-
 +
| <code>DEVICE_CLASS_ATAHOST = 39;</code>
 +
| An ATA Host Device (Implementing a standard ATA host interface)
 +
|-
 +
| <code>DEVICE_CLASS_TIMER = 40;</code>
 +
| A Timer or Counter Device
 +
|-
 +
| <code>DEVICE_CLASS_RANDOM = 41;</code>
 +
| A Random Number Generator Device
 +
|-
 +
| <code>DEVICE_CLASS_FRAMEBUFFER = 42;</code>
 +
| A Frame Buffer Device
 +
|-
 +
| <code>DEVICE_CLASS_WATCHDOG = 43;</code>
 +
| A Watchdog Timer Device
 +
|-
 +
| <code>DEVICE_CLASS_CLOCK = 44;</code>
 +
| A Clock (Date/Time) Device
 +
|-
 +
| <code>DEVICE_CLASS_CONSOLE = 45;</code>
 +
| A Console Device
 +
|-
 +
| <code>DEVICE_CLASS_RTC = 46;</code>
 +
| A Real Time Clock (Battery Backed) Device
 +
|-
 +
| <code>DEVICE_CLASS_USBHUB = 47;</code>
 +
| A USB Hub (Implementing a standard USB hub interface)
 +
|-
 +
| <code>DEVICE_CLASS_LOGGING = 48;</code>
 +
| A Logging Device (Implementing a standard Logging device interface)
 +
|-
 +
| <code>DEVICE_CLASS_PCM = 49;</code>
 +
| A PCM Sound Device (Implementing a standard PCM device interface)
 +
|-
 +
| <code>DEVICE_CLASS_I2S = DEVICE_CLASS_PCM;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_PWM = 50;</code>
 +
| A Pulse Width Modulation (PWM) Device
 +
|-
 +
| <code>DEVICE_CLASS_1WIRE = 51;</code>
 +
| A 1-Wire Device (Implementing a standard W1 device interface)
 +
|-
 +
| <code>DEVICE_CLASS_CLOCK_MANAGER = 52;</code>
 +
| A Clock Manager Device
 +
|-
 +
| <code>DEVICE_CLASS_CODEC = 53;</code>
 +
| A CODEC Device (eg Audio or Video)
 +
|-
 +
| <code>DEVICE_CLASS_TOUCH = 54;</code>
 +
| A Touch Device
 +
|-
 +
| <code>DEVICE_CLASS_MEMORY = 55;</code>
 +
| A Memory Device (eg OTP, NVRAM or Flash)
 +
|-
 +
| <code>DEVICE_CLASS_GENERIC = 56;</code>
 +
| 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"|&nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_MAX = 60;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>DEVICE_CLASS_ANY = $FFFFFFFF;</code>
 +
| Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|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>
 +
|-
 +
|}
 +
</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 notification flag''' <code> DEVICE_NOTIFICATION_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DEVICE_NOTIFICATION_NONE = $00000000;</code>
 +
| Pass to DeviceNotification to cancel an existing Notification
 +
|-
 +
| <code>DEVICE_NOTIFICATION_REGISTER = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_DEREGISTER = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_OPEN = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_CLOSE = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_UP = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_DOWN = $00000020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_INSERT = $00000040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_EJECT = $00000080;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_ATTACH = $00000100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_DETACH = $00000200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_ENABLE = $00000400;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_DISABLE = $00000800;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_BIND = $00001000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_UNBIND = $00002000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_ATTACHING = $00004000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_DETACHING = $00008000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_INSERTING = $00010000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_EJECTING = $00020000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_OPENING = $00040000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_CLOSING = $00080000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_RESIZE = $00100000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DEVICE_NOTIFICATION_RESIZING = $00200000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 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>
 +
| &nbsp;
 +
|-
 +
| <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 style="font-size: 14px; padding-left: 12px;">'''Notifier signature''' <code> NOTIFIER_SIGNATURE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NOTIFIER_SIGNATURE = $6FA1BEC9;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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;">'''Notifier state''' <code> NOTIFIER_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NOTIFIER_STATE_UNREGISTERED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>NOTIFIER_STATE_REGISTERED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Notifier flag''' <code> NOTIFIER_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NOTIFIER_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NOTIFIER_FLAG_WORKER = $00000001;</code>
 +
| If set, notification callback event will be scheduled on a worker thread
 +
|-
 +
| <code>NOTIFIER_FLAG_UNLOCK = $00000002;</code>
 +
| If set, the notifier table lock will be released before calling the notification callback event
 +
|-
 +
|}
 +
</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 logging''' <code> DEVICE_LOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DEVICE_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| Device debugging messages
 +
|-
 +
| <code>DEVICE_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| Device informational messages, such as a device being attached or detached
 +
|-
 +
| <code>DEVICE_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code>
 +
| Device warning messages
 +
|-
 +
| <code>DEVICE_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| Device error messages
 +
|-
 +
| <code>DEVICE_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No Device messages
 +
|-
 +
|}
 +
</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 specific constants''' <code> DRIVER_* </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_PREFIX = 'Driver';</code>
 +
| Name prefix for Drivers
 +
|-
 +
|}
 +
</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 signature''' <code> DRIVER_SIGNATURE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DRIVER_SIGNATURE = $1EB4980A;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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
 +
|-
 +
|}
 +
</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 state''' <code> DRIVER_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DRIVER_STATE_UNREGISTERED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DRIVER_STATE_REGISTERED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>DRIVER_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 Id''' <code> DRIVER_ID_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DRIVER_ID_ANY = $FFFFFFFF;</code>
 +
| Any Driver (Pass to DriverFind to match all drivers)
 +
|-
 +
|}
 +
</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 class''' <code> DRIVER_CLASS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DRIVER_CLASS_NONE = 0;</code>
 +
| No Driver
 +
|-
 +
| <code>DRIVER_CLASS_USB = 1;</code>
 +
| A USB Driver (Implementing a standard USB driver interface)
 +
|-
 +
| <code>DRIVER_CLASS_PCI = 2;</code>
 +
| A PCI Driver (Implementing a standard PCI driver interface)
 +
|-
 +
| <code>DRIVER_CLASS_SDIO = 3;</code>
 +
| An SDIO Driver (Implementing a standard SDIO driver interface)
 +
|-
 +
| <code>DRIVER_CLASS_BLUETOOTH = 4;</code>
 +
| 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"|&nbsp;
 +
|-
 +
| <code>DRIVER_CLASS_MAX = 6;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>DRIVER_CLASS_ANY = $FFFFFFFF;</code>
 +
| Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|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>
 +
|-
 +
|}
 +
</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 specific constants''' <code> HOST_* </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_PREFIX = 'Host';</code>
 +
| Name prefix for Hosts
 +
|-
 +
|}
 +
</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 signature''' <code> HOST_SIGNATURE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HOST_SIGNATURE = $F45D30FE;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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
 +
|-
 +
|}
 +
</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 state''' <code> HOST_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HOST_STATE_UNREGISTERED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HOST_STATE_REGISTERED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HOST_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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 Id''' <code> HOST_ID_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HOST_ID_ANY = $FFFFFFFF;</code>
 +
| Any Host (Pass to HostFind to match all hosts)
 +
|-
 +
|}
 +
</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 class''' <code> HOST_CLASS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HOST_CLASS_NONE = 0;</code>
 +
| No Host}
 +
|-
 +
| <code>HOST_CLASS_USB = 1;</code>
 +
| A USB Host (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface)
 +
|-
 +
| <code>HOST_CLASS_PCI = 2;</code>
 +
| A PCI Host (eg AHCI etc) (Implementing a standard PCI host interface)
 +
|-
 +
| <code>HOST_CLASS_SD = 3;</code>
 +
| An SD Host (eg MMC/SDIO etc) (Implementing a standard SD host interface)
 +
|-
 +
| <code>HOST_CLASS_BLUETOOTH = 4;</code>
 +
| A Bluetooth Host (Implementing a standard Bluetooth host interface)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HOST_CLASS_MAX = 4;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HOST_CLASS_ANY = $FFFFFFFF;</code>
 +
| Any Host (Pass to HostFind or HostEnumerate to match all hosts)
 +
|-
 +
|}
 +
</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;">'''Clock specific constants''' <code> CLOCK_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CLOCK_NAME_PREFIX = 'Clock';</code>
 +
| Name prefix for Clock Devices
 +
|-
 +
|}
 +
</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;">'''Clock device type''' <code> CLOCK_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CLOCK_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CLOCK_TYPE_HARDWARE = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CLOCK_TYPE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Clock device state''' <code> CLOCK_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CLOCK_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CLOCK_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CLOCK_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Clock device flag''' <code> CLOCK_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>CLOCK_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CLOCK_FLAG_WRITABLE = $00000001;</code>
 +
| Device supports writing the clock value
 +
|-
 +
| <code>CLOCK_FLAG_VARIABLE = $00000002;</code>
 +
| Device supports setting the clock rate
 +
|-
 +
|}
 +
</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;">'''Timer specific constants''' <code> TIMER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TIMER_NAME_PREFIX = 'Timer';</code>
 +
| Name prefix for Timer Devices
 +
|-
 +
|}
 +
</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;">'''Timer device type''' <code> TIMER_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TIMER_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TIMER_TYPE_HARDWARE = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TIMER_TYPE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Timer device state''' <code> TIMER_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TIMER_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TIMER_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TIMER_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Timer device flag''' <code> TIMER_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TIMER_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TIMER_FLAG_WRAPPING = $00000001;</code>
 +
| Device provides a wrapping or self reloading counter
 +
|-
 +
| <code>TIMER_FLAG_COUNTER = $00000002;</code>
 +
| Device will appear as a continuously incrementing counter when read
 +
|-
 +
| <code>TIMER_FLAG_DOWN = $00000004;</code>
 +
| Device counts down from the starting value to zero (And optionally triggers an event)
 +
|-
 +
|}
 +
</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;">'''Timer event flag''' <code> TIMER_EVENT_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TIMER_EVENT_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TIMER_EVENT_FLAG_REPEAT = $00000001;</code>
 +
| Event will be repeated until cancelled
 +
|-
 +
| <code>TIMER_EVENT_FLAG_INTERRUPT = $00000002;</code>
 +
| Event will be dispatched by interrupt handler (If applicable). Caution: Events called by the interrupt handler must obey interrupt rules with regard to locks, memory allocation and latency.
 +
|-
 +
|}
 +
</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;">'''Random specific constants''' <code> RANDOM_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RANDOM_NAME_PREFIX = 'Random';</code>
 +
| Name prefix for Random Devices
 +
|-
 +
|}
 +
</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;">'''Random device type''' <code> RANDOM_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RANDOM_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RANDOM_TYPE_HARDWARE = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RANDOM_TYPE_SOFTWARE = 2;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RANDOM_TYPE_MAX = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Random device state''' <code> RANDOM_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RANDOM_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RANDOM_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RANDOM_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Random device flag''' <code> RANDOM_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RANDOM_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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;">'''Mailbox specific constants''' <code> MAILBOX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MAILBOX_NAME_PREFIX = 'Mailbox';</code>
 +
| Name prefix for Mailbox Devices
 +
|-
 +
|}
 +
</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;">'''Mailbox device type''' <code> MAILBOX_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MAILBOX_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>MAILBOX_TYPE_GPU = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MAILBOX_TYPE_LOCAL = 2;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MAILBOX_TYPE_MAX = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Mailbox device state''' <code> MAILBOX_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MAILBOX_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>MAILBOX_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MAILBOX_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Mailbox device flag''' <code> MAILBOX_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MAILBOX_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</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;">'''Watchdog specific constants''' <code> WATCHDOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WATCHDOG_NAME_PREFIX = 'Watchdog';</code>
 +
| Name prefix for Watchdog Devices
 +
|-
 +
|}
 +
</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;">'''Watchdog device type''' <code> WATCHDOG_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WATCHDOG_TYPE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>WATCHDOG_TYPE_HARDWARE = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WATCHDOG_TYPE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Watchdog device state''' <code> WATCHDOG_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WATCHDOG_STATE_DISABLED = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>WATCHDOG_STATE_ENABLED = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>WATCHDOG_STATE_MAX = 1;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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;">'''Watchdog device flag''' <code> WATCHDOG_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>WATCHDOG_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Device enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TDeviceEnumerate = function(Device:PDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''Device notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Device entry'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PDevice = ^TDevice;</code>
 +
 
 +
<code>TDevice = 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>Signature:LongWord;</code>
 +
| Signature for entry validation
 +
|-
 +
| <code>DeviceId:LongWord;</code>
 +
| Unique Id of this Device in the Device table
 +
|-
 +
| <code>DeviceState:LongWord;</code>
 +
| Device state (eg Registered/Unregistered)
 +
|-
 +
| <code>DeviceName:array[0..DEVICE_NAME_LENGTH - 1] of Char;</code>
 +
| The name of the Device (eg Keyboard0, Storage0 or Network0 etc)
 +
|-
 +
| <code>DeviceClass:LongWord;</code>
 +
| The class of this Device (eg DEVICE_CLASS_USB, DEVICE_CLASS_NETWORK, DEVICE_CLASS_STORAGE etc)
 +
|-
 +
| <code>DeviceBus:LongWord;</code>
 +
| The Bus type for the Device (eg DEVICE_BUS_USB)
 +
|-
 +
| <code>DeviceType:LongWord;</code>
 +
| A class specific Device type (eg KEYBOARD_TYPE_USB, MOUSE_TYPE_USB, NETWORK_TYPE_ETHERNET etc)
 +
|-
 +
| <code>DeviceFlags:LongWord;</code>
 +
| The class specific Device flags
 +
|-
 +
| <code>DeviceData:Pointer;</code>
 +
| A pointer to a class specific Device interface (eg PUSBDevice, PNetworkDevice or PStorageDevice etc) (Used by Drivers)
 +
|-
 +
| <code>DeviceDescription:array[0..DEVICE_DESC_LENGTH - 1] of Char;</code>
 +
| A description of the Device (eg BCM2835 PL011 UART)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PDevice;</code>
 +
| Previous entry in Device table
 +
|-
 +
| <code>Next:PDevice;</code>
 +
| Next entry in Device table
 +
|-
 +
|}
 +
</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%;"|&nbsp;
 +
|-
 +
| <code>Next:PFirmwareHandle;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Notifier entry'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PNotifier = ^TNotifier;</code>
 +
 
 +
<code>TNotifier = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Notifier Properties''
 +
|-
 +
| <code>Signature:LongWord;</code>
 +
| Signature for entry validation
 +
|-
 +
| <code>NotifierState:LongWord;</code>
 +
| Notifier state (eg Registered/Unregistered)
 +
|-
 +
| <code>NotifierFlags:LongWord;</code>
 +
| Notifier flags (eg NOTIFIER_FLAG_WORKER)
 +
|-
 +
| <code>Device:PDevice;</code>
 +
| The Device to notify on (or nil for all devices)
 +
|-
 +
| <code>DeviceClass:LongWord;</code>
 +
| The Device class to notify on (or DEVICE_CLASS_ANY for all devices)
 +
|-
 +
| <code>Callback:TDeviceNotification;</code>
 +
| The callback for device notifications
 +
|-
 +
| <code>Data:Pointer;</code>
 +
| A pointer to callback specific data to be passed with notifications (Optional)
 +
|-
 +
| <code>Notification:LongWord;</code>
 +
| The mask of events to notify on (eg DEVICE_NOTIFICATION_REGISTER etc)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PNotifier;</code>
 +
| Previous entry in Notifier table
 +
|-
 +
| <code>Next:PNotifier;</code>
 +
| Next entry in Notifier table
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Notifier task'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PNotifierTask = ^TNotifierTask;</code>
 +
 
 +
<code>TNotifierTask = 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%;"|&nbsp;
 +
|-
 +
| <code>Callback:TDeviceNotification;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Data:Pointer;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Notification:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Next:PNotifierTask;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</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%;"|&nbsp;
 +
|-
 +
| <code>Notification:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''Driver enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TDriverEnumerate = function(Driver:PDriver; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Driver entry'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PDriver = ^TDriver;</code>
 +
 
 +
<code>TDriver = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Signature:LongWord;</code>
 +
| Signature for entry validation
 +
|-
 +
| <code>DriverId:LongWord;</code>
 +
| Unique Id of this Driver in the Driver table
 +
|-
 +
| <code>DriverState:LongWord;</code>
 +
| Driver state (eg Registered/Unregistered)
 +
|-
 +
| <code>DriverName:array[0..DRIVER_NAME_LENGTH - 1] of Char;</code>
 +
| Descriptive name for the Driver (eg USB Mouse Driver)
 +
|-
 +
| <code>DriverClass:LongWord;</code>
 +
| The class of this Driver (eg DRIVER_CLASS_USB etc)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PDriver;</code>
 +
| Previous entry in Driver table
 +
|-
 +
| <code>Next:PDriver;</code>
 +
| Next entry in Driver table
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''Host enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THostEnumerate = function(Host:PHost; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Host entry'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PHost = ^THost;</code>
 +
 
 +
<code>THost = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Host Properties''
 +
|-
 +
| <code>Signature:LongWord;</code>
 +
| Signature for entry validation
 +
|-
 +
| <code>HostId:LongWord;</code>
 +
| Unique Id of this Host in the Host table
 +
|-
 +
| <code>HostState:LongWord;</code>
 +
| Host state (eg Registered/Unregistered)
 +
|-
 +
| <code>HostName:array[0..HOST_NAME_LENGTH - 1] of Char;</code>
 +
| Descriptive name for the Host (eg DWC OTG Host)
 +
|-
 +
| <code>HostClass:LongWord;</code>
 +
| The class of this Host (eg HOST_CLASS_USB etc)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PHost;</code>
 +
| Previous entry in Host table
 +
|-
 +
| <code>Next:PHost;</code>
 +
| Next entry in Host table
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Clock properties'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PClockProperties = ^TClockProperties;</code>
 +
 
 +
<code>TClockProperties = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Device flags (eg CLOCK_FLAG_WRITABLE)
 +
|-
 +
| <code>Rate:LongWord;</code>
 +
| Device current clock rate (Hz)
 +
|-
 +
| <code>MinRate:LongWord;</code>
 +
| Device minimum clock rate (Hz)
 +
|-
 +
| <code>MaxRate:LongWord;</code>
 +
| Device maximum clock rate (Hz)
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Clock enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockEnumerate = function(Clock:PClockDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device start'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceStart = function(Clock:PClockDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device stop'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceStop = function(Clock:PClockDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device read'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceRead = function(Clock:PClockDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device read 64'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceRead64 = function(Clock:PClockDevice):Int64;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device write 64'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceWrite64 = function(Clock:PClockDevice; const Value:Int64):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device get rate'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceGetRate = function(Clock:PClockDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device set rate'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceSetRate = function(Clock:PClockDevice; Rate:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device get properties'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TClockDeviceGetProperties = function(Clock:PClockDevice; Properties:PClockProperties):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Clock device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PClockDevice = ^TClockDevice;</code>
 +
 
 +
<code>TClockDevice = 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 Clock device
 +
|-
 +
|colspan="2"|''Clock Properties''
 +
|-
 +
| <code>ClockId:LongWord;</code>
 +
| Unique Id of this Clock device in the Clock device table
 +
|-
 +
| <code>ClockState:LongWord;</code>
 +
| Clock device state (eg CLOCK_STATE_ENABLED)
 +
|-
 +
| <code>DeviceStart:TClockDeviceStart;</code>
 +
| A device specific DeviceStart method implementing a standard clock device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceStop:TClockDeviceStop;</code>
 +
| A device specific DeviceStop method implementing a standard clock device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceRead:TClockDeviceRead;</code>
 +
| A device specific DeviceRead method implementing a standard clock device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceRead64:TClockDeviceRead64;</code>
 +
| A device specific DeviceRead64 method implementing a standard clock device interface (Mandatory)
 +
|-
 +
| <code>DeviceWrite64:TClockDeviceWrite64;</code>
 +
| A device specific DeviceWrite64 method implementing a standard clock device interface (Optional)
 +
|-
 +
| <code>DeviceGetRate:TClockDeviceGetRate;</code>
 +
| A device specific DeviceGetRate method implementing a standard clock device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceSetRate:TClockDeviceSetRate;</code>
 +
| A device specific DeviceSetRate method implementing a standard clock device interface (Optional)
 +
|-
 +
| <code>DeviceGetProperties:TClockDeviceGetProperties;</code>
 +
| A device specific DeviceGetProperties method implementing a standard clock device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>ReadCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Address:Pointer;</code>
 +
| Device register base address
 +
|-
 +
| <code>Rate:LongWord;</code>
 +
| Device rate (Hz)
 +
|-
 +
| <code>MinRate:LongWord;</code>
 +
| Device minimum rate (Hz)
 +
|-
 +
| <code>MaxRate:LongWord;</code>
 +
| Device maximum rate (Hz)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PClockDevice;</code>
 +
| Previous entry in Clock device table
 +
|-
 +
| <code>Next:PClockDevice;</code>
 +
| Next entry in Clock device table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Timer callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerCallback = TCounterCallback;</code>
 +
| style="width: 40%;"|Counter callback from Platform
 +
|-
 +
|}
 +
 
 +
'''Timer properties'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PTimerProperties = ^TTimerProperties;</code>
 +
 
 +
<code>TTimerProperties = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Device flags (eg TIMER_FLAG_WRAPPING)
 +
|-
 +
| <code>Bits:LongWord;</code>
 +
| Number of valid bits in timer read (eg 32 or 64)
 +
|-
 +
| <code>MinRate:LongWord;</code>
 +
| Device minimum clock rate (Hz)
 +
|-
 +
| <code>MaxRate:LongWord;</code>
 +
| Device maximum clock rate (Hz)
 +
|-
 +
| <code>MinInterval:LongWord;</code>
 +
| Device minimum interval (Ticks)
 +
|-
 +
| <code>MaxInterval:LongWord;</code>
 +
| Device maximum interval (Ticks)
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Timer waiter'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PTimerWaiter = ^TTimerWaiter;</code>
 +
 
 +
<code>TTimerWaiter = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: TTimerEvent is used already by the Threads unit
 +
|-
 +
| <code>Timer:PTimerDevice;</code>
 +
| Timer device this waiter belongs to
 +
|-
 +
| <code>Callback:TTimerCallback;</code>
 +
| Callback function to call when event occurs
 +
|-
 +
| <code>Data:Pointer;</code>
 +
| Pointer to pass to the callback function when event occurs
 +
|-
 +
| <code>Prev:PTimerWaiter;</code>
 +
| Previous event in the list
 +
|-
 +
| <code>Next:PTimerWaiter;</code>
 +
| Next event in the list
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Timer enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerEnumerate = function(Timer:PTimerDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''TImer device start'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceStart = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device stop'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceStop = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device read'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceRead = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device read 64'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceRead64 = function(Timer:PTimerDevice):Int64;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device wait'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceWait = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceEvent = function(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device cancel'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceCancel = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device get rate'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceGetRate = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device set rate'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceSetRate = function(Timer:PTimerDevice; Rate:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device get interval'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceGetInterval = function(Timer:PTimerDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device set interval'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceSetInterval = function(Timer:PTimerDevice; Interval:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device get properties'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TTimerDeviceGetProperties = function(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Timer device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PTimerDevice = ^TTimerDevice;</code>
 +
 
 +
<code>TTimerDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: Forward declared for TimerWaiter
 +
|-
 +
|colspan="2"|''Device Properties''
 +
|-
 +
| <code>Device:TDevice;</code>
 +
| The Device entry for this Timer device
 +
|-
 +
|colspan="2"|''Timer Properties''
 +
|-
 +
| <code>TimerId:LongWord;</code>
 +
| Unique Id of this Timer device in the Timer device table
 +
|-
 +
| <code>TimerState:LongWord;</code>
 +
| Timer device state (eg TIMER_STATE_ENABLED)
 +
|-
 +
| <code>DeviceStart:TTimerDeviceStart;</code>
 +
| A device specific DeviceStart method implementing a standard timer device interface (Mandatory)
 +
|-
 +
| <code>DeviceStop:TTimerDeviceStop;</code>
 +
| A device specific DeviceStop method implementing a standard timer device interface (Mandatory)
 +
|-
 +
| <code>DeviceRead:TTimerDeviceRead;</code>
 +
| A device specific DeviceRead method implementing a standard timer device interface (One of Read or Read64 is Mandatory)
 +
|-
 +
| <code>DeviceRead64:TTimerDeviceRead64;</code>
 +
| A device specific DeviceRead64 method implementing a standard timer device interface (One of Read or Read64 is Mandatory
 +
|-
 +
| <code>DeviceWait:TTimerDeviceWait;</code>
 +
| A device specific DeviceWait method implementing a standard timer device interface (Or nil if the operation is not supported)
 +
|-
 +
| <code>DeviceEvent:TTimerDeviceEvent;</code>
 +
| A device specific DeviceEvent method implementing a standard timer device interface (Or nil if the operation is not supported)
 +
|-
 +
| <code>DeviceCancel:TTimerDeviceCancel;</code>
 +
| A device specific DeviceCancel method implementing a standard timer device interface (Or nil if the operation is not supported)
 +
|-
 +
| <code>DeviceGetRate:TTimerDeviceGetRate;</code>
 +
| A device specific DeviceGetRate method implementing a standard timer device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceSetRate:TTimerDeviceSetRate;</code>
 +
| A device specific DeviceSetRate method implementing a standard timer device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceGetInterval:TTimerDeviceGetInterval;</code>
 +
| A device specific DeviceGetInterval method implementing a standard timer device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceSetInterval:TTimerDeviceSetInterval;</code>
 +
| A device specific DeviceSetInterval method implementing a standard timer device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceGetProperties:TTimerDeviceGetProperties;</code>
 +
| A device specific DeviceGetProperties method implementing a standard timer device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>ReadCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WaitCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EventCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Address:Pointer;</code>
 +
| Device register base address
 +
|-
 +
| <code>Rate:LongWord;</code>
 +
| Device rate (Hz)
 +
|-
 +
| <code>Interval:LongWord;</code>
 +
| Device interval (Ticks)
 +
|-
 +
| <code>Properties:TTimerProperties;</code>
 +
| Device properties
 +
|-
 +
|colspan="2"|''Event Properties''
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Event flags for this timer (eg TIMER_EVENT_FLAG_REPEAT)
 +
|-
 +
| <code>Count:Longword;</code>
 +
| Count of threads and events waiting for this timer
 +
|-
 +
| <code>Event:TEventHandle;</code>
 +
| Event for threads waiting for this timer
 +
|-
 +
| <code>Waiters:PTimerWaiter;</code>
 +
| List of events waiting for this timer
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PTimerDevice;</code>
 +
| Previous entry in Timer device table
 +
|-
 +
| <code>Next:PTimerDevice;</code>
 +
| Next entry in Timer device table
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''Random enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomEnumerate = function(Random:PRandomDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device start'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceStart = function(Random:PRandomDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device stop'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceStop = function(Random:PRandomDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device seed'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceSeed = function(Random:PRandomDevice; Seed:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device read byte'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceReadByte = function(Random:PRandomDevice):Byte;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device read word'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceReadWord = function(Random:PRandomDevice):Word;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device read long word'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceReadLongWord = function(Random:PRandomDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device read quad word'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceReadQuadWord = function(Random:PRandomDevice):Int64;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device read double'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TRandomDeviceReadDouble = function(Random:PRandomDevice):Double;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Random device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PRandomDevice = ^TRandomDevice;</code>
 +
 
 +
<code>TRandomDevice = 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 Random device
 +
|-
 +
|colspan="2"|''Random Properties''
 +
|-
 +
| <code>RandomId:LongWord;</code>
 +
| Unique Id of this Random device in the Random device table
 +
|-
 +
| <code>RandomState:LongWord;</code>
 +
| Random device state (eg RANDOM_STATE_ENABLED)
 +
|-
 +
| <code>DeviceStart:TRandomDeviceStart;</code>
 +
| A device specific DeviceStart method implementing a standard random device interface (Mandatory)
 +
|-
 +
| <code>DeviceStop:TRandomDeviceStop;</code>
 +
| A device specific DeviceStop method implementing a standard random device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceSeed:TRandomDeviceSeed;</code>
 +
| A device specific DeviceSeed method implementing a standard random device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceReadByte:TRandomDeviceReadByte;</code>
 +
| A device specific DeviceReadByte method implementing a standard random device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceReadWord:TRandomDeviceReadWord;</code>
 +
| A device specific DeviceReadWord method implementing a standard random device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceReadLongWord:TRandomDeviceReadLongWord;</code>
 +
| A device specific DeviceReadLongWord method implementing a standard random device interface (Mandatory)
 +
|-
 +
| <code>DeviceReadQuadWord:TRandomDeviceReadQuadWord;</code>
 +
| A device specific DeviceReadQuadWord method implementing a standard random device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceReadDouble:TRandomDeviceReadDouble;</code>
 +
| A device specific DeviceReadDouble method implementing a standard random device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>SeedCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ReadCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Address:Pointer;</code>
 +
| Device register base address
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PRandomDevice;</code>
 +
| Previous entry in Random device table
 +
|-
 +
| <code>Next:PRandomDevice;</code>
 +
| Next entry in Random device table
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Mailbox enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxEnumerate = function(Mailbox:PMailboxDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''Mailbox device start'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceStart = function(Mailbox:PMailboxDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device stop'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceStop = function(Mailbox:PMailboxDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device receive'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceReceive = function(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device send'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceSend = function(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device call'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceCall = function(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device get timeout'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceGetTimeout = function(Mailbox:PMailboxDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device set timeout'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TMailboxDeviceSetTimeout = function(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Mailbox device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PMailboxDevice = ^TMailboxDevice;</code>
 +
 
 +
<code>TMailboxDevice = 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 Mailbox device
 +
|-
 +
|colspan="2"|''Mailbox Properties''
 +
|-
 +
| <code>MailboxId:LongWord;</code>
 +
| Unique Id of this Mailbox device in the Mailbox device table
 +
|-
 +
| <code>MailboxState:LongWord;</code>
 +
| Mailbox device state (eg MAILBOX_STATE_ENABLED)
 +
|-
 +
| <code>DeviceStart:TMailboxDeviceStart;</code>
 +
| A device specific DeviceStart method implementing a standard mailbox device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceStop:TMailboxDeviceStop;</code>
 +
| A device specific DeviceStop method implementing a standard mailbox device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceReceive:TMailboxDeviceReceive;</code>
 +
| A device specific DeviceReceive method implementing a standard mailbox device interface (Mandatory)
 +
|-
 +
| <code>DeviceSend:TMailboxDeviceSend;</code>
 +
| A device specific DeviceSend method implementing a standard mailbox device interface (Mandatory)
 +
|-
 +
| <code>DeviceCall:TMailboxDeviceCall;</code>
 +
| A device specific DeviceCall method implementing a standard mailbox device interface (Mandatory)
 +
|-
 +
| <code>DeviceGetTimeout:TMailboxDeviceGetTimeout;</code>
 +
| A device specific DeviceGetTimeout method implementing a standard mailbox device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceSetTimeout:TMailboxDeviceSetTimeout;</code>
 +
| A device specific DeviceSetTimeout method implementing a standard mailbox device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>ReceiveCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SendCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CallCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Address:Pointer;</code>
 +
| Device register base address
 +
|-
 +
| <code>Timeout:LongWord;</code>
 +
| Device timeout (Milliseconds)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PMailboxDevice;</code>
 +
| Previous entry in Mailbox device table
 +
|-
 +
| <code>Next:PMailboxDevice;</code>
 +
| Next entry in Mailbox device table
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''Watchdog enumeration callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogEnumerate = function(Watchdog:PWatchdogDevice; Data:Pointer):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog notification callback'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device start'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogDeviceStart = function(Watchdog:PWatchdogDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device stop'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogDeviceStop = function(Watchdog:PWatchdogDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device refresh'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogDeviceRefresh = function(Watchdog:PWatchdogDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device get remain'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogDeviceGetRemain = function(Watchdog:PWatchdogDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device get timeout'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogDeviceGetTimeout = function(Watchdog:PWatchdogDevice):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device set timeout'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TWatchdogDeviceSetTimeout = function(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''Watchdog device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PWatchdogDevice = ^TWatchdogDevice;</code>
 +
 
 +
<code>TWatchdogDevice = 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 Watchdog device
 +
|-
 +
|colspan="2"|''Watchdog Properties''
 +
|-
 +
| <code>WatchdogId:LongWord;</code>
 +
| Unique Id of this Watchdog device in the Watchdog device table
 +
|-
 +
| <code>WatchdogState:LongWord;</code>
 +
| Watchdog device state (eg WATCHDOG_STATE_ENABLED)
 +
|-
 +
| <code>DeviceStart:TWatchdogDeviceStart;</code>
 +
| A device specific DeviceStart method implementing a standard watchdog device interface (Mandatory)
 +
|-
 +
| <code>DeviceStop:TWatchdogDeviceStop;</code>
 +
| A device specific DeviceStop method implementing a standard watchdog device interface (Mandatory)
 +
|-
 +
| <code>DeviceRefresh:TWatchdogDeviceRefresh;</code>
 +
| A device specific DeviceRefresh method implementing a standard watchdog device interface (Mandatory)
 +
|-
 +
| <code>DeviceGetRemain:TWatchdogDeviceGetRemain;</code>
 +
| A device specific DeviceGetRemain method implementing a standard watchdog device interface (Mandatory)
 +
|-
 +
| <code>DeviceGetTimeout:TWatchdogDeviceGetTimeout;</code>
 +
| A device specific DeviceGetTimeout method implementing a standard watchdog device interface (Or nil if the default method is suitable)
 +
|-
 +
| <code>DeviceSetTimeout:TWatchdogDeviceSetTimeout;</code>
 +
| A device specific DeviceSetTimeout method implementing a standard watchdog device interface (Or nil if the default method is suitable)
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>StartCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>StopCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RefreshCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Device lock
 +
|-
 +
| <code>Address:Pointer;</code>
 +
| Device register base address
 +
|-
 +
| <code>Timeout:LongWord;</code>
 +
| Device timeout (Milliseconds)
 +
|-
 +
|colspan="2"|''Internal Properties''
 +
|-
 +
| <code>Prev:PWatchdogDevice;</code>
 +
| Previous entry in Watchdog device table
 +
|-
 +
| <code>Next:PWatchdogDevice;</code>
 +
| Next entry in Watchdog device table
 +
|-
 +
|}
 +
</div></div> 
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Device logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>DEVICE_DEFAULT_LOG_LEVEL:LongWord = DEVICE_LOG_LEVEL_DEBUG;</code>
 +
| style="width: 40%;"|Minimum level for Device 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>DEVICE_LOG_ENABLED:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
 +
 +
 +
'''Initialization 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;">procedure DevicesInit;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the Devices unit and device, notifier and driver tables</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Called only during system startup
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
'''Device functions'''
 
'''Device functions'''
  
 
<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 function DeviceCreate:PDevice;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function DeviceCreate:PDevice;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Device entry</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Device entry</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;"
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Device entry or nil if device could not be created
 
| Pointer to new Device entry or nil if device could not be created
 
|-
 
|-
Line 45: Line 2,600:
 
{| 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 device (Including the device entry)
 
| Size in bytes to allocate for new device (Including the device entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Device entry or nil if device could not be created
 
| Pointer to new Device entry or nil if device could not be created
 
|-
 
|-
Line 60: Line 2,615:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to destroy
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 72: Line 2,630:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to get the name from
 +
|-
 +
! Return
 +
| The name of the device or a blank string on error
 
|-
 
|-
 
|}
 
|}
Line 84: Line 2,645:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to set the name for
 +
|-
 +
! Name
 +
| The device name to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 96: Line 2,663:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to get the description from
 +
|-
 +
! Return
 +
| The description of the device or a blank string on error
 
|-
 
|-
 
|}
 
|}
Line 108: Line 2,678:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to set the description for
 +
|-
 +
! Description
 +
| The device description to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 120: Line 2,696:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to register
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 132: Line 2,711:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to deregister
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 140: Line 2,722:
 
<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 DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device by ID 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;"
 
|-
 
|-
! '''Note'''
+
! DeviceClass
| To be documented
+
| The class of the device to find (DEVICE_CLASS_ANY for all classes)
 +
|-
 +
! DeviceId
 +
| The ID number of the device to find
 +
|-
 +
! Return
 +
| Pointer to device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 151: Line 2,739:
 
<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 DeviceFindByDeviceData(DeviceData:Pointer):PDevice;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a device with matching DeviceData property 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;"
 
|-
 
|-
! '''Note'''
+
! DeviceData
| To be documented
+
| The value to match against the DeviceData property
 +
|-
 +
! Return
 +
| Pointer to device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 163: 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 DeviceFindByDescription(const Description: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:''' To be documented</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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Name
| To be documented
+
| The name of the device to find (eg Timer0)
 +
|-
 +
! 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 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 class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| 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
 +
| The description of the device to find (eg BCM2836 ARM Timer)
 +
|-
 +
! Return
 +
| Pointer to device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 176: Line 2,821:
 
<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 DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all devices 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;"
 
|-
 
|-
! '''Note'''
+
! DeviceClass
| To be documented
+
| The class of device to enumerate (DEVICE_CLASS_ANY for all classes)
 +
|-
 +
! Callback
 +
| The callback function to call for each device in the table
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback for each device in the table
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 188: Line 2,842:
 
<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 DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a notification for device changes</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;"
 
|-
 
|-
! '''Note'''
+
! Device
| To be documented
+
| The device to notify changes for (Optional, pass nil for all devices)
 +
|-
 +
! DeviceClass
 +
| The class of device to notify changes for (DEVICE_CLASS_ANY for all classes)
 +
|-
 +
! Callback
 +
| The function to call when a notification event occurs
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback when a notification event occurs
 +
|-
 +
! Notification
 +
| The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
 +
|-
 +
! Flags
 +
| 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 204: Line 3,128:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 216: Line 3,140:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 228: Line 3,152:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 240: Line 3,164:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be 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;">procedure NotifierRetry(Retry:PNotifierRetry);</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 NotifierWorker(Task:PNotifierTask);</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
 
|-
 
|-
 
|}
 
|}
Line 255: Line 3,203:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Driver entry or nil if driver could not be created
 
| Pointer to new Driver entry or nil if driver could not be created
 
|-
 
|-
Line 267: Line 3,215:
 
{| 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 driver (Including the driver entry)
 
| Size in bytes to allocate for new driver (Including the driver entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Driver entry or nil if driver could not be created
 
| Pointer to new Driver entry or nil if driver could not be created
 
|-
 
|-
Line 282: Line 3,230:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Driver
| To be documented
+
| The driver to destroy
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 294: Line 3,245:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Driver
| To be documented
+
| The driver to get the name from
 +
|-
 +
! Return
 +
| The name of the driver or a blank string on error
 
|-
 
|-
 
|}
 
|}
Line 306: Line 3,260:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Driver
| To be documented
+
| The driver to set the name for
 +
|-
 +
! Name
 +
| The driver name to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 318: Line 3,278:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Driver
| To be documented
+
| The driver to register
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 330: Line 3,293:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Driver
| To be documented
+
| The driver to deregister
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 338: Line 3,304:
 
<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 DriverFind(DriverClass,DriverId:LongWord):PDriver;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function DriverFind(DriverClass,DriverId:LongWord):PDriver;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by ID in the driver 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;"
 
|-
 
|-
! '''Note'''
+
! DriverClass
| To be documented
+
| The class of the driver to find (DRIVER_CLASS_ANY for all classes)
 +
|-
 +
! DriverId
 +
| The ID number of the driver to find
 +
|-
 +
! Return
 +
| Pointer to driver entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 350: Line 3,322:
 
<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 DriverFindByName(const Name:String):PDriver;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function DriverFindByName(const Name:String):PDriver;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by name in the driver 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;"
 
|-
 
|-
! '''Note'''
+
! Name
| To be documented
+
| The name of the driver to find (eg USB Hub Driver)
 +
|-
 +
! Return
 +
| Pointer to driver entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 362: Line 3,337:
 
<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 DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all drivers in the driver 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;"
 
|-
 
|-
! '''Note'''
+
! DriverClass
| To be documented
+
| The class of driver to enumerate (DRIVER_CLASS_ANY for all classes)
 +
|-
 +
! Callback
 +
| The callback function to call for each driver in the table
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback for each driver in the table
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 377: Line 3,361:
 
<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 ClockDeviceStart(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceStart(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Start the counter of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The Clock device to start
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 389: Line 3,376:
 
<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 ClockDeviceStop(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceStop(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Stop the counter of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The Clock device to stop
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 401: Line 3,391:
 
<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 ClockDeviceRead(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceRead(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the counter value of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The Clock device to read from
 +
|-
 +
! Return
 +
| The 32 bit counter value of the clock or 0 on failure
 
|-
 
|-
 
|}
 
|}
Line 413: Line 3,406:
 
<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 ClockDeviceRead64(Clock:PClockDevice):Int64;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceRead64(Clock:PClockDevice):Int64;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the counter value of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The Clock device to read from
 +
|-
 +
! Return
 +
| The 64 bit counter value of the clock or 0 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 ClockDeviceWrite64(Clock:PClockDevice; const Value:Int64):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write the counter value of the specified clock device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Clock
 +
| The Clock device to write to
 +
|-
 +
! Value
 +
| The counter value to write
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the counter was set or another error code on failure
 +
|-
 +
! Note
 +
| Not all clock devices support setting the counter value, will return an error if unsupported.
 
|-
 
|-
 
|}
 
|}
Line 425: Line 3,442:
 
<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 ClockDeviceGetRate(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceGetRate(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current clock rate in Hz of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The Clock device to get the rate from
 +
|-
 +
! Return
 +
| The current clock rate in Hz or 0 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 ClockDeviceSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current clock rate in Hz of the specified clock device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Clock
 +
| The Clock device to set the rate for
 +
|-
 +
! Rate
 +
| The clock rate in Hz to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the clock rate was set or another error code on failure
 +
|-
 +
! Note
 +
| Not all clock devices support setting the clock rate, will return an error if unsupported.
 +
|-
 +
|}
 +
</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 ClockDeviceProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified clock device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Clock
 +
| The Clock device to get properties from
 +
|-
 +
! Properties
 +
| Pointer to a TClockProperties structure to fill in
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| Replaced by ClockDeviceGetProperties for consistency
 +
|-
 +
|}
 +
</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 ClockDeviceGetProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified clock device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Clock
 +
| The Clock device to get properties from
 +
|-
 +
! Properties
 +
| Pointer to a TClockProperties structure to fill in
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 441: Line 3,521:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Clock entry or nil if Clock could not be created
 
| Pointer to new Clock entry or nil if Clock could not be created
 
|-
 
|-
Line 453: Line 3,533:
 
{| 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 Clock (Including the Clock entry)
 
| Size in bytes to allocate for new Clock (Including the Clock entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Clock entry or nil if Clock could not be created
 
| Pointer to new Clock entry or nil if Clock could not be created
 
|-
 
|-
Line 464: Line 3,544:
 
<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 ClockDeviceDestroy(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceDestroy(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Clock entry</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing clock entry</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;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The clock device to destroy
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 476: Line 3,559:
 
<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 ClockDeviceRegister(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceRegister(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Clock in the Clock table</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new clock in the clock 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;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The clock device to register
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 488: Line 3,574:
 
<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 ClockDeviceDeregister(Clock:PClockDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceDeregister(Clock:PClockDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Clock from the Clock table</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a clock from the clock 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;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The clock device to deregister
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 500: Line 3,589:
 
<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 ClockDeviceFind(ClockId:LongWord):PClockDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceFind(ClockId:LongWord):PClockDevice;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a clock device by ID in the clock 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;"
 
|-
 
|-
! '''Note'''
+
! ClockId
| To be documented
+
| The ID number of the clock to find
 +
|-
 +
! Return
 +
| Pointer to clock device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 512: Line 3,604:
 
<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 ClockDeviceFindByName(const Name:String):PClockDevice; inline;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceFindByName(const Name:String):PClockDevice; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a clock device by name in the clock 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;"
 
|-
 
|-
! '''Note'''
+
! Name
| To be documented
+
| The name of the clock to find (eg Clock0)
 +
|-
 +
! Return
 +
| Pointer to clock device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 524: Line 3,619:
 
<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 ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a clock device by description in the clock 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;"
 
|-
 
|-
! '''Note'''
+
! Description
| To be documented
+
| The description of the clock to find (eg BCM2836 ARM Timer Clock)
 +
|-
 +
! Return
 +
| Pointer to clock device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 536: Line 3,634:
 
<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 ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all clock devices in the clock 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;"
 
|-
 
|-
! '''Note'''
+
! Callback
| To be documented
+
| The callback function to call for each clock in the table
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback for each clock in the table
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 548: Line 3,652:
 
<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 ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a notification for clock device changes</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;"
 
|-
 
|-
! '''Note'''
+
! Clock
| To be documented
+
| The clock device to notify changes for (Optional, pass nil for all clocks)
 +
|-
 +
! Callback
 +
| The function to call when a notification event occurs
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback when a notification event occurs
 +
|-
 +
! Notification
 +
| The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
 +
|-
 +
! Flags
 +
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER)
 
|-
 
|-
 
|}
 
|}
Line 563: Line 3,679:
 
<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 TimerDeviceStart(Timer:PTimerDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceStart(Timer:PTimerDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Start the clock and counter of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to start
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 575: Line 3,694:
 
<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 TimerDeviceStop(Timer:PTimerDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceStop(Timer:PTimerDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Stop the clock and counter of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to stop
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 587: Line 3,709:
 
<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 TimerDeviceRead(Timer:PTimerDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceRead(Timer:PTimerDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the current value of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to read from
 +
|-
 +
! Return
 +
| The 32 bit current value of the timer or 0 on failure
 
|-
 
|-
 
|}
 
|}
Line 599: Line 3,724:
 
<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 TimerDeviceRead64(Timer:PTimerDevice):Int64;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceRead64(Timer:PTimerDevice):Int64;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the current value of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to read from
 +
|-
 +
! Return
 +
| The 64 bit current value of the timer or 0 on failure
 
|-
 
|-
 
|}
 
|}
Line 611: Line 3,739:
 
<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 TimerDeviceWait(Timer:PTimerDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceWait(Timer:PTimerDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wait for the current interval to expire on the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to wait for
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the interval expired or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 623: Line 3,754:
 
<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 TimerDeviceEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Schedule a function to be called when the current interval expires on the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to schedule the callback for
 +
|-
 +
! Flags
 +
| The flags to control the event (eg TIMER_EVENT_FLAG_REPEAT)
 +
|-
 +
! Callback
 +
| The function to be called when the interval expires
 +
|-
 +
! Data
 +
| A pointer to be passed to the function when the interval expires (Optional)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the callback was scheduled successfully 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 TimerDeviceCancel(Timer:PTimerDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Cancel a previously scheduled event callback function on the specified Timer device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Timer
 +
| The Timer device to cancel the callback for
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 635: Line 3,793:
 
<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 TimerDeviceGetRate(Timer:PTimerDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceGetRate(Timer:PTimerDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current clock rate in Hz of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to get the rate from
 +
|-
 +
! Return
 +
| The current clock rate in Hz or 0 on failure
 
|-
 
|-
 
|}
 
|}
Line 647: Line 3,808:
 
<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 TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current clock rate in Hz of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to set the rate for
 +
|-
 +
! Rate
 +
| The clock rate in Hz to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the clock rate was set or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 659: Line 3,826:
 
<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 TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current interval in ticks of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to get the interval from
 +
|-
 +
! Return
 +
| The current interval in ticks or 0 on failure (or not set)
 +
|-
 +
! Note
 +
| The tick rate is determined by the clock rate
 
|-
 
|-
 
|}
 
|}
Line 671: Line 3,844:
 
<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 TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current interval in ticks of the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to set the interval for
 +
|-
 +
! Interval
 +
| The interval in ticks to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the interval was set or another error code on failure
 +
|-
 +
! Note
 +
| The tick rate is determined by the clock rate
 
|-
 
|-
 
|}
 
|}
Line 682: Line 3,864:
 
<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 TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified 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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The Timer device to get properties from
 +
|-
 +
! Properties
 +
| Pointer to a TTimerProperties structure to fill in
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| Replaced by TimerDeviceGetProperties for consistency
 +
|-
 +
|}
 +
</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 TimerDeviceGetProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the properties for the specified Timer device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Timer
 +
| The Timer device to get properties from
 +
|-
 +
! Properties
 +
| Pointer to a TTimerProperties structure to fill in
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 699: Line 3,908:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Timer entry or nil if Timer could not be created
 
| Pointer to new Timer entry or nil if Timer could not be created
 
|-
 
|-
Line 711: Line 3,920:
 
{| 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 Timer (Including the Timer entry)
 
| Size in bytes to allocate for new Timer (Including the Timer entry)
 
|-
 
|-
! '''Return'''
+
! Return
 
| Pointer to new Timer entry or nil if Timer could not be created
 
| Pointer to new Timer entry or nil if Timer could not be created
 
|-
 
|-
Line 726: Line 3,935:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The timer device to destroy
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 738: Line 3,950:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The timer device to register
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 750: Line 3,965:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Timer
| To be documented
+
| The timer device to deregister
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 758: Line 3,976:
 
<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 TimerDeviceFind(TimerId:LongWord):PTimerDevice;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceFind(TimerId:LongWord):PTimerDevice;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a timer device by ID in the timer 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;"
 
|-
 
|-
! '''Note'''
+
! TimerId
| To be documented
+
| The ID number of the timer to find
 +
|-
 +
! Return
 +
| Pointer to timer device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 770: Line 3,991:
 
<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 TimerDeviceFindByName(const Name:String):PTimerDevice; inline;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceFindByName(const Name:String):PTimerDevice; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a timer device by name in the timer 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;"
 
|-
 
|-
! '''Note'''
+
! Name
| To be documented
+
| The name of the timer to find (eg Timer0)
 +
|-
 +
! Return
 +
| Pointer to timer device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 782: Line 4,006:
 
<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 TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a timer device by description in the timer 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;"
 
|-
 
|-
! '''Note'''
+
! Description
| To be documented
+
| The description of the timer to find (eg BCM2836 ARM Timer)
 +
|-
 +
! Return
 +
| Pointer to timer device entry or nil if not found
 
|-
 
|-
 
|}
 
|}
Line 794: Line 4,021:
 
<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 TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enumerate all timer devices in the timer 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;"
 
|-
 
|-
! '''Note'''
+
! Callback
| To be documented
+
| The callback function to call for each timer in the table
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback for each timer in the table
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 
|-
 
|-
 
|}
 
|}
Line 806: Line 4,039:
 
<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 TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a notification for timer device changes</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Timer
 +
| The timer device to notify changes for (Optional, pass nil for all timers)
 +
|-
 +
! Callback
 +
| The function to call when a notification event occurs
 +
|-
 +
! Data
 +
| A private data pointer to pass to callback when a notification event occurs
 +
|-
 +
! Notification
 +
| The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
 +
|-
 +
! Flags
 +
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Random device 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 RandomDeviceStart(Random:PRandomDevice):LongWord;</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;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be 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 RandomDeviceStop(Random:PRandomDevice):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 RandomDeviceSeed(Random:PRandomDevice; Seed: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;">function RandomDeviceReadByte(Random:PRandomDevice):Byte;</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 RandomDeviceReadWord(Random:PRandomDevice):Word;</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 RandomDeviceReadLongWord(Random:PRandomDevice):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 RandomDeviceReadQuadWord(Random:PRandomDevice):Int64;</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 RandomDeviceReadDouble(Random:PRandomDevice):Double;</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 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
 +
|-
 +
|}
 +
</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 RandomDeviceCreate:PRandomDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Random entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| Pointer to new Random entry or nil if Random could not be 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 RandomDeviceCreateEx(Size:LongWord):PRandomDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Random entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Size
 +
| Size in bytes to allocate for new Random (Including the Random entry)
 +
|-
 +
! Return
 +
| Pointer to new Random entry or nil if Random could not be 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 RandomDeviceDestroy(Random:PRandomDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Random entry</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 RandomDeviceRegister(Random:PRandomDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Random in the Random 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;">function RandomDeviceDeregister(Random:PRandomDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Random from the Random 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;">function RandomDeviceFind(RandomId:LongWord):PRandomDevice;</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 RandomDeviceFindByName(const Name:String):PRandomDevice; 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 RandomDeviceFindByDescription(const Description:String):PRandomDevice; 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 RandomDeviceEnumerate(Callback:TRandomEnumerate; Data: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 RandomDeviceNotification(Random:PRandomDevice; Callback:TRandomNotification; Data:Pointer; Notification,Flags: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
 
|-
 
|-
 
|}
 
|}
Line 817: Line 4,296:
 
<br />
 
<br />
  
 +
'''Mailbox device 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 MailboxDeviceStart(Mailbox:PMailboxDevice):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 MailboxDeviceStop(Mailbox:PMailboxDevice):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 MailboxDeviceReceive(Mailbox:PMailboxDevice; Channel: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;">function MailboxDeviceSend(Mailbox:PMailboxDevice; Channel,Data: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;">function MailboxDeviceCall(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response: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;">function MailboxDeviceGetTimeout(Mailbox:PMailboxDevice):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 MailboxDeviceSetTimeout(Mailbox:PMailboxDevice; Timeout: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;">function MailboxDeviceCreate:PMailboxDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Mailbox entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| Pointer to new Mailbox entry or nil if Mailbox could not be 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 MailboxDeviceCreateEx(Size:LongWord):PMailboxDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Mailbox entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Size
 +
| Size in bytes to allocate for new Mailbox (Including the Mailbox entry)
 +
|-
 +
! Return
 +
| Pointer to new Mailbox entry or nil if Mailbox could not be 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 MailboxDeviceDestroy(Mailbox:PMailboxDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Mailbox entry</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 MailboxDeviceRegister(Mailbox:PMailboxDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Mailbox in the Mailbox 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;">function MailboxDeviceDeregister(Mailbox:PMailboxDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Mailbox from the Mailbox 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;">function MailboxDeviceFind(MailboxId:LongWord):PMailboxDevice;</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 MailboxDeviceFindByName(const Name:String):PMailboxDevice; 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 MailboxDeviceFindByDescription(const Description:String):PMailboxDevice; 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 MailboxDeviceEnumerate(Callback:TMailboxEnumerate; Data: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 MailboxDeviceNotification(Mailbox:PMailboxDevice; Callback:TMailboxNotification; Data:Pointer; Notification,Flags: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 />
 +
 +
'''Watchdog device 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 WatchdogDeviceStart(Watchdog:PWatchdogDevice):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 WatchdogDeviceStop(Watchdog:PWatchdogDevice):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 WatchdogDeviceRefresh(Watchdog:PWatchdogDevice):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 WatchdogDeviceGetRemain(Watchdog:PWatchdogDevice):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 WatchdogDeviceGetTimeout(Watchdog:PWatchdogDevice):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 WatchdogDeviceSetTimeout(Watchdog:PWatchdogDevice; Timeout: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;">function WatchdogDeviceCreate:PWatchdogDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Watchdog entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| Pointer to new Watchdog entry or nil if Watchdog could not be 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 WatchdogDeviceCreateEx(Size:LongWord):PWatchdogDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new Watchdog entry</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Size
 +
| Size in bytes to allocate for new Watchdog (Including the Watchdog entry)
 +
|-
 +
! Return
 +
| Pointer to new Watchdog entry or nil if Watchdog could not be 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 WatchdogDeviceDestroy(Watchdog:PWatchdogDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing Watchdog entry</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 WatchdogDeviceRegister(Watchdog:PWatchdogDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Watchdog in the Watchdog 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;">function WatchdogDeviceDeregister(Watchdog:PWatchdogDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Watchdog from the Watchdog 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;">function WatchdogDeviceFind(WatchdogId:LongWord):PWatchdogDevice;</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 WatchdogDeviceFindByName(const Name:String):PWatchdogDevice; 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 WatchdogDeviceFindByDescription(const Description:String):PWatchdogDevice; 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 WatchdogDeviceEnumerate(Callback:TWatchdogEnumerate; Data: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 WatchdogDeviceNotification(Watchdog:PWatchdogDevice; Callback:TWatchdogNotification; Data:Pointer; Notification,Flags: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 />
 +
 +
'''RTL clock 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 SysClockRead: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 SysClockRead64:Int64;</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 />
 +
 +
'''RTL timer (counter) 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 SysTimerAvailable:Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a timer device is available</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 SysTimerRead:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the current value of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| The 32 bit current value of the counter  or 0 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 SysTimerRead64:Int64;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read the current value of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| The 64 bit current value of the counter  or 0 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 SysTimerWait:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wait for the current interval to expire on the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the interval expired 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 SysTimerEvent(Callback:TTimerCallback; Data:Pointer):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Schedule a function to be called when the current interval expires on the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Callback
 +
| The function to be called when the interval expires
 +
|-
 +
! Data
 +
| A pointer to be pass to the function when the interval expires (Optional)
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the callback was scheduled successfully 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 SysTimerCancel:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Cancel a previously scheduled event callback function on the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the callback was cancelled successfully 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 SysTimerGetRate:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current clock rate in Hz of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| The current clock rate in Hz or 0 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 SysTimerSetRate(Rate:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current clock rate in Hz of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Rate
 +
| The clock rate in Hz to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the clock rate was set 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 SysTimerGetInterval:LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current interval in ticks of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Return
 +
| The current interval in ticks or 0 on failure (or not set)
 +
|-
 +
! Note
 +
| The tick rate is determined by the clock rate
 +
|-
 +
|}
 +
</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 SysTimerSetInterval(Interval:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current interval in ticks of the default counter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Interval
 +
| The interval in ticks to set
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if the interval was set or another error code on failure
 +
|-
 +
! Note
 +
| The tick rate is determined by the clock rate
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''RTL random 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 SysRandomAvailable:Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a random (RNG) device is available</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 SysRandomize;</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 SysRandomSeed(Seed: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 SysRandomReadLongInt(Limit:LongInt):LongInt;</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 SysRandomReadInt64(Limit:Int64):Int64;</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 SysRandomReadDouble:Double;</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 />
 +
 +
'''RTL watchdog 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 SysWatchdogAvailable:Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a watchdog timer device is available</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 SysWatchdogStart(Milliseconds: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;">function SysWatchdogStop: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 SysWatchdogRefresh(Milliseconds: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 />
 +
 +
'''Device 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 DeviceGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 DeviceCheck(Device:PDevice):PDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Device is 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;"
 +
|-
 +
! 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 NotifierGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 NotifierCheck(Notifier:PNotifier):PNotifier;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Notifier is in the notifier 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;">function DeviceBusToString(DeviceBus:LongWord):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;">function DeviceStateToString(DeviceState:LongWord):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;">function DeviceClassToString(DeviceClass:LongWord):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;">function NotificationToString(Notification:LongWord):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 DeviceLog(Level:LongWord; Device:PDevice; 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 DeviceLogInfo(Device:PDevice; 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 DeviceLogWarn(Device:PDevice; 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 DeviceLogError(Device:PDevice; 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 DeviceLogDebug(Device:PDevice; 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 />
 +
 +
'''Driver 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 DriverGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 DriverCheck(Driver:PDriver):PDriver;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Driver is in the driver 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;">function DriverStateToString(DriverState:LongWord):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;">function DriverClassToString(DriverClass:LongWord):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 />
 +
 +
'''Clock device 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 ClockDeviceGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 ClockDeviceGetDefault:PClockDevice;</pre>
 +
<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;">
 +
{| 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 ClockDeviceSetDefault(Clock:PClockDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default clock device</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 ClockDeviceCheck(Clock:PClockDevice):PClockDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Clock is in the Clock 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;">function ClockTypeToString(ClockType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Clock type value to a string</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 ClockStateToString(ClockState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Clock state value to a string</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 />
 +
 +
'''Timer device 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 TimerDeviceGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 TimerDeviceGetDefault:PTimerDevice;</pre>
 +
<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;">
 +
{| 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 TimerDeviceSetDefault(Timer:PTimerDevice):LongWord;</pre>
 +
<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;">
 +
{| 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 TimerDeviceCheck(Timer:PTimerDevice):PTimerDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Timer is in the Timer 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;">function TimerTypeToString(TimerType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Timer type value to a string</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 TimerStateToString(TimerState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Timer state value to a string</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 TimerDeviceCreateWaiter(Timer:PTimerDevice; Callback:TTimerCallback; Data:Pointer):PTimerWaiter;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new waiter using the supplied parameters</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Waiter must be registered by calling TimerDeviceRegisterWaiter.
 +
Caller must hold the Timer device lock.
 +
|-
 +
|}
 +
</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 TimerDeviceDestroyWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing waiter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Waiter must be deregistered first by calling TimerDeviceDeregisterWaiter.
 +
Caller must hold the Timer device lock.
 +
|-
 +
|}
 +
</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 TimerDeviceRegisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a waiter in the waiter list of the supplied Timer</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Waiter must be created by calling TimerDeviceCreateWaiter.
 +
Caller must hold the Timer device lock.
 +
|-
 +
|}
 +
</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 TimerDeviceDeregisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a waiter from the waiter list of the supplied Timer</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Waiter must be destroyed by calling TimerDeviceDestroyWaiter.
 +
Caller must hold the Timer device lock.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Random device 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 RandomDeviceGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 RandomDeviceGetDefault:PRandomDevice;</pre>
 +
<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;">
 +
{| 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 RandomDeviceSetDefault(Random:PRandomDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default random device</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 RandomDeviceCheck(Random:PRandomDevice):PRandomDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Random is in the Random 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;">function RandomTypeToString(RandomType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Random type value to a string</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 RandomStateToString(RandomState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Random state value to a string</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 />
 +
 +
'''Mailbox device 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 MailboxDeviceGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 MailboxDeviceGetDefault:PMailboxDevice;</pre>
 +
<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;">
 +
{| 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 MailboxDeviceSetDefault(Mailbox:PMailboxDevice):LongWord; </pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default mailbox device</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 MailboxDeviceCheck(Mailbox:PMailboxDevice):PMailboxDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Mailbox is in the Mailbox 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;">function MailboxTypeToString(MailboxType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Mailbox type value to a string</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 MailboxStateToString(MailboxState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Mailbox state value to a string</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 />
 +
 +
'''Watchdog device 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 WatchdogDeviceGetCount:LongWord;</pre>
 +
<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;">
 +
{| 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 WatchdogDeviceGetDefault:PWatchdogDevice;</pre>
 +
<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;">
 +
{| 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 WatchdogDeviceSetDefault(Watchdog:PWatchdogDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current default watchdog device</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 WatchdogDeviceCheck(Watchdog:PWatchdogDevice):PWatchdogDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied Watchdog is in the Watchdog 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;">function WatchdogTypeToString(WatchdogType:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Watchdog type value to a string</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 WatchdogStateToString(WatchdogState:LongWord):String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Watchdog state value to a string</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 />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 04:55, 21 June 2023

Return to Unit Reference


Description


Ultibo Device Interface unit

Constants



[Expand]
Device specific constants DEVICE_*


[Expand]
Device signature DEVICE_SIGNATURE_*


[Expand]
Device name DEVICE_*_LENGTH


[Expand]
Device bus DEVICE_BUS_*


[Expand]
Device state DEVICE_STATE_*


[Expand]
Device Id DEVICE_ID_*


[Expand]
Device class DEVICE_CLASS_*


[Expand]
Device notification flag DEVICE_NOTIFICATION_*


[Expand]
Firmware name FIRMWARE_NAME_*


[Expand]
Firmware actions FIRMWARE_ACTION_*


[Expand]
Firmware constants FIRMWARE_*


[Expand]
Notifier signature NOTIFIER_SIGNATURE_*


[Expand]
Notifier state NOTIFIER_STATE_*


[Expand]
Notifier flag NOTIFIER_FLAG_*


[Expand]
Device logging DEVICE_LOG_*


[Expand]
Driver specific constants DRIVER_*


[Expand]
Driver signature DRIVER_SIGNATURE_*


[Expand]
Driver name DRIVER_NAME_*


[Expand]
Driver state DRIVER_STATE_*


[Expand]
Driver Id DRIVER_ID_*


[Expand]
Driver class DRIVER_CLASS_*


[Expand]
Host specific constants HOST_*


[Expand]
Host signature HOST_SIGNATURE_*


[Expand]
Host name HOST_NAME_*


[Expand]
Host state HOST_STATE_*


[Expand]
Host Id HOST_ID_*


[Expand]
Host class HOST_CLASS_*


[Expand]
Clock specific constants CLOCK_*


[Expand]
Clock device type CLOCK_TYPE_*


[Expand]
Clock device state CLOCK_STATE_*


[Expand]
Clock device flag CLOCK_FLAG_*


[Expand]
Timer specific constants TIMER_*


[Expand]
Timer device type TIMER_TYPE_*


[Expand]
Timer device state TIMER_STATE_*


[Expand]
Timer device flag TIMER_FLAG_*


[Expand]
Timer event flag TIMER_EVENT_FLAG_*


[Expand]
Random specific constants RANDOM_*


[Expand]
Random device type RANDOM_TYPE_*


[Expand]
Random device state RANDOM_STATE_*


[Expand]
Random device flag RANDOM_FLAG_*


[Expand]
Mailbox specific constants MAILBOX_*


[Expand]
Mailbox device type MAILBOX_TYPE_*


[Expand]
Mailbox device state MAILBOX_STATE_*


[Expand]
Mailbox device flag MAILBOX_FLAG_*


[Expand]
Watchdog specific constants WATCHDOG_*


[Expand]
Watchdog device type WATCHDOG_TYPE_*


[Expand]
Watchdog device state WATCHDOG_STATE_*


[Expand]
Watchdog device flag 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

[Expand]

PDevice = ^TDevice;

TDevice = record

Device firmware

[Expand]

PDeviceFirmware = ^TDeviceFirmware;

TDeviceFirmware = record

Device firmware handler

TDeviceFirmwareHandler = function(Firmware:PDeviceFirmware; Action:LongWord; var Handle:THandle; var Buffer:Pointer; var Value:LongWord):LongWord;

Firmware handle

[Expand]

PFirmwareHandle = ^TFirmwareHandle;

TFirmwareHandle = record

Notifier entry

[Expand]

PNotifier = ^TNotifier;

TNotifier = record

Notifier task

[Expand]

PNotifierTask = ^TNotifierTask;

TNotifierTask = record

Notifier retry

[Expand]

PNotifierRetry = ^TNotifierRetry;

TNotifierRetry = record

Driver enumeration callback

TDriverEnumerate = function(Driver:PDriver; Data:Pointer):LongWord;

Driver entry

[Expand]

PDriver = ^TDriver;

TDriver = record

Host enumeration callback

THostEnumerate = function(Host:PHost; Data:Pointer):LongWord;

Host entry

[Expand]

PHost = ^THost;

THost = record

Clock properties

[Expand]

PClockProperties = ^TClockProperties;

TClockProperties = record

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

[Expand]

PClockDevice = ^TClockDevice;

TClockDevice = record

Timer callback

TTimerCallback = TCounterCallback; Counter callback from Platform

Timer properties

[Expand]

PTimerProperties = ^TTimerProperties;

TTimerProperties = record

Timer waiter

[Expand]

PTimerWaiter = ^TTimerWaiter;

TTimerWaiter = record

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

[Expand]

PTimerDevice = ^TTimerDevice;

TTimerDevice = record

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

[Expand]

PRandomDevice = ^TRandomDevice;

TRandomDevice = record

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

[Expand]

PMailboxDevice = ^TMailboxDevice;

TMailboxDevice = record

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

[Expand]

PWatchdogDevice = ^TWatchdogDevice;

TWatchdogDevice = record


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

[Expand]
procedure DevicesInit;
Description: Initialize the Devices unit and device, notifier and driver tables


Device functions

[Expand]
function DeviceCreate:PDevice;
Description: Create a new Device entry


[Expand]
function DeviceCreateEx(Size:LongWord):PDevice;
Description: Create a new Device entry


[Expand]
function DeviceDestroy(Device:PDevice):LongWord;
Description: Destroy an existing Device entry


[Expand]
function DeviceGetName(Device:PDevice):String;
Description: Get the name of the supplied Device


[Expand]
function DeviceSetName(Device:PDevice; const Name:String):LongWord;
Description: Set the name of the supplied Device


[Expand]
function DeviceGetDescription(Device:PDevice):String;
Description: Get the description of the supplied Device


[Expand]
function DeviceSetDescription(Device:PDevice; const Description:String):LongWord;
Description: Set the description of the supplied Device


[Expand]
function DeviceRegister(Device:PDevice):LongWord;
Description: Register a new Device in the Device table


[Expand]
function DeviceDeregister(Device:PDevice):LongWord;
Description: Deregister a Device from the Device table


[Expand]
function DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;
Description: Find a device by ID in the device table


[Expand]
function DeviceFindByDeviceData(DeviceData:Pointer):PDevice;
Description: Find a device with matching DeviceData property in the device table


[Expand]
function DeviceFindByName(const Name:String):PDevice; inline;
Description: Find a device by name in the device table


[Expand]
function DeviceFindByNameEx(DeviceClass:LongWord; const Name:String):PDevice;
Description: Find a device by class and name in the device table


[Expand]
function DeviceFindByDescription(const Description:String):PDevice; inline;
Description: Find a device by description in the device table


[Expand]
function DeviceFindByDescriptionEx(DeviceClass:LongWord; const Description:String):PDevice;
Description: Find a device by class and description in the device table


[Expand]
function DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;
Description: Enumerate all devices in the device table


[Expand]
function DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for device changes


[Expand]
function DeviceFirmwareCreate(DeviceClass:LongWord; const Name:String; Buffer:Pointer; Size:LongWord):Boolean;
Description: Create a new block (memory) based firmware entry using the standard block firmware handler


[Expand]
function DeviceFirmwareRegister(DeviceClass:LongWord; const Name:String; Handler:TDeviceFirmwareHandler):THandle;
Description: Register a new device firmware handler for acquiring device specific firmware


[Expand]
function DeviceFirmwareDeregister(Handle:THandle):LongWord;
Description: Deregister an existing device firmware handler


[Expand]
function DeviceFirmwareFind(DeviceClass:LongWord; const Name:String):PDeviceFirmware;
Description: Find an existing device firmware handler for a specified device


[Expand]
function DeviceFirmwareFindByHandle(Handle:THandle):PDeviceFirmware;
Description: Find an existing device firmware handler from a returned handle


[Expand]
function DeviceFirmwareOpen(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle):LongWord;
Description: Open the firmware for a specified device from a registered handler


[Expand]
function DeviceFirmwareClose(Handle:THandle):LongWord;
Description: Close a handle to the firmware for a specified device from a registered handler


[Expand]
function DeviceFirmwareSize(Handle:THandle):LongInt;
Description: Return the size of the firmware for a specified device from a registered handler


[Expand]
function DeviceFirmwareSeek(Handle:THandle; Position:LongInt):LongInt;
Description: Seek to a position within the firmware for a specified device from a registered handler


[Expand]
function DeviceFirmwareRead(Handle:THandle; Buffer:Pointer; Count:LongInt):LongInt;
Description: Read into a buffer from the firmware for a specified device from a registered handler


[Expand]
function DeviceFirmwareAcquire(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle; var Buffer:Pointer; var Size:LongWord):LongWord;
Description: Acquire a memory block containing the firmware for a specified device from a registered handler


[Expand]
function DeviceFirmwareRelease(Handle:THandle; Buffer:Pointer; Size:LongWord):LongWord;
Description: Release a memory block containing the firmware for a specified device from a registered handler


[Expand]
function NotifierAllocate(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):PNotifier;
Description: Create and Register a new Notifier entry in the Notifier table


[Expand]
function NotifierRelease(Notifier:PNotifier):LongWord;
Description: Deregister and Destroy a Notifier from the Notifier table


[Expand]
function NotifierFind(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer):PNotifier;
Description: To be documented


[Expand]
function NotifierNotify(Device:PDevice; Notification:LongWord):LongWord;
Description: To be documented


[Expand]
procedure NotifierRetry(Retry:PNotifierRetry);
Description: To be documented


[Expand]
procedure NotifierWorker(Task:PNotifierTask);
Description: To be documented


Driver functions

[Expand]
function DriverCreate:PDriver;
Description: Create a new Driver entry


[Expand]
function DriverCreateEx(Size:LongWord):PDriver;
Description: Create a new Driver entry


[Expand]
function DriverDestroy(Driver:PDriver):LongWord;
Description: Destroy an existing Driver entry


[Expand]
function DriverGetName(Driver:PDriver):String;
Description: Get the name of the supplied Driver


[Expand]
function DriverSetName(Driver:PDriver; const Name:String):LongWord;
Description: Set the name of the supplied Driver


[Expand]
function DriverRegister(Driver:PDriver):LongWord;
Description: Register a new Driver in the Driver table


[Expand]
function DriverDeregister(Driver:PDriver):LongWord;
Description: Deregister a Driver from the Driver table


[Expand]
function DriverFind(DriverClass,DriverId:LongWord):PDriver;
Description: Find a driver by ID in the driver table


[Expand]
function DriverFindByName(const Name:String):PDriver;
Description: Find a driver by name in the driver table


[Expand]
function DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;
Description: Enumerate all drivers in the driver table


Clock device functions

[Expand]
function ClockDeviceStart(Clock:PClockDevice):LongWord;
Description: Start the counter of the specified clock device


[Expand]
function ClockDeviceStop(Clock:PClockDevice):LongWord;
Description: Stop the counter of the specified clock device


[Expand]
function ClockDeviceRead(Clock:PClockDevice):LongWord;
Description: Read the counter value of the specified clock device


[Expand]
function ClockDeviceRead64(Clock:PClockDevice):Int64;
Description: Read the counter value of the specified clock device


[Expand]
function ClockDeviceWrite64(Clock:PClockDevice; const Value:Int64):LongWord;
Description: Write the counter value of the specified clock device


[Expand]
function ClockDeviceGetRate(Clock:PClockDevice):LongWord;
Description: Get the current clock rate in Hz of the specified clock device


[Expand]
function ClockDeviceSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;
Description: Set the current clock rate in Hz of the specified clock device


[Expand]
function ClockDeviceProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord; inline;
Description: Get the properties for the specified clock device


[Expand]
function ClockDeviceGetProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord;
Description: Get the properties for the specified clock device


[Expand]
function ClockDeviceCreate:PClockDevice;
Description: Create a new Clock entry


[Expand]
function ClockDeviceCreateEx(Size:LongWord):PClockDevice;
Description: Create a new Clock entry


[Expand]
function ClockDeviceDestroy(Clock:PClockDevice):LongWord;
Description: Destroy an existing clock entry


[Expand]
function ClockDeviceRegister(Clock:PClockDevice):LongWord;
Description: Register a new clock in the clock table


[Expand]
function ClockDeviceDeregister(Clock:PClockDevice):LongWord;
Description: Deregister a clock from the clock table


[Expand]
function ClockDeviceFind(ClockId:LongWord):PClockDevice;
Description: Find a clock device by ID in the clock table


[Expand]
function ClockDeviceFindByName(const Name:String):PClockDevice; inline;
Description: Find a clock device by name in the clock table


[Expand]
function ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;
Description: Find a clock device by description in the clock table


[Expand]
function ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;
Description: Enumerate all clock devices in the clock table


[Expand]
function ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for clock device changes


Timer device functions

[Expand]
function TimerDeviceStart(Timer:PTimerDevice):LongWord;
Description: Start the clock and counter of the specified Timer device


[Expand]
function TimerDeviceStop(Timer:PTimerDevice):LongWord;
Description: Stop the clock and counter of the specified Timer device


[Expand]
function TimerDeviceRead(Timer:PTimerDevice):LongWord;
Description: Read the current value of the specified Timer device


[Expand]
function TimerDeviceRead64(Timer:PTimerDevice):Int64;
Description: Read the current value of the specified Timer device


[Expand]
function TimerDeviceWait(Timer:PTimerDevice):LongWord;
Description: Wait for the current interval to expire on the specified Timer device


[Expand]
function TimerDeviceEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
Description: Schedule a function to be called when the current interval expires on the specified Timer device


[Expand]
function TimerDeviceCancel(Timer:PTimerDevice):LongWord;
Description: Cancel a previously scheduled event callback function on the specified Timer device


[Expand]
function TimerDeviceGetRate(Timer:PTimerDevice):LongWord;
Description: Get the current clock rate in Hz of the specified Timer device


[Expand]
function TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;
Description: Set the current clock rate in Hz of the specified Timer device


[Expand]
function TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;
Description: Get the current interval in ticks of the specified Timer device


[Expand]
function TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;
Description: Set the current interval in ticks of the specified Timer device


[Expand]
function TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord; inline;
Description: Get the properties for the specified Timer device


[Expand]
function TimerDeviceGetProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
Description: Get the properties for the specified Timer device


[Expand]
function TimerDeviceCreate:PTimerDevice;
Description: Create a new Timer entry


[Expand]
function TimerDeviceCreateEx(Size:LongWord):PTimerDevice;
Description: Create a new Timer entry


[Expand]
function TimerDeviceDestroy(Timer:PTimerDevice):LongWord;
Description: Destroy an existing Timer entry


[Expand]
function TimerDeviceRegister(Timer:PTimerDevice):LongWord;
Description: Register a new Timer in the Timer table


[Expand]
function TimerDeviceDeregister(Timer:PTimerDevice):LongWord;
Description: Deregister a Timer from the Timer table


[Expand]
function TimerDeviceFind(TimerId:LongWord):PTimerDevice;
Description: Find a timer device by ID in the timer table


[Expand]
function TimerDeviceFindByName(const Name:String):PTimerDevice; inline;
Description: Find a timer device by name in the timer table


[Expand]
function TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;
Description: Find a timer device by description in the timer table


[Expand]
function TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;
Description: Enumerate all timer devices in the timer table


[Expand]
function TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for timer device changes


Random device functions

[Expand]
function RandomDeviceStart(Random:PRandomDevice):LongWord;
Description: To be documented


[Expand]
function RandomDeviceStop(Random:PRandomDevice):LongWord;
Description: To be documented


[Expand]
function RandomDeviceSeed(Random:PRandomDevice; Seed:LongWord):LongWord;
Description: To be documented


[Expand]
function RandomDeviceReadByte(Random:PRandomDevice):Byte;
Description: To be documented


[Expand]
function RandomDeviceReadWord(Random:PRandomDevice):Word;
Description: To be documented


[Expand]
function RandomDeviceReadLongWord(Random:PRandomDevice):LongWord;
Description: To be documented


[Expand]
function RandomDeviceReadQuadWord(Random:PRandomDevice):Int64;
Description: To be documented


[Expand]
function RandomDeviceReadDouble(Random:PRandomDevice):Double;
Description: To be documented


[Expand]
function RandomDeviceReadExtended(Random:PRandomDevice):Extended; inline;
Description: To be documented


[Expand]
function RandomDeviceCreate:PRandomDevice;
Description: Create a new Random entry


[Expand]
function RandomDeviceCreateEx(Size:LongWord):PRandomDevice;
Description: Create a new Random entry


[Expand]
function RandomDeviceDestroy(Random:PRandomDevice):LongWord;
Description: Destroy an existing Random entry


[Expand]
function RandomDeviceRegister(Random:PRandomDevice):LongWord;
Description: Register a new Random in the Random table


[Expand]
function RandomDeviceDeregister(Random:PRandomDevice):LongWord;
Description: Deregister a Random from the Random table


[Expand]
function RandomDeviceFind(RandomId:LongWord):PRandomDevice;
Description: To be documented


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


[Expand]
function RandomDeviceFindByDescription(const Description:String):PRandomDevice; inline;
Description: To be documented


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


[Expand]
function RandomDeviceNotification(Random:PRandomDevice; Callback:TRandomNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


Mailbox device functions

[Expand]
function MailboxDeviceStart(Mailbox:PMailboxDevice):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceStop(Mailbox:PMailboxDevice):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceReceive(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceSend(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceCall(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceGetTimeout(Mailbox:PMailboxDevice):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceSetTimeout(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;
Description: To be documented


[Expand]
function MailboxDeviceCreate:PMailboxDevice;
Description: Create a new Mailbox entry


[Expand]
function MailboxDeviceCreateEx(Size:LongWord):PMailboxDevice;
Description: Create a new Mailbox entry


[Expand]
function MailboxDeviceDestroy(Mailbox:PMailboxDevice):LongWord;
Description: Destroy an existing Mailbox entry


[Expand]
function MailboxDeviceRegister(Mailbox:PMailboxDevice):LongWord;
Description: Register a new Mailbox in the Mailbox table


[Expand]
function MailboxDeviceDeregister(Mailbox:PMailboxDevice):LongWord;
Description: Deregister a Mailbox from the Mailbox table


[Expand]
function MailboxDeviceFind(MailboxId:LongWord):PMailboxDevice;
Description: To be documented


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


[Expand]
function MailboxDeviceFindByDescription(const Description:String):PMailboxDevice; inline;
Description: To be documented


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


[Expand]
function MailboxDeviceNotification(Mailbox:PMailboxDevice; Callback:TMailboxNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


Watchdog device functions

[Expand]
function WatchdogDeviceStart(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented


[Expand]
function WatchdogDeviceStop(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented


[Expand]
function WatchdogDeviceRefresh(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented


[Expand]
function WatchdogDeviceGetRemain(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented


[Expand]
function WatchdogDeviceGetTimeout(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented


[Expand]
function WatchdogDeviceSetTimeout(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;
Description: To be documented


[Expand]
function WatchdogDeviceCreate:PWatchdogDevice;
Description: Create a new Watchdog entry


[Expand]
function WatchdogDeviceCreateEx(Size:LongWord):PWatchdogDevice;
Description: Create a new Watchdog entry


[Expand]
function WatchdogDeviceDestroy(Watchdog:PWatchdogDevice):LongWord;
Description: Destroy an existing Watchdog entry


[Expand]
function WatchdogDeviceRegister(Watchdog:PWatchdogDevice):LongWord;
Description: Register a new Watchdog in the Watchdog table


[Expand]
function WatchdogDeviceDeregister(Watchdog:PWatchdogDevice):LongWord;
Description: Deregister a Watchdog from the Watchdog table


[Expand]
function WatchdogDeviceFind(WatchdogId:LongWord):PWatchdogDevice;
Description: To be documented


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


[Expand]
function WatchdogDeviceFindByDescription(const Description:String):PWatchdogDevice; inline;
Description: To be documented


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


[Expand]
function WatchdogDeviceNotification(Watchdog:PWatchdogDevice; Callback:TWatchdogNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented


RTL clock functions

[Expand]
function SysClockRead:LongWord;
Description: To be documented


[Expand]
function SysClockRead64:Int64;
Description: To be documented


RTL timer (counter) functions

[Expand]
function SysTimerAvailable:Boolean;
Description: Check if a timer device is available


[Expand]
function SysTimerRead:LongWord;
Description: Read the current value of the default counter


[Expand]
function SysTimerRead64:Int64;
Description: Read the current value of the default counter


[Expand]
function SysTimerWait:LongWord;
Description: Wait for the current interval to expire on the default counter


[Expand]
function SysTimerEvent(Callback:TTimerCallback; Data:Pointer):LongWord;
Description: Schedule a function to be called when the current interval expires on the default counter


[Expand]
function SysTimerCancel:LongWord;
Description: Cancel a previously scheduled event callback function on the default counter


[Expand]
function SysTimerGetRate:LongWord;
Description: Get the current clock rate in Hz of the default counter


[Expand]
function SysTimerSetRate(Rate:LongWord):LongWord;
Description: Set the current clock rate in Hz of the default counter


[Expand]
function SysTimerGetInterval:LongWord;
Description: Get the current interval in ticks of the default counter


[Expand]
function SysTimerSetInterval(Interval:LongWord):LongWord;
Description: Set the current interval in ticks of the default counter


RTL random functions

[Expand]
function SysRandomAvailable:Boolean;
Description: Check if a random (RNG) device is available


[Expand]
procedure SysRandomize;
Description: To be documented


[Expand]
procedure SysRandomSeed(Seed:LongWord);
Description: To be documented


[Expand]
function SysRandomReadLongInt(Limit:LongInt):LongInt;
Description: To be documented


[Expand]
function SysRandomReadInt64(Limit:Int64):Int64;
Description: To be documented


[Expand]
function SysRandomReadDouble:Double;
Description: To be documented


RTL watchdog functions

[Expand]
function SysWatchdogAvailable:Boolean;
Description: Check if a watchdog timer device is available


[Expand]
function SysWatchdogStart(Milliseconds:LongWord):LongWord; 
Description: To be documented


[Expand]
function SysWatchdogStop:LongWord;
Description: To be documented


[Expand]
function SysWatchdogRefresh(Milliseconds:LongWord):LongWord;
Description: To be documented


Device helper functions

[Expand]
function DeviceGetCount:LongWord;
Description: Get the current device count


[Expand]
function DeviceCheck(Device:PDevice):PDevice;
Description: Check if the supplied Device is in the device table


[Expand]
function NotifierGetCount:LongWord;
Description: Get the current notifier count


[Expand]
function NotifierCheck(Notifier:PNotifier):PNotifier;
Description: Check if the supplied Notifier is in the notifier table


[Expand]
function DeviceBusToString(DeviceBus:LongWord):String;
Description: To be documented


[Expand]
function DeviceStateToString(DeviceState:LongWord):String;
Description: To be documented


[Expand]
function DeviceClassToString(DeviceClass:LongWord):String;
Description: To be documented


[Expand]
function NotificationToString(Notification:LongWord):String;
Description: To be documented


[Expand]
procedure DeviceLog(Level:LongWord; Device:PDevice; const AText:String);
Description: To be documented


[Expand]
procedure DeviceLogInfo(Device:PDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure DeviceLogWarn(Device:PDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure DeviceLogError(Device:PDevice; const AText:String); inline;
Description: To be documented


[Expand]
procedure DeviceLogDebug(Device:PDevice; const AText:String); inline;
Description: To be documented


Driver helper functions

[Expand]
function DriverGetCount:LongWord;
Description: Get the current driver count


[Expand]
function DriverCheck(Driver:PDriver):PDriver;
Description: Check if the supplied Driver is in the driver table


[Expand]
function DriverStateToString(DriverState:LongWord):String;
Description: To be documented


[Expand]
function DriverClassToString(DriverClass:LongWord):String;
Description: To be documented


Clock device helper functions

[Expand]
function ClockDeviceGetCount:LongWord;
Description: Get the current clock device count


[Expand]
function ClockDeviceGetDefault:PClockDevice;
Description: Get the current default clock device


[Expand]
function ClockDeviceSetDefault(Clock:PClockDevice):LongWord;
Description: Set the current default clock device


[Expand]
function ClockDeviceCheck(Clock:PClockDevice):PClockDevice;
Description: Check if the supplied Clock is in the Clock table


[Expand]
function ClockTypeToString(ClockType:LongWord):String;
Description: Convert a Clock type value to a string


[Expand]
function ClockStateToString(ClockState:LongWord):String;
Description: Convert a Clock state value to a string


Timer device helper functions

[Expand]
function TimerDeviceGetCount:LongWord;
Description: Get the current timer device count


[Expand]
function TimerDeviceGetDefault:PTimerDevice;
Description: Get the current default timer device


[Expand]
function TimerDeviceSetDefault(Timer:PTimerDevice):LongWord;
Description: Set the current default timer device


[Expand]
function TimerDeviceCheck(Timer:PTimerDevice):PTimerDevice;
Description: Check if the supplied Timer is in the Timer table


[Expand]
function TimerTypeToString(TimerType:LongWord):String;
Description: Convert a Timer type value to a string


[Expand]
function TimerStateToString(TimerState:LongWord):String;
Description: Convert a Timer state value to a string


[Expand]
function TimerDeviceCreateWaiter(Timer:PTimerDevice; Callback:TTimerCallback; Data:Pointer):PTimerWaiter;
Description: Create a new waiter using the supplied parameters


[Expand]
function TimerDeviceDestroyWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Description: Destroy an existing waiter


[Expand]
function TimerDeviceRegisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Description: Register a waiter in the waiter list of the supplied Timer


[Expand]
function TimerDeviceDeregisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Description: Deregister a waiter from the waiter list of the supplied Timer


Random device helper functions

[Expand]
function RandomDeviceGetCount:LongWord;
Description: Get the current random device count


[Expand]
function RandomDeviceGetDefault:PRandomDevice;
Description: Get the current default random device


[Expand]
function RandomDeviceSetDefault(Random:PRandomDevice):LongWord;
Description: Set the current default random device


[Expand]
function RandomDeviceCheck(Random:PRandomDevice):PRandomDevice;
Description: Check if the supplied Random is in the Random table


[Expand]
function RandomTypeToString(RandomType:LongWord):String;
Description: Convert a Random type value to a string


[Expand]
function RandomStateToString(RandomState:LongWord):String;
Description: Convert a Random state value to a string


Mailbox device helper functions

[Expand]
function MailboxDeviceGetCount:LongWord;
Description: Get the current mailbox device count


[Expand]
function MailboxDeviceGetDefault:PMailboxDevice;
Description: Get the current default mailbox device


[Expand]
function MailboxDeviceSetDefault(Mailbox:PMailboxDevice):LongWord; 
Description: Set the current default mailbox device


[Expand]
function MailboxDeviceCheck(Mailbox:PMailboxDevice):PMailboxDevice;
Description: Check if the supplied Mailbox is in the Mailbox table


[Expand]
function MailboxTypeToString(MailboxType:LongWord):String;
Description: Convert a Mailbox type value to a string


[Expand]
function MailboxStateToString(MailboxState:LongWord):String;
Description: Convert a Mailbox state value to a string


Watchdog device helper functions

[Expand]
function WatchdogDeviceGetCount:LongWord;
Description: Get the current watchdog device count


[Expand]
function WatchdogDeviceGetDefault:PWatchdogDevice;
Description: Get the current default watchdog device


[Expand]
function WatchdogDeviceSetDefault(Watchdog:PWatchdogDevice):LongWord;
Description: Set the current default watchdog device


[Expand]
function WatchdogDeviceCheck(Watchdog:PWatchdogDevice):PWatchdogDevice;
Description: Check if the supplied Watchdog is in the Watchdog table


[Expand]
function WatchdogTypeToString(WatchdogType:LongWord):String;
Description: Convert a Watchdog type value to a string


[Expand]
function WatchdogStateToString(WatchdogState:LongWord):String;
Description: Convert a Watchdog state value to a string


Return to Unit Reference