Return to Unit Reference
Description
Ultibo Device interface unit
To be documented
Constants
[Expand]
Device specific constants DEVICE_*
DEVICE_NAME_PREFIX = 'Device';
|
Name prefix for Devices
|
[Expand]
Device signature constants DEVICE_SIGNATURE_*
DEVICE_SIGNATURE = $AD03FE3C;
|
|
[Expand]
Device bus constants 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;
|
|
[Expand]
Device state constants DEVICE_STATE_*
DEVICE_STATE_UNREGISTERED = 0;
|
|
DEVICE_STATE_REGISTERED = 1;
|
|
|
DEVICE_STATE_MAX = 1;
|
|
[Expand]
Device Id constants DEVICE_ID_*
DEVICE_ID_ANY = $FFFFFFFF;
|
Any Device (Pass to DeviceFind to match all devices)
|
[Expand]
Device class constants 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_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_MAX = 54;
|
|
|
DEVICE_CLASS_ANY = $FFFFFFFF;
|
Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices)
|
[Expand]
Device notification flag constants 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;
|
|
[Expand]
Notifier signature constants NOTIFIER_SIGNATURE_*
NOTIFIER_SIGNATURE = $6FA1BEC9;
|
|
[Expand]
Notifier state constants NOTIFIER_STATE_*
NOTIFIER_STATE_UNREGISTERED = 0;
|
|
NOTIFIER_STATE_REGISTERED = 1;
|
|
[Expand]
Notifier flag constants NOTIFIER_FLAG_*
NOTIFIER_FLAG_NONE = $00000000;
|
|
NOTIFIER_FLAG_WORKER = $00000001;
|
If set, notification callback event will be scheduled on a worker thread
|
[Expand]
Device logging constants 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_ERROR = LOG_LEVEL_ERROR;
|
Device error messages
|
DEVICE_LOG_LEVEL_NONE = LOG_LEVEL_NONE;
|
No Device messages
|
[Expand]
Driver specific constants DRIVER_*
DRIVER_NAME_PREFIX = 'Driver';
|
Name prefix for Drivers
|
[Expand]
Driver signature constants DRIVER_SIGNATURE_*
DRIVER_SIGNATURE = $1EB4980A;
|
|
[Expand]
Driver state constants DRIVER_STATE_*
DRIVER_STATE_UNREGISTERED = 0;
|
|
DRIVER_STATE_REGISTERED = 1;
|
|
|
DRIVER_STATE_MAX = 1;
|
|
[Expand]
Driver Id constants DRIVER_ID_*
DRIVER_ID_ANY = $FFFFFFFF;
|
Any Driver (Pass to DriverFind to match all drivers)
|
[Expand]
Driver class constants 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_MAX = 4;
|
|
|
DRIVER_CLASS_ANY = $FFFFFFFF;
|
Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers)
|
[Expand]
Host specific constants HOST_*
HOST_NAME_PREFIX = 'Host';
|
Name prefix for Hosts
|
[Expand]
Host signature constants HOST_SIGNATURE_*
HOST_SIGNATURE = $F45D30FE;
|
|
[Expand]
Host state constants HOST_STATE_*
HOST_STATE_UNREGISTERED = 0;
|
|
HOST_STATE_REGISTERED = 1;
|
|
[Expand]
Host Id constants HOST_ID_*
HOST_ID_ANY = $FFFFFFFF;
|
Any Host (Pass to HostFind to match all hosts)
|
[Expand]
Host class constants 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)
|
[Expand]
Clock specific constants CLOCK_*
CLOCK_NAME_PREFIX = 'Clock';
|
Name prefix for Clock Devices
|
[Expand]
Clock device type constants CLOCK_TYPE_*
CLOCK_TYPE_NONE = 0;
|
|
CLOCK_TYPE_HARDWARE = 1;
|
|
[Expand]
Clock device state constants CLOCK_STATE_*
CLOCK_STATE_DISABLED = 0;
|
|
CLOCK_STATE_ENABLED = 1;
|
|
[Expand]
Clock device flag constants 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
|
[Expand]
Timer specific constants TIMER_*
TIMER_NAME_PREFIX = 'Timer';
|
Name prefix for Timer Devices
|
[Expand]
Timer device type constants TIMER_TYPE_*
TIMER_TYPE_NONE = 0;
|
|
TIMER_TYPE_HARDWARE = 1;
|
|
[Expand]
Timer device state constants TIMER_STATE_*
TIMER_STATE_DISABLED = 0;
|
|
TIMER_STATE_ENABLED = 1;
|
|
[Expand]
Timer device flag constants 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)
|
[Expand]
Timer event flag constants 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.
|
[Expand]
Random specific constants RANDOM_*
RANDOM_NAME_PREFIX = 'Random';
|
Name prefix for Random Devices
|
[Expand]
Random device type constants RANDOM_TYPE_*
RANDOM_TYPE_NONE = 0;
|
|
RANDOM_TYPE_HARDWARE = 1;
|
|
RANDOM_TYPE_SOFTWARE = 2;
|
|
[Expand]
Random device state constants RANDOM_STATE_*
RANDOM_STATE_DISABLED = 0;
|
|
RANDOM_STATE_ENABLED = 1;
|
|
[Expand]
Random device flag constants RANDOM_FLAG_*
RANDOM_FLAG_NONE = $00000000;
|
|
[Expand]
Mailbox specific constants MAILBOX_*
MAILBOX_NAME_PREFIX = 'Mailbox';
|
Name prefix for Mailbox Devices
|
[Expand]
Mailbox device type constants MAILBOX_TYPE_*
MAILBOX_TYPE_NONE = 0;
|
|
MAILBOX_TYPE_GPU = 1;
|
|
MAILBOX_TYPE_LOCAL = 2;
|
|
[Expand]
Mailbox device state constants MAILBOX_STATE_*
MAILBOX_STATE_DISABLED = 0;
|
|
MAILBOX_STATE_ENABLED = 1;
|
|
[Expand]
Mailbox device flag constants MAILBOX_FLAG_*
MAILBOX_FLAG_NONE = $00000000;
|
|
[Expand]
Watchdog specific constants WATCHDOG_*
WATCHDOG_NAME_PREFIX = 'Watchdog';
|
Name prefix for Watchdog Devices
|
[Expand]
Watchdog device type constants WATCHDOG_TYPE_*
WATCHDOG_TYPE_NONE = 0;
|
|
WATCHDOG_TYPE_HARDWARE = 1;
|
|
[Expand]
Watchdog device state constants WATCHDOG_STATE_*
WATCHDOG_STATE_DISABLED = 0;
|
|
WATCHDOG_STATE_ENABLED = 1;
|
|
[Expand]
Watchdog device flag constants WATCHDOG_FLAG_*
WATCHDOG_FLAG_NONE = $00000000;
|
|
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
[Expand]
procedure DevicesInit;
Description: Initialize the Devices unit and device, notifier and driver tables
Note
|
Called only during system startup
|
Device functions
[Expand]
function DeviceCreate:PDevice;
Description: Create a new Device entry
Return
|
Pointer to new Device entry or nil if device could not be created
|
[Expand]
function DeviceCreateEx(Size:LongWord):PDevice;
Description: Create a new Device entry
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
|
[Expand]
function DeviceDestroy(Device:PDevice):LongWord;
Description: Destroy an existing Device entry
Device
|
The device to destroy
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function DeviceGetName(Device:PDevice):String;
Description: Get the name of the supplied Device
Device
|
The device to get the name from
|
Return
|
The name of the device or a blank string on error
|
[Expand]
function DeviceSetName(Device:PDevice; const Name:String):LongWord;
Description: Set the name of the supplied Device
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
|
[Expand]
function DeviceGetDescription(Device:PDevice):String;
Description: Get the description of the supplied Device
Device
|
The device to get the description from
|
Return
|
The description of the device or a blank string on error
|
[Expand]
function DeviceSetDescription(Device:PDevice; const Description:String):LongWord;
Description: Set the description of the supplied Device
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
|
[Expand]
function DeviceRegister(Device:PDevice):LongWord;
Description: Register a new Device in the Device table
Device
|
The device to register
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function DeviceDeregister(Device:PDevice):LongWord;
Description: Deregister a Device from the Device table
Device
|
The device to deregister
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;
Description: Find a device by ID in the device table
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
|
[Expand]
function DeviceFindByName(const Name:String):PDevice;
Description: Find a device by name in the device table
Name
|
The name of the device to find (eg Timer0)
|
Return
|
Pointer to device entry or nil if not found
|
[Expand]
function DeviceFindByDescription(const Description:String):PDevice;
Description: Find a device by description in the device table
Description
|
The description of the device to find (eg BCM2836 ARM Timer)
|
Return
|
Pointer to device entry or nil if not found
|
[Expand]
function DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;
Description: Enumerate all devices in the device table
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
|
[Expand]
function DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for device changes
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)
|
[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
Driver functions
[Expand]
function DriverCreate:PDriver;
Description: Create a new Driver entry
Return
|
Pointer to new Driver entry or nil if driver could not be created
|
[Expand]
function DriverCreateEx(Size:LongWord):PDriver;
Description: Create a new Driver entry
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
|
[Expand]
function DriverDestroy(Driver:PDriver):LongWord;
Description: Destroy an existing Driver entry
Driver
|
The driver to destroy
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function DriverGetName(Driver:PDriver):String;
Description: Get the name of the supplied Driver
Driver
|
The driver to get the name from
|
Return
|
The name of the driver or a blank string on error
|
[Expand]
function DriverSetName(Driver:PDriver; const Name:String):LongWord;
Description: Set the name of the supplied Driver
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
|
[Expand]
function DriverRegister(Driver:PDriver):LongWord;
Description: Register a new Driver in the Driver table
Driver
|
The driver to register
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function DriverDeregister(Driver:PDriver):LongWord;
Description: Deregister a Driver from the Driver table
Driver
|
The driver to deregister
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function DriverFind(DriverClass,DriverId:LongWord):PDriver;
Description: Find a driver by ID in the driver table
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
|
[Expand]
function DriverFindByName(const Name:String):PDriver;
Description: Find a driver by name in the driver table
Name
|
The name of the driver to find (eg USB Hub Driver)
|
Return
|
Pointer to driver entry or nil if not found
|
[Expand]
function DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;
Description: Enumerate all drivers in the driver table
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
[Expand]
function ClockDeviceStart(Clock:PClockDevice):LongWord;
Description: Start the counter of the specified clock device
Clock
|
The Clock device to start
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function ClockDeviceStop(Clock:PClockDevice):LongWord;
Description: Stop the counter of the specified clock device
Clock
|
The Clock device to stop
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function ClockDeviceRead(Clock:PClockDevice):LongWord;
Description: Read the counter value of the specified clock device
Clock
|
The Clock device to read from
|
Return
|
The 32 bit counter value of the clock or 0 on failure
|
[Expand]
function ClockDeviceRead64(Clock:PClockDevice):Int64;
Description: Read the counter value of the specified clock device
Clock
|
The Clock device to read from
|
Return
|
The 64 bit counter value of the clock or 0 on failure
|
[Expand]
function ClockDeviceWrite64(Clock:PClockDevice; const Value:Int64):LongWord;
Description: Write the counter value of the specified clock device
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.
|
[Expand]
function ClockDeviceGetRate(Clock:PClockDevice):LongWord;
Description: Get the current clock rate in Hz of the specified clock device
Clock
|
The Clock device to get the rate from
|
Return
|
The current clock rate in Hz or 0 on failure
|
[Expand]
function ClockDeviceSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;
Description: Set the current clock rate in Hz of the specified clock device
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.
|
[Expand]
function ClockDeviceProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord;
Description: Get the properties for the specified clock device
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
|
[Expand]
function ClockDeviceCreate:PClockDevice;
Description: Create a new Clock entry
Return
|
Pointer to new Clock entry or nil if Clock could not be created
|
[Expand]
function ClockDeviceCreateEx(Size:LongWord):PClockDevice;
Description: Create a new Clock entry
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
|
[Expand]
function ClockDeviceDestroy(Clock:PClockDevice):LongWord;
Description: Destroy an existing clock entry
Clock
|
The clock device to destroy
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function ClockDeviceRegister(Clock:PClockDevice):LongWord;
Description: Register a new clock in the clock table
Clock
|
The clock device to register
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function ClockDeviceDeregister(Clock:PClockDevice):LongWord;
Description: Deregister a clock from the clock table
Clock
|
The clock device to deregister
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function ClockDeviceFind(ClockId:LongWord):PClockDevice;
Description: Find a clock device by ID in the clock table
TimerId
|
The ID number of the clock to find
|
Return
|
Pointer to clock device entry or nil if not found
|
[Expand]
function ClockDeviceFindByName(const Name:String):PClockDevice; inline;
Description: Find a clock device by name in the clock table
Name
|
The name of the clock to find (eg Clock0)
|
Return
|
Pointer to clock device entry or nil if not found
|
[Expand]
function ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;
Description: Find a clock device by description in the clock table
Description
|
The description of the clock to find (eg BCM2836 ARM Timer Clock)
|
Return
|
Pointer to clock device entry or nil if not found
|
[Expand]
function ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;
Description: Enumerate all clock devices in the clock table
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
|
[Expand]
function ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for clock device changes
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
[Expand]
function TimerDeviceStart(Timer:PTimerDevice):LongWord;
Description: Start the clock and counter of the specified Timer device
Timer
|
The Timer device to start
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function TimerDeviceStop(Timer:PTimerDevice):LongWord;
Description: Stop the clock and counter of the specified Timer device
Timer
|
The Timer device to stop
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function TimerDeviceRead(Timer:PTimerDevice):LongWord;
Description: Read the current value of the specified Timer device
Timer
|
The Timer device to read from
|
Return
|
The 32 bit current value of the timer or 0 on failure
|
[Expand]
function TimerDeviceRead64(Timer:PTimerDevice):Int64;
Description: Read the current value of the specified Timer device
Timer
|
The Timer device to read from
|
Return
|
The 64 bit current value of the timer or 0 on failure
|
[Expand]
function TimerDeviceWait(Timer:PTimerDevice):LongWord;
Description: Wait for the current interval to expire on the specified Timer device
Timer
|
The Timer device to wait for
|
Return
|
ERROR_SUCCESS if the interval expired or another error code on failure
|
[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
Timer
|
The Timer device to schedule the callback for
|
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
|
[Expand]
function TimerDeviceCancel(Timer:PTimerDevice):LongWord;
Description: Cancel a previously scheduled event callback function on the specified Timer device
Timer
|
The Timer device to cancel the callback for
|
Return
|
ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure
|
[Expand]
function TimerDeviceGetRate(Timer:PTimerDevice):LongWord;
Description: Get the current clock rate in Hz of the specified Timer device
Timer
|
The Timer device to get the rate from
|
Return
|
The current clock rate in Hz or 0 on failure
|
[Expand]
function TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;
Description: Set the current clock rate in Hz of the specified Timer device
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
|
[Expand]
function TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;
Description: Get the current interval in ticks of the specified Timer device
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
|
[Expand]
function TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;
Description: Set the current interval in ticks of the specified Timer device
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
|
[Expand]
function TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
Description: Get the properties for the specified Timer device
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
|
[Expand]
function TimerDeviceCreate:PTimerDevice;
Description: Create a new Timer entry
Return
|
Pointer to new Timer entry or nil if Timer could not be created
|
[Expand]
function TimerDeviceCreateEx(Size:LongWord):PTimerDevice;
Description: Create a new Timer entry
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
|
[Expand]
function TimerDeviceDestroy(Timer:PTimerDevice):LongWord;
Description: Destroy an existing Timer entry
Timer
|
The timer device to destroy
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function TimerDeviceRegister(Timer:PTimerDevice):LongWord;
Description: Register a new Timer in the Timer table
Timer
|
The timer device to register
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function TimerDeviceDeregister(Timer:PTimerDevice):LongWord;
Description: Deregister a Timer from the Timer table
Timer
|
The timer device to deregister
|
Return
|
ERROR_SUCCESS if completed or another error code on failure
|
[Expand]
function TimerDeviceFind(TimerId:LongWord):PTimerDevice;
Description: Find a timer device by ID in the timer table
TimerId
|
The ID number of the timer to find
|
Return
|
Pointer to timer device entry or nil if not found
|
[Expand]
function TimerDeviceFindByName(const Name:String):PTimerDevice; inline;
Description: Find a timer device by name in the timer table
Name
|
The name of the timer to find (eg Timer0)
|
Return
|
Pointer to timer device entry or nil if not found
|
[Expand]
function TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;
Description: Find a timer device by description in the timer table
Description
|
The description of the timer to find (eg BCM2836 ARM Timer)
|
Return
|
Pointer to timer device entry or nil if not found
|
[Expand]
function TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;
Description: Enumerate all timer devices in the timer table
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
|
[Expand]
function TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for timer device changes
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
[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 RandomDeviceReadExtended(Random:PRandomDevice):Extended;
Description: To be documented
[Expand]
function RandomDeviceCreate:PRandomDevice;
Description: Create a new Random entry
Return
|
Pointer to new Random entry or nil if Random could not be created
|
[Expand]
function RandomDeviceCreateEx(Size:LongWord):PRandomDevice;
Description: Create a new Random entry
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
|
[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
Return
|
Pointer to new Mailbox entry or nil if Mailbox could not be created
|
[Expand]
function MailboxDeviceCreateEx(Size:LongWord):PMailboxDevice;
Description: Create a new Mailbox entry
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
|
[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
Return
|
Pointer to new Watchdog entry or nil if Watchdog could not be created
|
[Expand]
function WatchdogDeviceCreateEx(Size:LongWord):PWatchdogDevice;
Description: Create a new Watchdog entry
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
|
[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
Return
|
The 32 bit current value of the counter or 0 on failure
|
[Expand]
function SysTimerRead64:Int64;
Description: Read the current value of the default counter
Return
|
The 64 bit current value of the counter or 0 on failure
|
[Expand]
function SysTimerWait:LongWord;
Description: Wait for the current interval to expire on the default counter
Return
|
ERROR_SUCCESS if the interval expired or another error code on failure
|
[Expand]
function SysTimerEvent(Callback:TTimerCallback; Data:Pointer):LongWord;
Description: Schedule a function to be called when the current interval expires on the default counter
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
|
[Expand]
function SysTimerCancel:LongWord;
Description: Cancel a previously scheduled event callback function on the default counter
Return
|
ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure
|
[Expand]
function SysTimerGetRate:LongWord;
Description: Get the current clock rate in Hz of the default counter
Return
|
The current clock rate in Hz or 0 on failure
|
[Expand]
function SysTimerSetRate(Rate:LongWord):LongWord;
Description: Set the current clock rate in Hz of the default counter
Rate
|
The clock rate in Hz to set
|
Return
|
ERROR_SUCCESS if the clock rate was set or another error code on failure
|
[Expand]
function SysTimerGetInterval:LongWord;
Description: Get the current interval in ticks of the default counter
Return
|
The current interval in ticks or 0 on failure (or not set)
|
Note
|
The tick rate is determined by the clock rate
|
[Expand]
function SysTimerSetInterval(Interval:LongWord):LongWord;
Description: Set the current interval in ticks of the default counter
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
[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 SysRandomReadExtended:Extended;
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; inline;
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; inline;
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);
Description: To be documented
[Expand]
procedure DeviceLogError(Device:PDevice; const AText:String);
Description: To be documented
[Expand]
procedure DeviceLogDebug(Device:PDevice; const AText:String);
Description: To be documented
Driver helper functions
[Expand]
function DriverGetCount:LongWord; inline;
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; inline;
Description: Get the current clock device count
[Expand]
function ClockDeviceGetDefault:PClockDevice; inline;
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
Timer device helper functions
[Expand]
function TimerDeviceGetCount:LongWord; inline;
Description: Get the current timer device count
[Expand]
function TimerDeviceGetDefault:PTimerDevice; inline;
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 TimerDeviceCreateWaiter(Timer:PTimerDevice; Callback:TTimerCallback; Data:Pointer):PTimerWaiter;
Description: Create a new waiter using the supplied parameters
Note
|
Waiter must be registered by calling TimerDeviceRegisterWaiter. Caller must hold the Timer device lock.
|
[Expand]
function TimerDeviceDestroyWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Description: Destroy an existing waiter
Note
|
Waiter must be deregistered first by calling TimerDeviceDeregisterWaiter. Caller must hold the Timer device lock.
|
[Expand]
function TimerDeviceRegisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Description: Register a waiter in the waiter list of the supplied Timer
Note
|
Waiter must be created by calling TimerDeviceCreateWaiter. Caller must hold the Timer device lock.
|
[Expand]
function TimerDeviceDeregisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Description: Deregister a waiter from the waiter list of the supplied Timer
Note
|
Waiter must be destroyed by calling TimerDeviceDestroyWaiter. Caller must hold the Timer device lock.
|
Random device helper functions
[Expand]
function RandomDeviceGetCount:LongWord; inline;
Description: Get the current random device count
[Expand]
function RandomDeviceGetDefault:PRandomDevice; inline;
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
Mailbox device helper functions
[Expand]
function MailboxDeviceGetCount:LongWord; inline;
Description: Get the current mailbox device count
[Expand]
function MailboxDeviceGetDefault:PMailboxDevice; inline;
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
Watchdog device helper functions
[Expand]
function WatchdogDeviceGetCount:LongWord; inline;
Description: Get the current watchdog device count
[Expand]
function WatchdogDeviceGetDefault:PWatchdogDevice; inline;
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
Return to Unit Reference