Unit Devices
Return to Unit Reference
Description
Ultibo Device Interface unit
Constants
DEVICE_*
DEVICE_NAME_PREFIX = 'Device';
|
Name prefix for Devices |
DEVICE_SIGNATURE_*
DEVICE_SIGNATURE = $AD03FE3C;
|
DEVICE_BUS_*
NONE = 0;
|
|
DEVICE_BUS_PCI = 1;
|
|
DEVICE_BUS_USB = 2;
|
|
DEVICE_BUS_ISA = 3;
|
|
DEVICE_BUS_PS2 = 4;
|
|
DEVICE_BUS_FIREWIRE = 5;
|
|
DEVICE_BUS_SD = 6;
|
SD/SDHC/SDXC/SDIO etc |
DEVICE_BUS_MMC = 7;
|
MMC/eMMC etc |
DEVICE_BUS_ATA = 8;
|
|
DEVICE_BUS_IDE = 9;
|
|
DEVICE_BUS_SCSI = 10;
|
|
DEVICE_BUS_ATAPI = 11;
|
|
DEVICE_BUS_SATA = 12;
|
|
DEVICE_BUS_SERIAL = 13;
|
|
DEVICE_BUS_SPI = 14;
|
Serial Peripheral Interface device |
DEVICE_BUS_MMIO = 15;
|
Memory Mapped IO device (No Bus) |
DEVICE_BUS_PCIE = 16;
|
|
DEVICE_BUS_I2C = 17;
|
I2C connected device |
DEVICE_BUS_MAX = 17;
|
DEVICE_STATE_*
DEVICE_STATE_UNREGISTERED = 0;
|
|
DEVICE_STATE_REGISTERED = 1;
|
|
DEVICE_STATE_MAX = 1;
|
DEVICE_ID_*
DEVICE_ID_ANY = $FFFFFFFF;
|
Any Device (Pass to DeviceFind to match all devices) |
DEVICE_CLASS_*
DEVICE_CLASS_NONE = 0;
|
No Device |
DEVICE_CLASS_USBHOST = 1;
|
A USB Host Controller (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface) |
DEVICE_CLASS_PCIHOST = 2;
|
A PCI Host Controller (eg AHCI etc) (Implementing a standard PCI host interface) |
DEVICE_CLASS_USB = 3;
|
A USB Device (eg Hub/Keyboard/Mouse/Mass Storage/Vendor Specific etc) (Implementing a standard USB device interface) |
DEVICE_CLASS_PCI = 4;
|
A PCI Device (eg Graphics/Controller etc) (Implementing a standard PCI device interface) |
DEVICE_CLASS_NETWORK = 5;
|
A Network Device (Implementing a standard Network device interface). May also be a USB or PCI device |
DEVICE_CLASS_STORAGE = 6;
|
A Storage Device (Implementing a standard Storage device interface). May also be a USB, PCI, MMC, SCSI or ATA device |
DEVICE_CLASS_BLOCK = DEVICE_CLASS_STORAGE;
|
|
DEVICE_CLASS_FILESYSTEM = 7;
|
A FileSystem Device (eg FAT/NTFS/CDFS/EXTFS etc)(Implementing a standard FileSystem device interface) |
DEVICE_CLASS_PROTOCOL = 8;
|
A Protocol Device (eg TCP/UDP/IP/ICMP etc) (Implementing a standard Protocol device interface) |
DEVICE_CLASS_TRANSPORT = DEVICE_CLASS_PROTOCOL;
|
|
DEVICE_CLASS_KEYBOARD = 9;
|
A Keyboard Device (Implementing a standard Keyboard device interface) |
DEVICE_CLASS_MOUSE = 10;
|
A Mouse Device (Implementing a standard Mouse device interface) |
DEVICE_CLASS_BLUETOOTH = 11;
|
A Bluetooth Device (Implementing a standard Bluetooth device interface) |
DEVICE_CLASS_SERIAL = 12;
|
A Serial Device (Implementing a standard Serial device interface) |
DEVICE_CLASS_AUDIO = 13;
|
An Audio Device (Implementing a standard Audio device interface) |
DEVICE_CLASS_VIDEO = 14;
|
A Video Device (Implementing a standard Video device interface) |
DEVICE_CLASS_SCSI = 15;
|
A SCSI Device (Implementing a standard SCSI device interface). May also be a PCI device |
DEVICE_CLASS_ATA = 16;
|
An ATA/ATAPI Device (Implementing a standard ATA/ATAPI device interface). May also be a PCI device |
DEVICE_CLASS_IDE = DEVICE_CLASS_ATA;
|
|
DEVICE_CLASS_ATAPI = DEVICE_CLASS_ATA;
|
|
DEVICE_CLASS_IMAGE = 17;
|
An Image Device (eg Camera) (Implementing a standard Image device interface) |
DEVICE_CLASS_PRINTER = 18;
|
A Printer Device (Implementing a standard Printer device interface) |
DEVICE_CLASS_COMMUNICATIONS = 19;
|
A Communications Device (Implementing a standard Communications device interface) |
DEVICE_CLASS_SMART_CARD = 20;
|
A Smart Card Device (Implementing a standard Smart Card device interface) |
DEVICE_CLASS_MONITOR = 21;
|
A Monitor Device (Implementing a standard Monitor device interface) |
DEVICE_CLASS_DISPLAY = 22;
|
A Display Device (eg Billboard) (Implementing a standard Display device interface) |
DEVICE_CLASS_AUDIOVIDEO = 23;
|
An Audio/Video Device (Implementing a standard Audio/Video device interface) |
DEVICE_CLASS_IRDA = 24;
|
An Infrared Device (Implementing a standard Infrared device interface) |
DEVICE_CLASS_SPI = 25;
|
An SPI Device (Implementing a standard SPI device interface) |
DEVICE_CLASS_I2C = 26;
|
An I2C Device (Implementing a standard I2C device interface) |
DEVICE_CLASS_UART = 27;
|
A UART Device (Implementing a standard UART device interface) |
DEVICE_CLASS_MMC = 28;
|
An MMC Device (Implementing a standard MMC device interface) |
DEVICE_CLASS_SD = 29;
|
An SD Device (Implementing a standard SD device interface) |
DEVICE_CLASS_SDHCI = 30;
|
An SD/MMC Host Controller (Implementing a standard SDHCI device interface) |
DEVICE_CLASS_SDHOST = DEVICE_CLASS_SDHCI;
|
|
DEVICE_CLASS_MMCHOST = DEVICE_CLASS_SDHCI;
|
|
DEVICE_CLASS_MMCIHOST = DEVICE_CLASS_SDHCI;
|
|
DEVICE_CLASS_DFU = 31;
|
A Device Firmware Update Device (Implementing a standard DFU device interface) |
DEVICE_CLASS_GPIO = 32;
|
A GPIO Device (Implementing a standard GPIO device interface) |
DEVICE_CLASS_MAILBOX = 33;
|
A Mailbox Device |
DEVICE_CLASS_OPENGL = 34;
|
An OpenGL Device |
DEVICE_CLASS_DVB = 35;
|
A Digital Video Broadcast (DVB) Device |
DEVICE_CLASS_DAB = 36;
|
A Digital Audio Broadcast (DAB) Device |
DEVICE_CLASS_DMA = 37;
|
A DMA Controller Device (Implementing a standard DMA controller interface) |
DEVICE_CLASS_SCSIHOST = 38;
|
A SCSI Host Device (Implementing a standard SCSI host interface) |
DEVICE_CLASS_ATAHOST = 39;
|
An ATA Host Device (Implementing a standard ATA host interface) |
DEVICE_CLASS_TIMER = 40;
|
A Timer or Counter Device |
DEVICE_CLASS_RANDOM = 41;
|
A Random Number Generator Device |
DEVICE_CLASS_FRAMEBUFFER = 42;
|
A Frame Buffer Device |
DEVICE_CLASS_WATCHDOG = 43;
|
A Watchdog Timer Device |
DEVICE_CLASS_CLOCK = 44;
|
A Clock (Date/Time) Device |
DEVICE_CLASS_CONSOLE = 45;
|
A Console Device |
DEVICE_CLASS_RTC = 46;
|
A Real Time Clock (Battery Backed) Device |
DEVICE_CLASS_USBHUB = 47;
|
A USB Hub (Implementing a standard USB hub interface) |
DEVICE_CLASS_LOGGING = 48;
|
A Logging Device (Implementing a standard Logging device interface) |
DEVICE_CLASS_PCM = 49;
|
A PCM Sound Device (Implementing a standard PCM device interface) |
DEVICE_CLASS_I2S = DEVICE_CLASS_PCM;
|
|
DEVICE_CLASS_PWM = 50;
|
A Pulse Width Modulation (PWM) Device |
DEVICE_CLASS_1WIRE = 51;
|
A 1-Wire Device (Implementing a standard W1 device interface) |
DEVICE_CLASS_CLOCK_MANAGER = 52;
|
A Clock Manager Device |
DEVICE_CLASS_CODEC = 53;
|
A CODEC Device (eg Audio or Video) |
DEVICE_CLASS_TOUCH = 54;
|
A Touch Device |
DEVICE_CLASS_MEMORY = 55;
|
A Memory Device (eg OTP, NVRAM or Flash) |
DEVICE_CLASS_GENERIC = 56;
|
A Generic Device |
DEVICE_CLASS_VIRTIO = 57;
|
A VIRTIO Device (eg Block/Network/Memory/Console/Input etc) (Implementing a standard VIRTIO device interface) |
DEVICE_CLASS_BLUETOOTHHOST = 58;
|
A Bluetooth Host Controller (Implementing a standard Bluetooth host interface) |
DEVICE_CLASS_JOYSTICK = 59;
|
A Joystick or Gamepad Device |
DEVICE_CLASS_HID = 60;
|
A Human Interface Device (HID) |
DEVICE_CLASS_MAX = 60;
|
|
DEVICE_CLASS_ANY = $FFFFFFFF;
|
Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices) |
Device Class Names | |
DEVICE_CLASS_NAMES:array[DEVICE_CLASS_NONE..DEVICE_CLASS_MAX] of String = (
| |
'DEVICE_CLASS_NONE',
| |
'DEVICE_CLASS_USBHOST',
| |
'DEVICE_CLASS_PCIHOST',
| |
'DEVICE_CLASS_USB',
| |
'DEVICE_CLASS_PCI',
| |
'DEVICE_CLASS_NETWORK',
| |
'DEVICE_CLASS_STORAGE',
| |
'DEVICE_CLASS_FILESYSTEM',
| |
'DEVICE_CLASS_PROTOCOL',
| |
'DEVICE_CLASS_KEYBOARD',
| |
'DEVICE_CLASS_MOUSE',
| |
'DEVICE_CLASS_BLUETOOTH',
| |
'DEVICE_CLASS_SERIAL',
| |
'DEVICE_CLASS_AUDIO',
| |
'DEVICE_CLASS_VIDEO',
| |
'DEVICE_CLASS_SCSI',
| |
'DEVICE_CLASS_ATA',
| |
'DEVICE_CLASS_IMAGE',
| |
'DEVICE_CLASS_PRINTER',
| |
'DEVICE_CLASS_COMMUNICATIONS',
| |
'DEVICE_CLASS_SMART_CARD',
| |
'DEVICE_CLASS_MONITOR',
| |
'DEVICE_CLASS_DISPLAY',
| |
'DEVICE_CLASS_AUDIOVIDEO',
| |
'DEVICE_CLASS_IRDA',
| |
'DEVICE_CLASS_SPI',
| |
'DEVICE_CLASS_I2C',
| |
'DEVICE_CLASS_UART',
| |
'DEVICE_CLASS_MMC',
| |
'DEVICE_CLASS_SD',
| |
'DEVICE_CLASS_SDHCI',
| |
'DEVICE_CLASS_DFU',
| |
'DEVICE_CLASS_GPIO',
| |
'DEVICE_CLASS_MAILBOX',
| |
'DEVICE_CLASS_OPENGL',
| |
'DEVICE_CLASS_DVB',
| |
'DEVICE_CLASS_DAB',
| |
'DEVICE_CLASS_DMA',
| |
'DEVICE_CLASS_SCSIHOST',
| |
'DEVICE_CLASS_ATAHOST',
| |
'DEVICE_CLASS_TIMER',
| |
'DEVICE_CLASS_RANDOM',
| |
'DEVICE_CLASS_FRAMEBUFFER',
| |
'DEVICE_CLASS_WATCHDOG',
| |
'DEVICE_CLASS_CLOCK',
| |
'DEVICE_CLASS_CONSOLE',
| |
'DEVICE_CLASS_RTC',
| |
'DEVICE_CLASS_USBHUB',
| |
'DEVICE_CLASS_LOGGING',
| |
'DEVICE_CLASS_PCM',
| |
'DEVICE_CLASS_PWM',
| |
'DEVICE_CLASS_1WIRE',
| |
'DEVICE_CLASS_CLOCK_MANAGER',
| |
'DEVICE_CLASS_CODEC',
| |
'DEVICE_CLASS_TOUCH',
| |
'DEVICE_CLASS_MEMORY',
| |
'DEVICE_CLASS_GENERIC',
| |
'DEVICE_CLASS_VIRTIO',
| |
'DEVICE_CLASS_BLUETOOTHHOST',
| |
'DEVICE_CLASS_JOYSTICK',
| |
'DEVICE_CLASS_HID');
|
DEVICE_NOTIFICATION_*
DEVICE_NOTIFICATION_NONE = $00000000;
|
Pass to DeviceNotification to cancel an existing Notification |
DEVICE_NOTIFICATION_REGISTER = $00000001;
|
|
DEVICE_NOTIFICATION_DEREGISTER = $00000002;
|
|
DEVICE_NOTIFICATION_OPEN = $00000004;
|
|
DEVICE_NOTIFICATION_CLOSE = $00000008;
|
|
DEVICE_NOTIFICATION_UP = $00000010;
|
|
DEVICE_NOTIFICATION_DOWN = $00000020;
|
|
DEVICE_NOTIFICATION_INSERT = $00000040;
|
|
DEVICE_NOTIFICATION_EJECT = $00000080;
|
|
DEVICE_NOTIFICATION_ATTACH = $00000100;
|
|
DEVICE_NOTIFICATION_DETACH = $00000200;
|
|
DEVICE_NOTIFICATION_ENABLE = $00000400;
|
|
DEVICE_NOTIFICATION_DISABLE = $00000800;
|
|
DEVICE_NOTIFICATION_BIND = $00001000;
|
|
DEVICE_NOTIFICATION_UNBIND = $00002000;
|
|
DEVICE_NOTIFICATION_ATTACHING = $00004000;
|
|
DEVICE_NOTIFICATION_DETACHING = $00008000;
|
|
DEVICE_NOTIFICATION_INSERTING = $00010000;
|
|
DEVICE_NOTIFICATION_EJECTING = $00020000;
|
|
DEVICE_NOTIFICATION_OPENING = $00040000;
|
|
DEVICE_NOTIFICATION_CLOSING = $00080000;
|
|
DEVICE_NOTIFICATION_RESIZE = $00100000;
|
|
DEVICE_NOTIFICATION_RESIZING = $00200000;
|
FIRMWARE_ACTION_*
FIRMWARE_ACTION_NONE = 0;
|
|
FIRMWARE_ACTION_SIZE = 1;
|
Return the size in bytes of the firmware item |
FIRMWARE_ACTION_OPEN = 2;
|
Open the firmware item and return a handle |
FIRMWARE_ACTION_READ = 3;
|
Read from the firmware item specified by a given handle |
FIRMWARE_ACTION_SEEK = 4;
|
Seek to a location in the firmware item specified by a given handle |
FIRMWARE_ACTION_CLOSE = 5;
|
Close a handle to the firmware item |
FIRMWARE_ACTION_ACQUIRE = 6;
|
Acquire a memory block containing the firmware item |
FIRMWARE_ACTION_RELEASE = 7;
|
Release a memory block containing the firmware item |
FIRMWARE_*
FIRMWARE_WAIT_DELAY = 100;
|
Delay between retries for firmware while waiting for timeout (Milliseconds) |
FIRMWARE_MAX_BUFFER = SIZE_4M;
|
Maximum size buffer able to be allocated for firmware by acquire |
NOTIFIER_SIGNATURE_*
NOTIFIER_SIGNATURE = $6FA1BEC9;
|
NOTIFIER_STATE_*
NOTIFIER_STATE_UNREGISTERED = 0;
|
|
NOTIFIER_STATE_REGISTERED = 1;
|
NOTIFIER_FLAG_*
NOTIFIER_FLAG_NONE = $00000000;
|
|
NOTIFIER_FLAG_WORKER = $00000001;
|
If set, notification callback event will be scheduled on a worker thread |
NOTIFIER_FLAG_UNLOCK = $00000002;
|
If set, the notifier table lock will be released before calling the notification callback event |
DEVICE_LOG_*
DEVICE_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;
|
Device debugging messages |
DEVICE_LOG_LEVEL_INFO = LOG_LEVEL_INFO;
|
Device informational messages, such as a device being attached or detached |
DEVICE_LOG_LEVEL_WARN = LOG_LEVEL_WARN;
|
Device warning messages |
DEVICE_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;
|
Device error messages |
DEVICE_LOG_LEVEL_NONE = LOG_LEVEL_NONE;
|
No Device messages |
DRIVER_*
DRIVER_NAME_PREFIX = 'Driver';
|
Name prefix for Drivers |
DRIVER_SIGNATURE_*
DRIVER_SIGNATURE = $1EB4980A;
|
DRIVER_STATE_*
DRIVER_STATE_UNREGISTERED = 0;
|
|
DRIVER_STATE_REGISTERED = 1;
|
|
DRIVER_STATE_MAX = 1;
|
DRIVER_ID_*
DRIVER_ID_ANY = $FFFFFFFF;
|
Any Driver (Pass to DriverFind to match all drivers) |
DRIVER_CLASS_*
DRIVER_CLASS_NONE = 0;
|
No Driver |
DRIVER_CLASS_USB = 1;
|
A USB Driver (Implementing a standard USB driver interface) |
DRIVER_CLASS_PCI = 2;
|
A PCI Driver (Implementing a standard PCI driver interface) |
DRIVER_CLASS_SDIO = 3;
|
An SDIO Driver (Implementing a standard SDIO driver interface) |
DRIVER_CLASS_BLUETOOTH = 4;
|
A Bluetooth Driver (Implementing a standard Bluetooth driver interface) |
DRIVER_CLASS_VIRTIO = 5;
|
A VIRTIO Driver (Implementing a standard VIRTIO driver interface) |
DRIVER_CLASS_HID = 6;
|
A Human Interface Device (HID) Driver (Implementing a standard HID driver interface) |
DRIVER_CLASS_MAX = 6;
|
|
DRIVER_CLASS_ANY = $FFFFFFFF;
|
Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers) |
Driver Class Names | |
DRIVER_CLASS_NAMES:array[DRIVER_CLASS_NONE..DRIVER_CLASS_MAX] of String = (
| |
'DRIVER_CLASS_NONE',
| |
'DRIVER_CLASS_USB',
| |
'DRIVER_CLASS_PCI',
| |
'DRIVER_CLASS_SDIO',
| |
'DRIVER_CLASS_BLUETOOTH',
| |
'DRIVER_CLASS_VIRTIO',
| |
'DRIVER_CLASS_HID');
|
HOST_*
HOST_NAME_PREFIX = 'Host';
|
Name prefix for Hosts |
HOST_SIGNATURE_*
HOST_SIGNATURE = $F45D30FE;
|
HOST_STATE_*
HOST_STATE_UNREGISTERED = 0;
|
|
HOST_STATE_REGISTERED = 1;
|
|
HOST_STATE_MAX = 1;
|
HOST_ID_*
HOST_ID_ANY = $FFFFFFFF;
|
Any Host (Pass to HostFind to match all hosts) |
HOST_CLASS_*
HOST_CLASS_NONE = 0;
|
No Host} |
HOST_CLASS_USB = 1;
|
A USB Host (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface) |
HOST_CLASS_PCI = 2;
|
A PCI Host (eg AHCI etc) (Implementing a standard PCI host interface) |
HOST_CLASS_SD = 3;
|
An SD Host (eg MMC/SDIO etc) (Implementing a standard SD host interface) |
HOST_CLASS_BLUETOOTH = 4;
|
A Bluetooth Host (Implementing a standard Bluetooth host interface) |
HOST_CLASS_MAX = 4;
|
|
HOST_CLASS_ANY = $FFFFFFFF;
|
Any Host (Pass to HostFind or HostEnumerate to match all hosts) |
CLOCK_*
CLOCK_NAME_PREFIX = 'Clock';
|
Name prefix for Clock Devices |
CLOCK_TYPE_*
CLOCK_TYPE_NONE = 0;
|
|
CLOCK_TYPE_HARDWARE = 1;
|
|
CLOCK_TYPE_MAX = 1;
|
CLOCK_STATE_*
CLOCK_STATE_DISABLED = 0;
|
|
CLOCK_STATE_ENABLED = 1;
|
|
CLOCK_STATE_MAX = 1;
|
CLOCK_FLAG_*
CLOCK_FLAG_NONE = $00000000;
|
|
CLOCK_FLAG_WRITABLE = $00000001;
|
Device supports writing the clock value |
CLOCK_FLAG_VARIABLE = $00000002;
|
Device supports setting the clock rate |
TIMER_*
TIMER_NAME_PREFIX = 'Timer';
|
Name prefix for Timer Devices |
TIMER_TYPE_*
TIMER_TYPE_NONE = 0;
|
|
TIMER_TYPE_HARDWARE = 1;
|
|
TIMER_TYPE_MAX = 1;
|
TIMER_STATE_*
TIMER_STATE_DISABLED = 0;
|
|
TIMER_STATE_ENABLED = 1;
|
|
TIMER_STATE_MAX = 1;
|
TIMER_FLAG_*
TIMER_FLAG_NONE = $00000000;
|
|
TIMER_FLAG_WRAPPING = $00000001;
|
Device provides a wrapping or self reloading counter |
TIMER_FLAG_COUNTER = $00000002;
|
Device will appear as a continuously incrementing counter when read |
TIMER_FLAG_DOWN = $00000004;
|
Device counts down from the starting value to zero (And optionally triggers an event) |
TIMER_EVENT_FLAG_*
TIMER_EVENT_FLAG_NONE = $00000000;
|
|
TIMER_EVENT_FLAG_REPEAT = $00000001;
|
Event will be repeated until cancelled |
TIMER_EVENT_FLAG_INTERRUPT = $00000002;
|
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. |
RANDOM_*
RANDOM_NAME_PREFIX = 'Random';
|
Name prefix for Random Devices |
RANDOM_TYPE_*
RANDOM_TYPE_NONE = 0;
|
|
RANDOM_TYPE_HARDWARE = 1;
|
|
RANDOM_TYPE_SOFTWARE = 2;
|
|
RANDOM_TYPE_MAX = 2;
|
RANDOM_STATE_*
RANDOM_STATE_DISABLED = 0;
|
|
RANDOM_STATE_ENABLED = 1;
|
|
RANDOM_STATE_MAX = 1;
|
RANDOM_FLAG_*
RANDOM_FLAG_NONE = $00000000;
|
MAILBOX_*
MAILBOX_NAME_PREFIX = 'Mailbox';
|
Name prefix for Mailbox Devices |
MAILBOX_TYPE_*
MAILBOX_TYPE_NONE = 0;
|
|
MAILBOX_TYPE_GPU = 1;
|
|
MAILBOX_TYPE_LOCAL = 2;
|
|
MAILBOX_TYPE_MAX = 2;
|
MAILBOX_STATE_*
MAILBOX_STATE_DISABLED = 0;
|
|
MAILBOX_STATE_ENABLED = 1;
|
|
MAILBOX_STATE_MAX = 1;
|
MAILBOX_FLAG_*
MAILBOX_FLAG_NONE = $00000000;
|
WATCHDOG_*
WATCHDOG_NAME_PREFIX = 'Watchdog';
|
Name prefix for Watchdog Devices |
WATCHDOG_TYPE_*
WATCHDOG_TYPE_NONE = 0;
|
|
WATCHDOG_TYPE_HARDWARE = 1;
|
|
WATCHDOG_TYPE_MAX = 1;
|
WATCHDOG_STATE_*
WATCHDOG_STATE_DISABLED = 0;
|
|
WATCHDOG_STATE_ENABLED = 1;
|
|
WATCHDOG_STATE_MAX = 1;
|
WATCHDOG_FLAG_*
WATCHDOG_FLAG_NONE = $00000000;
|
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
PDevice = ^TDevice;
TDevice = record
Device Properties | |
Signature:LongWord;
|
Signature for entry validation |
DeviceId:LongWord;
|
Unique Id of this Device in the Device table |
DeviceState:LongWord;
|
Device state (eg Registered/Unregistered) |
DeviceName:String;
|
The name of the Device (eg Keyboard0, Storage0 or Network0 etc) |
DeviceClass:LongWord;
|
The class of this Device (eg DEVICE_CLASS_USB, DEVICE_CLASS_NETWORK, DEVICE_CLASS_STORAGE etc) |
DeviceBus:LongWord;
|
The Bus type for the Device (eg DEVICE_BUS_USB) |
DeviceType:LongWord;
|
A class specific Device type (eg KEYBOARD_TYPE_USB, MOUSE_TYPE_USB, NETWORK_TYPE_ETHERNET etc) |
DeviceFlags:LongWord;
|
The class specific Device flags |
DeviceData:Pointer;
|
A pointer to a class specific Device interface (eg PUSBDevice, PNetworkDevice or PStorageDevice etc) (Used by Drivers) |
DeviceDescription:String;
|
A description of the Device (eg BCM2835 PL011 UART) |
Internal Properties | |
Prev:PDevice;
|
Previous entry in Device table |
Next:PDevice;
|
Next entry in Device table |
Device firmware
PDeviceFirmware = ^TDeviceFirmware;
TDeviceFirmware = record
DeviceClass:LongWord;
|
The Device class supported by this firmware (or DEVICE_CLASS_ANY for all devices) |
Name:String;
|
The device specific name of the firmware which may be a filename, a device model, id or type |
Size:LongWord;
|
For block (memory) based firmware, the size passed to Create or 0 for other firmware types |
Buffer:Pointer;
|
For block (memory) based firmware, the buffer passed to Create or nil for other firmware types |
Handles:PFirmwareHandle;
|
List of currently open handles for this firmware |
Handler:TDeviceFirmwareHandler;
|
The device specific callback for the handler which provides this firmware |
Internal Properties | |
Prev:PDeviceFirmware;
|
Previous entry in Device firmware table} |
Next:PDeviceFirmware;
|
Next entry in Device firmware table |
Device firmware handler
TDeviceFirmwareHandler = function(Firmware:PDeviceFirmware; Action:LongWord; var Handle:THandle; var Buffer:Pointer; var Value:LongWord):LongWord;
|
Firmware handle
PFirmwareHandle = ^TFirmwareHandle;
TFirmwareHandle = record
Handle:THandle;
|
|
Next:PFirmwareHandle;
|
Notifier entry
PNotifier = ^TNotifier;
TNotifier = record
Notifier Properties | |
Signature:LongWord;
|
Signature for entry validation |
NotifierState:LongWord;
|
Notifier state (eg Registered/Unregistered) |
NotifierFlags:LongWord;
|
Notifier flags (eg NOTIFIER_FLAG_WORKER) |
Device:PDevice;
|
The Device to notify on (or nil for all devices) |
DeviceClass:LongWord;
|
The Device class to notify on (or DEVICE_CLASS_ANY for all devices) |
Callback:TDeviceNotification;
|
The callback for device notifications |
Data:Pointer;
|
A pointer to callback specific data to be passed with notifications (Optional) |
Notification:LongWord;
|
The mask of events to notify on (eg DEVICE_NOTIFICATION_REGISTER etc) |
Internal Properties | |
Prev:PNotifier;
|
Previous entry in Notifier table |
Next:PNotifier;
|
Next entry in Notifier table |
Notifier task
PNotifierTask = ^TNotifierTask;
TNotifierTask = record
Device:PDevice;
|
|
Callback:TDeviceNotification;
|
|
Data:Pointer;
|
|
Notification:LongWord;
|
|
Next:PNotifierTask;
|
Notifier retry
PNotifierRetry = ^TNotifierRetry;
TNotifierRetry = record
Device:PDevice;
|
|
Notification:LongWord;
|
Driver enumeration callback
TDriverEnumerate = function(Driver:PDriver; Data:Pointer):LongWord;
|
Driver entry
PDriver = ^TDriver;
TDriver = record
Driver Properties | |
Signature:LongWord;
|
Signature for entry validation |
DriverId:LongWord;
|
Unique Id of this Driver in the Driver table |
DriverState:LongWord;
|
Driver state (eg Registered/Unregistered) |
DriverName:String;
|
Descriptive name for the Driver (eg USB Mouse Driver) |
DriverClass:LongWord;
|
The class of this Driver (eg DRIVER_CLASS_USB etc) |
Internal Properties | |
Prev:PDriver;
|
Previous entry in Driver table |
Next:PDriver;
|
Next entry in Driver table |
Host enumeration callback
THostEnumerate = function(Host:PHost; Data:Pointer):LongWord;
|
Host entry
PHost = ^THost;
THost = record
Host Properties | |
Signature:LongWord;
|
Signature for entry validation |
HostId:LongWord;
|
Unique Id of this Host in the Host table |
HostState:LongWord;
|
Host state (eg Registered/Unregistered) |
HostName:String;
|
Descriptive name for the Host (eg DWC OTG Host) |
HostClass:LongWord;
|
The class of this Host (eg HOST_CLASS_USB etc) |
Internal Properties | |
Prev:PHost;
|
Previous entry in Host table |
Next:PHost;
|
Next entry in Host table |
Clock properties
PClockProperties = ^TClockProperties;
TClockProperties = record
Flags:LongWord;
|
Device flags (eg CLOCK_FLAG_WRITABLE) |
Rate:LongWord;
|
Device current clock rate (Hz) |
MinRate:LongWord;
|
Device minimum clock rate (Hz) |
MaxRate:LongWord;
|
Device maximum clock rate (Hz) |
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
PClockDevice = ^TClockDevice;
TClockDevice = record
Device Properties | |
Device:TDevice;
|
The Device entry for this Clock device |
Clock Properties | |
ClockId:LongWord;
|
Unique Id of this Clock device in the Clock device table |
ClockState:LongWord;
|
Clock device state (eg CLOCK_STATE_ENABLED) |
DeviceStart:TClockDeviceStart;
|
A device specific DeviceStart method implementing a standard clock device interface (Or nil if the default method is suitable) |
DeviceStop:TClockDeviceStop;
|
A device specific DeviceStop method implementing a standard clock device interface (Or nil if the default method is suitable) |
DeviceRead:TClockDeviceRead;
|
A device specific DeviceRead method implementing a standard clock device interface (Or nil if the default method is suitable) |
DeviceRead64:TClockDeviceRead64;
|
A device specific DeviceRead64 method implementing a standard clock device interface (Mandatory) |
DeviceWrite64:TClockDeviceWrite64;
|
A device specific DeviceWrite64 method implementing a standard clock device interface (Optional) |
DeviceGetRate:TClockDeviceGetRate;
|
A device specific DeviceGetRate method implementing a standard clock device interface (Or nil if the default method is suitable) |
DeviceSetRate:TClockDeviceSetRate;
|
A device specific DeviceSetRate method implementing a standard clock device interface (Optional) |
DeviceGetProperties:TClockDeviceGetProperties;
|
A device specific DeviceGetProperties method implementing a standard clock device interface (Or nil if the default method is suitable) |
Statistics Properties | |
ReadCount:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Address:Pointer;
|
Device register base address |
Rate:LongWord;
|
Device rate (Hz) |
MinRate:LongWord;
|
Device minimum rate (Hz) |
MaxRate:LongWord;
|
Device maximum rate (Hz) |
Internal Properties | |
Prev:PClockDevice;
|
Previous entry in Clock device table |
Next:PClockDevice;
|
Next entry in Clock device table |
Timer callback
TTimerCallback = TCounterCallback;
|
Counter callback from Platform |
Timer properties
PTimerProperties = ^TTimerProperties;
TTimerProperties = record
Flags:LongWord;
|
Device flags (eg TIMER_FLAG_WRAPPING) |
Bits:LongWord;
|
Number of valid bits in timer read (eg 32 or 64) |
MinRate:LongWord;
|
Device minimum clock rate (Hz) |
MaxRate:LongWord;
|
Device maximum clock rate (Hz) |
MinInterval:LongWord;
|
Device minimum interval (Ticks) |
MaxInterval:LongWord;
|
Device maximum interval (Ticks) |
Timer waiter
PTimerWaiter = ^TTimerWaiter;
TTimerWaiter = record
Note: TTimerEvent is used already by the Threads unit | |
Timer:PTimerDevice;
|
Timer device this waiter belongs to |
Callback:TTimerCallback;
|
Callback function to call when event occurs |
Data:Pointer;
|
Pointer to pass to the callback function when event occurs |
Prev:PTimerWaiter;
|
Previous event in the list |
Next:PTimerWaiter;
|
Next event in the list |
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
PTimerDevice = ^TTimerDevice;
TTimerDevice = record
Note: Forward declared for TimerWaiter | |
Device Properties | |
Device:TDevice;
|
The Device entry for this Timer device |
Timer Properties | |
TimerId:LongWord;
|
Unique Id of this Timer device in the Timer device table |
TimerState:LongWord;
|
Timer device state (eg TIMER_STATE_ENABLED) |
DeviceStart:TTimerDeviceStart;
|
A device specific DeviceStart method implementing a standard timer device interface (Mandatory) |
DeviceStop:TTimerDeviceStop;
|
A device specific DeviceStop method implementing a standard timer device interface (Mandatory) |
DeviceRead:TTimerDeviceRead;
|
A device specific DeviceRead method implementing a standard timer device interface (One of Read or Read64 is Mandatory) |
DeviceRead64:TTimerDeviceRead64;
|
A device specific DeviceRead64 method implementing a standard timer device interface (One of Read or Read64 is Mandatory |
DeviceWait:TTimerDeviceWait;
|
A device specific DeviceWait method implementing a standard timer device interface (Or nil if the operation is not supported) |
DeviceEvent:TTimerDeviceEvent;
|
A device specific DeviceEvent method implementing a standard timer device interface (Or nil if the operation is not supported) |
DeviceCancel:TTimerDeviceCancel;
|
A device specific DeviceCancel method implementing a standard timer device interface (Or nil if the operation is not supported) |
DeviceGetRate:TTimerDeviceGetRate;
|
A device specific DeviceGetRate method implementing a standard timer device interface (Or nil if the default method is suitable) |
DeviceSetRate:TTimerDeviceSetRate;
|
A device specific DeviceSetRate method implementing a standard timer device interface (Or nil if the default method is suitable) |
DeviceGetInterval:TTimerDeviceGetInterval;
|
A device specific DeviceGetInterval method implementing a standard timer device interface (Or nil if the default method is suitable) |
DeviceSetInterval:TTimerDeviceSetInterval;
|
A device specific DeviceSetInterval method implementing a standard timer device interface (Or nil if the default method is suitable) |
DeviceGetProperties:TTimerDeviceGetProperties;
|
A device specific DeviceGetProperties method implementing a standard timer device interface (Or nil if the default method is suitable) |
Statistics Properties | |
ReadCount:LongWord;
|
|
WaitCount:LongWord;
|
|
EventCount:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Address:Pointer;
|
Device register base address |
Rate:LongWord;
|
Device rate (Hz) |
Interval:LongWord;
|
Device interval (Ticks) |
Properties:TTimerProperties;
|
Device properties |
Event Properties | |
Flags:LongWord;
|
Event flags for this timer (eg TIMER_EVENT_FLAG_REPEAT) |
Count:Longword;
|
Count of threads and events waiting for this timer |
Event:TEventHandle;
|
Event for threads waiting for this timer |
Waiters:PTimerWaiter;
|
List of events waiting for this timer |
Internal Properties | |
Prev:PTimerDevice;
|
Previous entry in Timer device table |
Next:PTimerDevice;
|
Next entry in Timer device table |
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
PRandomDevice = ^TRandomDevice;
TRandomDevice = record
Device Properties | |
Device:TDevice;
|
The Device entry for this Random device |
Random Properties | |
RandomId:LongWord;
|
Unique Id of this Random device in the Random device table |
RandomState:LongWord;
|
Random device state (eg RANDOM_STATE_ENABLED) |
DeviceStart:TRandomDeviceStart;
|
A device specific DeviceStart method implementing a standard random device interface (Mandatory) |
DeviceStop:TRandomDeviceStop;
|
A device specific DeviceStop method implementing a standard random device interface (Or nil if the default method is suitable) |
DeviceSeed:TRandomDeviceSeed;
|
A device specific DeviceSeed method implementing a standard random device interface (Or nil if the default method is suitable) |
DeviceReadByte:TRandomDeviceReadByte;
|
A device specific DeviceReadByte method implementing a standard random device interface (Or nil if the default method is suitable) |
DeviceReadWord:TRandomDeviceReadWord;
|
A device specific DeviceReadWord method implementing a standard random device interface (Or nil if the default method is suitable) |
DeviceReadLongWord:TRandomDeviceReadLongWord;
|
A device specific DeviceReadLongWord method implementing a standard random device interface (Mandatory) |
DeviceReadQuadWord:TRandomDeviceReadQuadWord;
|
A device specific DeviceReadQuadWord method implementing a standard random device interface (Or nil if the default method is suitable) |
DeviceReadDouble:TRandomDeviceReadDouble;
|
A device specific DeviceReadDouble method implementing a standard random device interface (Or nil if the default method is suitable) |
Statistics Properties | |
SeedCount:LongWord;
|
|
ReadCount:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Address:Pointer;
|
Device register base address |
Internal Properties | |
Prev:PRandomDevice;
|
Previous entry in Random device table |
Next:PRandomDevice;
|
Next entry in Random device table |
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
PMailboxDevice = ^TMailboxDevice;
TMailboxDevice = record
Device Properties | |
Device:TDevice;
|
The Device entry for this Mailbox device |
Mailbox Properties | |
MailboxId:LongWord;
|
Unique Id of this Mailbox device in the Mailbox device table |
MailboxState:LongWord;
|
Mailbox device state (eg MAILBOX_STATE_ENABLED) |
DeviceStart:TMailboxDeviceStart;
|
A device specific DeviceStart method implementing a standard mailbox device interface (Or nil if the default method is suitable) |
DeviceStop:TMailboxDeviceStop;
|
A device specific DeviceStop method implementing a standard mailbox device interface (Or nil if the default method is suitable) |
DeviceReceive:TMailboxDeviceReceive;
|
A device specific DeviceReceive method implementing a standard mailbox device interface (Mandatory) |
DeviceSend:TMailboxDeviceSend;
|
A device specific DeviceSend method implementing a standard mailbox device interface (Mandatory) |
DeviceCall:TMailboxDeviceCall;
|
A device specific DeviceCall method implementing a standard mailbox device interface (Mandatory) |
DeviceGetTimeout:TMailboxDeviceGetTimeout;
|
A device specific DeviceGetTimeout method implementing a standard mailbox device interface (Or nil if the default method is suitable) |
DeviceSetTimeout:TMailboxDeviceSetTimeout;
|
A device specific DeviceSetTimeout method implementing a standard mailbox device interface (Or nil if the default method is suitable) |
Statistics Properties | |
ReceiveCount:LongWord;
|
|
SendCount:LongWord;
|
|
CallCount:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Address:Pointer;
|
Device register base address |
Timeout:LongWord;
|
Device timeout (Milliseconds) |
Internal Properties | |
Prev:PMailboxDevice;
|
Previous entry in Mailbox device table |
Next:PMailboxDevice;
|
Next entry in Mailbox device table |
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
PWatchdogDevice = ^TWatchdogDevice;
TWatchdogDevice = record
Device Properties | |
Device:TDevice;
|
The Device entry for this Watchdog device |
Watchdog Properties | |
WatchdogId:LongWord;
|
Unique Id of this Watchdog device in the Watchdog device table |
WatchdogState:LongWord;
|
Watchdog device state (eg WATCHDOG_STATE_ENABLED) |
DeviceStart:TWatchdogDeviceStart;
|
A device specific DeviceStart method implementing a standard watchdog device interface (Mandatory) |
DeviceStop:TWatchdogDeviceStop;
|
A device specific DeviceStop method implementing a standard watchdog device interface (Mandatory) |
DeviceRefresh:TWatchdogDeviceRefresh;
|
A device specific DeviceRefresh method implementing a standard watchdog device interface (Mandatory) |
DeviceGetRemain:TWatchdogDeviceGetRemain;
|
A device specific DeviceGetRemain method implementing a standard watchdog device interface (Mandatory) |
DeviceGetTimeout:TWatchdogDeviceGetTimeout;
|
A device specific DeviceGetTimeout method implementing a standard watchdog device interface (Or nil if the default method is suitable) |
DeviceSetTimeout:TWatchdogDeviceSetTimeout;
|
A device specific DeviceSetTimeout method implementing a standard watchdog device interface (Or nil if the default method is suitable) |
Statistics Properties | |
StartCount:LongWord;
|
|
StopCount:LongWord;
|
|
RefreshCount:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Address:Pointer;
|
Device register base address |
Timeout:LongWord;
|
Device timeout (Milliseconds) |
Internal Properties | |
Prev:PWatchdogDevice;
|
Previous entry in Watchdog device table |
Next:PWatchdogDevice;
|
Next entry in Watchdog device table |
Public variables
Device logging
DEVICE_DEFAULT_LOG_LEVEL:LongWord = DEVICE_LOG_LEVEL_DEBUG;
|
Minimum level for Device messages. Only messages with level greater than or equal to this will be printed. |
DEVICE_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
procedure DevicesInit;
Note | Called only during system startup |
---|
Device functions
function DeviceCreate:PDevice;
Return | Pointer to new Device entry or nil if device could not be created |
---|
function DeviceCreateEx(Size:LongWord):PDevice;
Size | Size in bytes to allocate for new device (Including the device entry) |
---|---|
Return | Pointer to new Device entry or nil if device could not be created |
function DeviceDestroy(Device:PDevice):LongWord;
Device | The device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function DeviceGetName(Device:PDevice):String;
Device | The device to get the name from |
---|---|
Return | The name of the device or a blank string on error |
function DeviceSetName(Device:PDevice; const Name:String):LongWord;
Device | The device to set the name for |
---|---|
Name | The device name to set |
Return | ERROR_SUCCESS if completed or another error code on failure |
function DeviceGetDescription(Device:PDevice):String;
Device | The device to get the description from |
---|---|
Return | The description of the device or a blank string on error |
function DeviceSetDescription(Device:PDevice; const Description:String):LongWord;
Device | The device to set the description for |
---|---|
Description | The device description to set |
Return | ERROR_SUCCESS if completed or another error code on failure |
function DeviceRegister(Device:PDevice):LongWord;
Device | The device to register |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function DeviceDeregister(Device:PDevice):LongWord;
Device | The device to deregister |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;
DeviceClass | 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 |
function DeviceFindByDeviceData(DeviceData:Pointer):PDevice;
DeviceData | The value to match against the DeviceData property |
---|---|
Return | Pointer to device entry or nil if not found |
function DeviceFindByName(const Name:String):PDevice; inline;
Name | The name of the device to find (eg Timer0) |
---|---|
Return | Pointer to device entry or nil if not found |
function DeviceFindByNameEx(DeviceClass:LongWord; const Name:String):PDevice;
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 |
function DeviceFindByDescription(const Description:String):PDevice; inline;
Description | The description of the device to find (eg BCM2836 ARM Timer) |
---|---|
Return | Pointer to device entry or nil if not found |
function DeviceFindByDescriptionEx(DeviceClass:LongWord; const Description:String):PDevice;
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 |
function DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;
DeviceClass | 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 |
function DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Device | 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) |
function DeviceFirmwareCreate(DeviceClass:LongWord; const Name:String; Buffer:Pointer; Size:LongWord):Boolean;
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. |
function DeviceFirmwareRegister(DeviceClass:LongWord; const Name:String; Handler:TDeviceFirmwareHandler):THandle;
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 |
function DeviceFirmwareDeregister(Handle:THandle):LongWord;
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 |
function DeviceFirmwareFind(DeviceClass:LongWord; const Name:String):PDeviceFirmware;
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 |
function DeviceFirmwareFindByHandle(Handle:THandle):PDeviceFirmware;
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 |
function DeviceFirmwareOpen(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle):LongWord;
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 |
function DeviceFirmwareClose(Handle:THandle):LongWord;
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 |
function DeviceFirmwareSize(Handle:THandle):LongInt;
Handle | The handle to the firmware as returned by Open |
---|---|
Return | The size of the firmware on success or -1 on failure |
function DeviceFirmwareSeek(Handle:THandle; Position:LongInt):LongInt;
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 |
function DeviceFirmwareRead(Handle:THandle; Buffer:Pointer; Count:LongInt):LongInt;
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 |
function DeviceFirmwareAcquire(DeviceClass:LongWord; const Name:String; Timeout:LongWord; var Handle:THandle; var Buffer:Pointer; var Size:LongWord):LongWord;
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. |
function DeviceFirmwareRelease(Handle:THandle; Buffer:Pointer; Size:LongWord):LongWord;
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 |
function NotifierAllocate(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):PNotifier;
Note | None documented |
---|
function NotifierRelease(Notifier:PNotifier):LongWord;
Note | None documented |
---|
function NotifierFind(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer):PNotifier;
Note | None documented |
---|
function NotifierNotify(Device:PDevice; Notification:LongWord):LongWord;
Note | None documented |
---|
procedure NotifierRetry(Retry:PNotifierRetry);
Note | None documented |
---|
procedure NotifierWorker(Task:PNotifierTask);
Note | None documented |
---|
Driver functions
function DriverCreate:PDriver;
Return | Pointer to new Driver entry or nil if driver could not be created |
---|
function DriverCreateEx(Size:LongWord):PDriver;
Size | Size in bytes to allocate for new driver (Including the driver entry) |
---|---|
Return | Pointer to new Driver entry or nil if driver could not be created |
function DriverDestroy(Driver:PDriver):LongWord;
Driver | The driver to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function DriverGetName(Driver:PDriver):String;
Driver | The driver to get the name from |
---|---|
Return | The name of the driver or a blank string on error |
function DriverSetName(Driver:PDriver; const Name:String):LongWord;
Driver | The driver to set the name for |
---|---|
Name | The driver name to set |
Return | ERROR_SUCCESS if completed or another error code on failure |
function DriverRegister(Driver:PDriver):LongWord;
Driver | The driver to register |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function DriverDeregister(Driver:PDriver):LongWord;
Driver | The driver to deregister |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function DriverFind(DriverClass,DriverId:LongWord):PDriver;
DriverClass | 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 |
function DriverFindByName(const Name:String):PDriver;
Name | The name of the driver to find (eg USB Hub Driver) |
---|---|
Return | Pointer to driver entry or nil if not found |
function DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;
DriverClass | 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 |
Clock device functions
function ClockDeviceStart(Clock:PClockDevice):LongWord;
Clock | The Clock device to start |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ClockDeviceStop(Clock:PClockDevice):LongWord;
Clock | The Clock device to stop |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ClockDeviceRead(Clock:PClockDevice):LongWord;
Clock | The Clock device to read from |
---|---|
Return | The 32 bit counter value of the clock or 0 on failure |
function ClockDeviceRead64(Clock:PClockDevice):Int64;
Clock | The Clock device to read from |
---|---|
Return | The 64 bit counter value of the clock or 0 on failure |
function ClockDeviceWrite64(Clock:PClockDevice; const Value:Int64):LongWord;
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. |
function ClockDeviceGetRate(Clock:PClockDevice):LongWord;
Clock | The Clock device to get the rate from |
---|---|
Return | The current clock rate in Hz or 0 on failure |
function ClockDeviceSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;
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. |
function ClockDeviceProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord; inline;
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 |
function ClockDeviceGetProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord;
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 |
function ClockDeviceCreate:PClockDevice;
Return | Pointer to new Clock entry or nil if Clock could not be created |
---|
function ClockDeviceCreateEx(Size:LongWord):PClockDevice;
Size | Size in bytes to allocate for new Clock (Including the Clock entry) |
---|---|
Return | Pointer to new Clock entry or nil if Clock could not be created |
function ClockDeviceDestroy(Clock:PClockDevice):LongWord;
Clock | The clock device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ClockDeviceRegister(Clock:PClockDevice):LongWord;
Clock | The clock device to register |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ClockDeviceDeregister(Clock:PClockDevice):LongWord;
Clock | The clock device to deregister |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function ClockDeviceFind(ClockId:LongWord):PClockDevice;
ClockId | The ID number of the clock to find |
---|---|
Return | Pointer to clock device entry or nil if not found |
function ClockDeviceFindByName(const Name:String):PClockDevice; inline;
Name | The name of the clock to find (eg Clock0) |
---|---|
Return | Pointer to clock device entry or nil if not found |
function ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;
Description | The description of the clock to find (eg BCM2836 ARM Timer Clock) |
---|---|
Return | Pointer to clock device entry or nil if not found |
function ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;
Callback | 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 |
function ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Clock | 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) |
Timer device functions
function TimerDeviceStart(Timer:PTimerDevice):LongWord;
Timer | The Timer device to start |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function TimerDeviceStop(Timer:PTimerDevice):LongWord;
Timer | The Timer device to stop |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function TimerDeviceRead(Timer:PTimerDevice):LongWord;
Timer | The Timer device to read from |
---|---|
Return | The 32 bit current value of the timer or 0 on failure |
function TimerDeviceRead64(Timer:PTimerDevice):Int64;
Timer | The Timer device to read from |
---|---|
Return | The 64 bit current value of the timer or 0 on failure |
function TimerDeviceWait(Timer:PTimerDevice):LongWord;
Timer | The Timer device to wait for |
---|---|
Return | ERROR_SUCCESS if the interval expired or another error code on failure |
function TimerDeviceEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
Timer | 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 |
function TimerDeviceCancel(Timer:PTimerDevice):LongWord;
Timer | The Timer device to cancel the callback for |
---|---|
Return | ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure |
function TimerDeviceGetRate(Timer:PTimerDevice):LongWord;
Timer | The Timer device to get the rate from |
---|---|
Return | The current clock rate in Hz or 0 on failure |
function TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;
Timer | 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 |
function TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;
Timer | 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 |
function TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;
Timer | 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 |
function TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord; inline;
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 |
Note | Replaced by TimerDeviceGetProperties for consistency |
function TimerDeviceGetProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
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 |
function TimerDeviceCreate:PTimerDevice;
Return | Pointer to new Timer entry or nil if Timer could not be created |
---|
function TimerDeviceCreateEx(Size:LongWord):PTimerDevice;
Size | Size in bytes to allocate for new Timer (Including the Timer entry) |
---|---|
Return | Pointer to new Timer entry or nil if Timer could not be created |
function TimerDeviceDestroy(Timer:PTimerDevice):LongWord;
Timer | The timer device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function TimerDeviceRegister(Timer:PTimerDevice):LongWord;
Timer | The timer device to register |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function TimerDeviceDeregister(Timer:PTimerDevice):LongWord;
Timer | The timer device to deregister |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function TimerDeviceFind(TimerId:LongWord):PTimerDevice;
TimerId | The ID number of the timer to find |
---|---|
Return | Pointer to timer device entry or nil if not found |
function TimerDeviceFindByName(const Name:String):PTimerDevice; inline;
Name | The name of the timer to find (eg Timer0) |
---|---|
Return | Pointer to timer device entry or nil if not found |
function TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;
Description | The description of the timer to find (eg BCM2836 ARM Timer) |
---|---|
Return | Pointer to timer device entry or nil if not found |
function TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;
Callback | 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 |
function TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
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) |
Random device functions
function RandomDeviceStart(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceStop(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceSeed(Random:PRandomDevice; Seed:LongWord):LongWord;
Note | None documented |
---|
function RandomDeviceReadByte(Random:PRandomDevice):Byte;
Note | None documented |
---|
function RandomDeviceReadWord(Random:PRandomDevice):Word;
Note | None documented |
---|
function RandomDeviceReadLongWord(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceReadQuadWord(Random:PRandomDevice):Int64;
Note | None documented |
---|
function RandomDeviceReadDouble(Random:PRandomDevice):Double;
Note | None documented |
---|
function RandomDeviceReadExtended(Random:PRandomDevice):Extended; inline;
Note | Replaced by RandomDeviceReadDouble |
---|
function RandomDeviceCreate:PRandomDevice;
Return | Pointer to new Random entry or nil if Random could not be created |
---|
function RandomDeviceCreateEx(Size:LongWord):PRandomDevice;
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 |
function RandomDeviceDestroy(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceRegister(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceDeregister(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceFind(RandomId:LongWord):PRandomDevice;
Note | None documented |
---|
function RandomDeviceFindByName(const Name:String):PRandomDevice; inline;
Note | None documented |
---|
function RandomDeviceFindByDescription(const Description:String):PRandomDevice; inline;
Note | None documented |
---|
function RandomDeviceEnumerate(Callback:TRandomEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function RandomDeviceNotification(Random:PRandomDevice; Callback:TRandomNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
Mailbox device functions
function MailboxDeviceStart(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceStop(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceReceive(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;
Note | None documented |
---|
function MailboxDeviceSend(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;
Note | None documented |
---|
function MailboxDeviceCall(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;
Note | None documented |
---|
function MailboxDeviceGetTimeout(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceSetTimeout(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;
Note | None documented |
---|
function MailboxDeviceCreate:PMailboxDevice;
Return | Pointer to new Mailbox entry or nil if Mailbox could not be created |
---|
function MailboxDeviceCreateEx(Size:LongWord):PMailboxDevice;
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 |
function MailboxDeviceDestroy(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceRegister(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceDeregister(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceFind(MailboxId:LongWord):PMailboxDevice;
Note | None documented |
---|
function MailboxDeviceFindByName(const Name:String):PMailboxDevice; inline;
Note | None documented |
---|
function MailboxDeviceFindByDescription(const Description:String):PMailboxDevice; inline;
Note | None documented |
---|
function MailboxDeviceEnumerate(Callback:TMailboxEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function MailboxDeviceNotification(Mailbox:PMailboxDevice; Callback:TMailboxNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
Watchdog device functions
function WatchdogDeviceStart(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceStop(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceRefresh(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceGetRemain(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceGetTimeout(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceSetTimeout(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;
Note | None documented |
---|
function WatchdogDeviceCreate:PWatchdogDevice;
Return | Pointer to new Watchdog entry or nil if Watchdog could not be created |
---|
function WatchdogDeviceCreateEx(Size:LongWord):PWatchdogDevice;
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 |
function WatchdogDeviceDestroy(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceRegister(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceDeregister(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceFind(WatchdogId:LongWord):PWatchdogDevice;
Note | None documented |
---|
function WatchdogDeviceFindByName(const Name:String):PWatchdogDevice; inline;
Note | None documented |
---|
function WatchdogDeviceFindByDescription(const Description:String):PWatchdogDevice; inline;
Note | None documented |
---|
function WatchdogDeviceEnumerate(Callback:TWatchdogEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function WatchdogDeviceNotification(Watchdog:PWatchdogDevice; Callback:TWatchdogNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
RTL clock functions
function SysClockRead:LongWord;
Note | None documented |
---|
function SysClockRead64:Int64;
Note | None documented |
---|
RTL timer (counter) functions
function SysTimerAvailable:Boolean;
Note | None documented |
---|
function SysTimerRead:LongWord;
Return | The 32 bit current value of the counter or 0 on failure |
---|
function SysTimerRead64:Int64;
Return | The 64 bit current value of the counter or 0 on failure |
---|
function SysTimerWait:LongWord;
Return | ERROR_SUCCESS if the interval expired or another error code on failure |
---|
function SysTimerEvent(Callback:TTimerCallback; Data:Pointer):LongWord;
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 |
function SysTimerCancel:LongWord;
Return | ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure |
---|
function SysTimerGetRate:LongWord;
Return | The current clock rate in Hz or 0 on failure |
---|
function SysTimerSetRate(Rate:LongWord):LongWord;
Rate | The clock rate in Hz to set |
---|---|
Return | ERROR_SUCCESS if the clock rate was set or another error code on failure |
function SysTimerGetInterval:LongWord;
Return | The current interval in ticks or 0 on failure (or not set) |
---|---|
Note | The tick rate is determined by the clock rate |
function SysTimerSetInterval(Interval:LongWord):LongWord;
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 |
RTL random functions
function SysRandomAvailable:Boolean;
Note | None documented |
---|
procedure SysRandomize;
Note | None documented |
---|
procedure SysRandomSeed(Seed:LongWord);
Note | None documented |
---|
function SysRandomReadLongInt(Limit:LongInt):LongInt;
Note | None documented |
---|
function SysRandomReadInt64(Limit:Int64):Int64;
Note | None documented |
---|
function SysRandomReadDouble:Double;
Note | None documented |
---|
RTL watchdog functions
function SysWatchdogAvailable:Boolean;
Note | None documented |
---|
function SysWatchdogStart(Milliseconds:LongWord):LongWord;
Note | None documented |
---|
function SysWatchdogStop:LongWord;
Note | None documented |
---|
function SysWatchdogRefresh(Milliseconds:LongWord):LongWord;
Note | None documented |
---|
Device helper functions
function DeviceGetCount:LongWord; inline;
Note | None documented |
---|
function DeviceCheck(Device:PDevice):PDevice;
Note | None documented |
---|
function NotifierGetCount:LongWord; inline;
Note | None documented |
---|
function NotifierCheck(Notifier:PNotifier):PNotifier;
Note | None documented |
---|
function DeviceBusToString(DeviceBus:LongWord):String;
Note | None documented |
---|
function DeviceStateToString(DeviceState:LongWord):String;
Note | None documented |
---|
function DeviceClassToString(DeviceClass:LongWord):String;
Note | None documented |
---|
function NotificationToString(Notification:LongWord):String;
Note | None documented |
---|
procedure DeviceLog(Level:LongWord; Device:PDevice; const AText:String);
Note | None documented |
---|
procedure DeviceLogInfo(Device:PDevice; const AText:String); inline;
Note | None documented |
---|
procedure DeviceLogWarn(Device:PDevice; const AText:String); inline;
Note | None documented |
---|
procedure DeviceLogError(Device:PDevice; const AText:String); inline;
Note | None documented |
---|
procedure DeviceLogDebug(Device:PDevice; const AText:String); inline;
Note | None documented |
---|
Driver helper functions
function DriverGetCount:LongWord; inline;
Note | None documented |
---|
function DriverCheck(Driver:PDriver):PDriver;
Note | None documented |
---|
function DriverStateToString(DriverState:LongWord):String;
Note | None documented |
---|
function DriverClassToString(DriverClass:LongWord):String;
Note | None documented |
---|
Clock device helper functions
function ClockDeviceGetCount:LongWord; inline;
Note | None documented |
---|
function ClockDeviceGetDefault:PClockDevice; inline;
Note | None documented |
---|
function ClockDeviceSetDefault(Clock:PClockDevice):LongWord;
Note | None documented |
---|
function ClockDeviceCheck(Clock:PClockDevice):PClockDevice;
Note | None documented |
---|
function ClockTypeToString(ClockType:LongWord):String;
Note | None documented |
---|
function ClockStateToString(ClockState:LongWord):String;
Note | None documented |
---|
Timer device helper functions
function TimerDeviceGetCount:LongWord; inline;
Note | None documented |
---|
function TimerDeviceGetDefault:PTimerDevice; inline;
Note | None documented |
---|
function TimerDeviceSetDefault(Timer:PTimerDevice):LongWord;
Note | None documented |
---|
function TimerDeviceCheck(Timer:PTimerDevice):PTimerDevice;
Note | None documented |
---|
function TimerTypeToString(TimerType:LongWord):String;
Note | None documented |
---|
function TimerStateToString(TimerState:LongWord):String;
Note | None documented |
---|
function TimerDeviceCreateWaiter(Timer:PTimerDevice; Callback:TTimerCallback; Data:Pointer):PTimerWaiter;
Note | Waiter must be registered by calling TimerDeviceRegisterWaiter.
Caller must hold the Timer device lock. |
---|
function TimerDeviceDestroyWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Note | Waiter must be deregistered first by calling TimerDeviceDeregisterWaiter.
Caller must hold the Timer device lock. |
---|
function TimerDeviceRegisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Note | Waiter must be created by calling TimerDeviceCreateWaiter.
Caller must hold the Timer device lock. |
---|
function TimerDeviceDeregisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Note | Waiter must be destroyed by calling TimerDeviceDestroyWaiter.
Caller must hold the Timer device lock. |
---|
Random device helper functions
function RandomDeviceGetCount:LongWord; inline;
Note | None documented |
---|
function RandomDeviceGetDefault:PRandomDevice; inline;
Note | None documented |
---|
function RandomDeviceSetDefault(Random:PRandomDevice):LongWord;
Note | None documented |
---|
function RandomDeviceCheck(Random:PRandomDevice):PRandomDevice;
Note | None documented |
---|
function RandomTypeToString(RandomType:LongWord):String;
Note | None documented |
---|
function RandomStateToString(RandomState:LongWord):String;
Note | None documented |
---|
Mailbox device helper functions
function MailboxDeviceGetCount:LongWord; inline;
Note | None documented |
---|
function MailboxDeviceGetDefault:PMailboxDevice; inline;
Note | None documented |
---|
function MailboxDeviceSetDefault(Mailbox:PMailboxDevice):LongWord;
Note | None documented |
---|
function MailboxDeviceCheck(Mailbox:PMailboxDevice):PMailboxDevice;
Note | None documented |
---|
function MailboxTypeToString(MailboxType:LongWord):String;
Note | None documented |
---|
function MailboxStateToString(MailboxState:LongWord):String;
Note | None documented |
---|
Watchdog device helper functions
function WatchdogDeviceGetCount:LongWord; inline;
Note | None documented |
---|
function WatchdogDeviceGetDefault:PWatchdogDevice; inline;
Note | None documented |
---|
function WatchdogDeviceSetDefault(Watchdog:PWatchdogDevice):LongWord;
Note | None documented |
---|
function WatchdogDeviceCheck(Watchdog:PWatchdogDevice):PWatchdogDevice;
Note | None documented |
---|
function WatchdogTypeToString(WatchdogType:LongWord):String;
Note | None documented |
---|
function WatchdogStateToString(WatchdogState:LongWord):String;
Note | None documented |
---|
Return to Unit Reference