Difference between revisions of "Unit Devices"
Line 926: | Line 926: | ||
---- | ---- | ||
− | '' | + | |
+ | '''Device enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TDeviceEnumerate = function(Device:PDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Device notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Device entry''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PDevice = ^TDevice;</code> | ||
+ | |||
+ | <code>TDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Signature:LongWord;</code> | ||
+ | | Signature for entry validation | ||
+ | |- | ||
+ | | <code>DeviceId:LongWord;</code> | ||
+ | | Unique Id of this Device in the Device table | ||
+ | |- | ||
+ | | <code>DeviceState:LongWord;</code> | ||
+ | | Device state (eg Registered/Unregistered) | ||
+ | |- | ||
+ | | <code>DeviceName:String;</code> | ||
+ | | The name of the Device (eg Keyboard0, Storage0 or Network0 etc) | ||
+ | |- | ||
+ | | <code>DeviceClass:LongWord;</code> | ||
+ | | The class of this Device (eg DEVICE_CLASS_USB, DEVICE_CLASS_NETWORK, DEVICE_CLASS_STORAGE etc) | ||
+ | |- | ||
+ | | <code>DeviceBus:LongWord;</code> | ||
+ | | The Bus type for the Device (eg DEVICE_BUS_USB) | ||
+ | |- | ||
+ | | <code>DeviceType:LongWord;</code> | ||
+ | | A class specific Device type (eg KEYBOARD_TYPE_USB, MOUSE_TYPE_USB, NETWORK_TYPE_ETHERNET etc) | ||
+ | |- | ||
+ | | <code>DeviceFlags:LongWord;</code> | ||
+ | | The class specific Device flags | ||
+ | |- | ||
+ | | <code>DeviceData:Pointer;</code> | ||
+ | | A pointer to a class specific Device interface (eg PUSBDevice, PNetworkDevice or PStorageDevice etc) (Used by Drivers) | ||
+ | |- | ||
+ | | <code>DeviceDescription:String;</code> | ||
+ | | A description of the Device (eg BCM2835 PL011 UART) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PDevice;</code> | ||
+ | | Previous entry in Device table | ||
+ | |- | ||
+ | | <code>Next:PDevice;</code> | ||
+ | | Next entry in Device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Notifier entry''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PNotifier = ^TNotifier;</code> | ||
+ | |||
+ | <code>TNotifier = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Notifier Properties'' | ||
+ | |- | ||
+ | | <code>Signature:LongWord;</code> | ||
+ | | Signature for entry validation | ||
+ | |- | ||
+ | | <code>NotifierState:LongWord;</code> | ||
+ | | Notifier state (eg Registered/Unregistered) | ||
+ | |- | ||
+ | | <code>NotifierFlags:LongWord;</code> | ||
+ | | Notifier flags (eg NOTIFIER_FLAG_WORKER) | ||
+ | |- | ||
+ | | <code>Device:PDevice;</code> | ||
+ | | The Device to notify on (or nil for all devices) | ||
+ | |- | ||
+ | | <code>DeviceClass:LongWord;</code> | ||
+ | | The Device class to notify on (or DEVICE_CLASS_ANY for all devices) | ||
+ | |- | ||
+ | | <code>Callback:TDeviceNotification;</code> | ||
+ | | The callback for device notifications | ||
+ | |- | ||
+ | | <code>Data:Pointer;</code> | ||
+ | | A pointer to callback specific data to be passed with notifications (Optional) | ||
+ | |- | ||
+ | | <code>Notification:LongWord;</code> | ||
+ | | The mask of events to notify on (eg DEVICE_NOTIFICATION_REGISTER etc) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PNotifier;</code> | ||
+ | | Previous entry in Notifier table | ||
+ | |- | ||
+ | | <code>Next:PNotifier;</code> | ||
+ | | Next entry in Notifier table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Notifier task''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PNotifierTask = ^TNotifierTask;</code> | ||
+ | |||
+ | <code>TNotifierTask = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Device:PDevice;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Callback:TDeviceNotification;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Data:Pointer;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Notification:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Driver enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TDriverEnumerate = function(Driver:PDriver; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Driver entry''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PDriver = ^TDriver;</code> | ||
+ | |||
+ | <code>TDriver = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Signature:LongWord;</code> | ||
+ | | Signature for entry validation | ||
+ | |- | ||
+ | | <code>DriverId:LongWord;</code> | ||
+ | | Unique Id of this Driver in the Driver table | ||
+ | |- | ||
+ | | <code>DriverState:LongWord;</code> | ||
+ | | Driver state (eg Registered/Unregistered) | ||
+ | |- | ||
+ | | <code>DriverName:String;</code> | ||
+ | | Descriptive name for the Driver (eg USB Mouse Driver) | ||
+ | |- | ||
+ | | <code>DriverClass:LongWord;</code> | ||
+ | | The class of this Driver (eg DRIVER_CLASS_USB etc) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PDriver;</code> | ||
+ | | Previous entry in Driver table | ||
+ | |- | ||
+ | | <code>Next:PDriver;</code> | ||
+ | | Next entry in Driver table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Host enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>THostEnumerate = function(Host:PHost; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Host entry''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PHost = ^THost;</code> | ||
+ | |||
+ | <code>THost = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Host Properties'' | ||
+ | |- | ||
+ | | <code>Signature:LongWord;</code> | ||
+ | | Signature for entry validation | ||
+ | |- | ||
+ | | <code>HostId:LongWord;</code> | ||
+ | | Unique Id of this Host in the Host table | ||
+ | |- | ||
+ | | <code>HostState:LongWord;</code> | ||
+ | | Host state (eg Registered/Unregistered) | ||
+ | |- | ||
+ | | <code>HostName:String;</code> | ||
+ | | Descriptive name for the Host (eg DWC OTG Host) | ||
+ | |- | ||
+ | | <code>HostClass:LongWord;</code> | ||
+ | | The class of this Host (eg HOST_CLASS_USB etc) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PHost;</code> | ||
+ | | Previous entry in Host table | ||
+ | |- | ||
+ | | <code>Next:PHost;</code> | ||
+ | | Next entry in Host table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Clock properties''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PClockProperties = ^TClockProperties;</code> | ||
+ | |||
+ | <code>TClockProperties = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | Device flags (eg CLOCK_FLAG_WRITABLE) | ||
+ | |- | ||
+ | | <code>Rate:LongWord;</code> | ||
+ | | Device current clock rate (Hz) | ||
+ | |- | ||
+ | | <code>MinRate:LongWord;</code> | ||
+ | | Device minimum clock rate (Hz) | ||
+ | |- | ||
+ | | <code>MaxRate:LongWord;</code> | ||
+ | | Device maximum clock rate (Hz) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Clock enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockEnumerate = function(Clock:PClockDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceStart = function(Clock:PClockDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceStop = function(Clock:PClockDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device read''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceRead = function(Clock:PClockDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device read 64''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceRead64 = function(Clock:PClockDevice):Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device write 64''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceWrite64 = function(Clock:PClockDevice;const Value:Int64):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device get rate''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceGetRate = function(Clock:PClockDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device set rate''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceSetRate = function(Clock:PClockDevice;Rate:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device properties''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TClockDeviceProperties = function(Clock:PClockDevice;Properties:PClockProperties):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Clock device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PClockDevice = ^TClockDevice;</code> | ||
+ | |||
+ | <code>TClockDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this Clock device | ||
+ | |- | ||
+ | |colspan="2"|''Clock Properties'' | ||
+ | |- | ||
+ | | <code>ClockId:LongWord;</code> | ||
+ | | Unique Id of this Clock device in the Clock device table | ||
+ | |- | ||
+ | | <code>ClockState:LongWord;</code> | ||
+ | | Clock device state (eg CLOCK_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TClockDeviceStart;</code> | ||
+ | | A device specific DeviceStart method implementing a standard clock device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceStop:TClockDeviceStop;</code> | ||
+ | | A device specific DeviceStop method implementing a standard clock device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceRead:TClockDeviceRead;</code> | ||
+ | | A device specific DeviceRead method implementing a standard clock device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceRead64:TClockDeviceRead64;</code> | ||
+ | | A device specific DeviceRead64 method implementing a standard clock device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceWrite64:TClockDeviceWrite64;</code> | ||
+ | | A device specific DeviceWrite64 method implementing a standard clock device interface (Optional) | ||
+ | |- | ||
+ | | <code>DeviceGetRate:TClockDeviceGetRate;</code> | ||
+ | | A device specific DeviceGetRate method implementing a standard clock device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetRate:TClockDeviceSetRate;</code> | ||
+ | | A device specific DeviceSetRate method implementing a standard clock device interface (Optional) | ||
+ | |- | ||
+ | | <code>DeviceProperties:TClockDeviceProperties;</code> | ||
+ | | A device specific DeviceProperties method implementing a standard clock device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>ReadCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | | <code>Rate:LongWord;</code> | ||
+ | | Device rate (Hz) | ||
+ | |- | ||
+ | | <code>MinRate:LongWord;</code> | ||
+ | | Device minimum rate (Hz) | ||
+ | |- | ||
+ | | <code>MaxRate:LongWord;</code> | ||
+ | | Device maximum rate (Hz) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PClockDevice;</code> | ||
+ | | Previous entry in Clock device table | ||
+ | |- | ||
+ | | <code>Next:PClockDevice;</code> | ||
+ | | Next entry in Clock device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Timer specific types''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerCallback = TCounterCallback;</code> | ||
+ | | style="width: 40%;"|Counter callback from Platform | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer properties''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PTimerProperties = ^TTimerProperties;</code> | ||
+ | |||
+ | <code>TTimerProperties = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | Device flags (eg TIMER_FLAG_WRAPPING) | ||
+ | |- | ||
+ | | <code>Bits:LongWord;</code> | ||
+ | | Number of valid bits in timer read (eg 32 or 64) | ||
+ | |- | ||
+ | | <code>MinRate:LongWord;</code> | ||
+ | | Device minimum clock rate (Hz) | ||
+ | |- | ||
+ | | <code>MaxRate:LongWord;</code> | ||
+ | | Device maximum clock rate (Hz) | ||
+ | |- | ||
+ | | <code>MinInterval:LongWord;</code> | ||
+ | | Device minimum interval (Ticks) | ||
+ | |- | ||
+ | | <code>MaxInterval:LongWord;</code> | ||
+ | | Device maximum interval (Ticks) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Timer waiter''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PTimerWaiter = ^TTimerWaiter;</code> | ||
+ | |||
+ | <code>TTimerWaiter = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: TTimerEvent is used already by the Threads unit | ||
+ | |- | ||
+ | | <code>Timer:PTimerDevice;</code> | ||
+ | | Timer device this waiter belongs to | ||
+ | |- | ||
+ | | <code>Callback:TTimerCallback;</code> | ||
+ | | Callback function to call when event occurs | ||
+ | |- | ||
+ | | <code>Data:Pointer;</code> | ||
+ | | Pointer to pass to the callback function when event occurs | ||
+ | |- | ||
+ | | <code>Prev:PTimerWaiter;</code> | ||
+ | | Previous event in the list | ||
+ | |- | ||
+ | | <code>Next:PTimerWaiter;</code> | ||
+ | | Next event in the list | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Timer enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerEnumerate = function(Timer:PTimerDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''TImer device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceStart = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceStop = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device read''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceRead = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device read 64''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceRead64 = function(Timer:PTimerDevice):Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device wait''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceWait = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device event''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceEvent = function(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device cancel''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceCancel = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device get rate''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceGetRate = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device set rate''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceSetRate = function(Timer:PTimerDevice; Rate:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device get interval''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceGetInterval = function(Timer:PTimerDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device set interval''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceSetInterval = function(Timer:PTimerDevice; Interval:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device properties''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TTimerDeviceProperties = function(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Timer device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PTimerDevice = ^TTimerDevice;</code> | ||
+ | |||
+ | <code>TTimerDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: Forward declared for TimerWaiter | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this Timer device | ||
+ | |- | ||
+ | |colspan="2"|''Timer Properties'' | ||
+ | |- | ||
+ | | <code>TimerId:LongWord;</code> | ||
+ | | Unique Id of this Timer device in the Timer device table | ||
+ | |- | ||
+ | | <code>TimerState:LongWord;</code> | ||
+ | | Timer device state (eg TIMER_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TTimerDeviceStart;</code> | ||
+ | | A device specific DeviceStart method implementing a standard timer device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceStop:TTimerDeviceStop;</code> | ||
+ | | A device specific DeviceStop method implementing a standard timer device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceRead:TTimerDeviceRead;</code> | ||
+ | | A device specific DeviceRead method implementing a standard timer device interface (One of Read or Read64 is Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceRead64:TTimerDeviceRead64;</code> | ||
+ | | A device specific DeviceRead64 method implementing a standard timer device interface (One of Read or Read64 is Mandatory | ||
+ | |- | ||
+ | | <code>DeviceWait:TTimerDeviceWait;</code> | ||
+ | | A device specific DeviceWait method implementing a standard timer device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceEvent:TTimerDeviceEvent;</code> | ||
+ | | A device specific DeviceEvent method implementing a standard timer device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceCancel:TTimerDeviceCancel;</code> | ||
+ | | A device specific DeviceCancel method implementing a standard timer device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceGetRate:TTimerDeviceGetRate;</code> | ||
+ | | A device specific DeviceGetRate method implementing a standard timer device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetRate:TTimerDeviceSetRate;</code> | ||
+ | | A device specific DeviceSetRate method implementing a standard timer device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceGetInterval:TTimerDeviceGetInterval;</code> | ||
+ | | A device specific DeviceGetInterval method implementing a standard timer device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetInterval:TTimerDeviceSetInterval;</code> | ||
+ | | A device specific DeviceSetInterval method implementing a standard timer device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceProperties:TTimerDeviceProperties;</code> | ||
+ | | A device specific DeviceProperties method implementing a standard timer device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>ReadCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>WaitCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EventCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | | <code>Rate:LongWord;</code> | ||
+ | | Device rate (Hz) | ||
+ | |- | ||
+ | | <code>Interval:LongWord;</code> | ||
+ | | Device interval (Ticks) | ||
+ | |- | ||
+ | | <code>Properties:TTimerProperties;</code> | ||
+ | | Device properties | ||
+ | |- | ||
+ | |colspan="2"|''Event Properties'' | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | Event flags for this timer (eg TIMER_EVENT_FLAG_REPEAT) | ||
+ | |- | ||
+ | | <code>Count:Longword;</code> | ||
+ | | Count of threads and events waiting for this timer | ||
+ | |- | ||
+ | | <code>Event:TEventHandle;</code> | ||
+ | | Event for threads waiting for this timer | ||
+ | |- | ||
+ | | <code>Waiters:PTimerWaiter;</code> | ||
+ | | List of events waiting for this timer | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PTimerDevice;</code> | ||
+ | | Previous entry in Timer device table | ||
+ | |- | ||
+ | | <code>Next:PTimerDevice;</code> | ||
+ | | Next entry in Timer device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Random enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomEnumerate = function(Random:PRandomDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceStart = function(Random:PRandomDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceStop = function(Random:PRandomDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device seed''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceSeed = function(Random:PRandomDevice; Seed:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device read byte''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceReadByte = function(Random:PRandomDevice):Byte;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device read word''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceReadWord = function(Random:PRandomDevice):Word;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device read long word''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceReadLongWord = function(Random:PRandomDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device read quad word''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceReadQuadWord = function(Random:PRandomDevice):Int64;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device read extended''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TRandomDeviceReadExtended = function(Random:PRandomDevice):Extended;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Random device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PRandomDevice = ^TRandomDevice;</code> | ||
+ | |||
+ | <code>TRandomDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this Random device | ||
+ | |- | ||
+ | |colspan="2"|''Random Properties'' | ||
+ | |- | ||
+ | | <code>RandomId:LongWord;</code> | ||
+ | | Unique Id of this Random device in the Random device table | ||
+ | |- | ||
+ | | <code>RandomState:LongWord;</code> | ||
+ | | Random device state (eg RANDOM_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TRandomDeviceStart;</code> | ||
+ | | A device specific DeviceStart method implementing a standard random device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceStop:TRandomDeviceStop;</code> | ||
+ | | A device specific DeviceStop method implementing a standard random device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSeed:TRandomDeviceSeed;</code> | ||
+ | | A device specific DeviceSeed method implementing a standard random device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceReadByte:TRandomDeviceReadByte;</code> | ||
+ | | A device specific DeviceReadByte method implementing a standard random device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceReadWord:TRandomDeviceReadWord;</code> | ||
+ | | A device specific DeviceReadWord method implementing a standard random device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceReadLongWord:TRandomDeviceReadLongWord;</code> | ||
+ | | A device specific DeviceReadLongWord method implementing a standard random device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceReadQuadWord:TRandomDeviceReadQuadWord;</code> | ||
+ | | A device specific DeviceReadQuadWord method implementing a standard random device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceReadExtended:TRandomDeviceReadExtended;</code> | ||
+ | | A device specific DeviceReadExtended method implementing a standard random device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>SeedCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ReadCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PRandomDevice;</code> | ||
+ | | Previous entry in Random device table | ||
+ | |- | ||
+ | | <code>Next:PRandomDevice;</code> | ||
+ | | Next entry in Random device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Mailbox enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxEnumerate = function(Mailbox:PMailboxDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceStart = function(Mailbox:PMailboxDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceStop = function(Mailbox:PMailboxDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device receive''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceReceive = function(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device send''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceSend = function(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device call''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceCall = function(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device get timeout''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceGetTimeout = function(Mailbox:PMailboxDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device set timeout''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMailboxDeviceSetTimeout = function(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Mailbox device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PMailboxDevice = ^TMailboxDevice;</code> | ||
+ | |||
+ | <code>TMailboxDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this Mailbox device | ||
+ | |- | ||
+ | |colspan="2"|''Mailbox Properties'' | ||
+ | |- | ||
+ | | <code>MailboxId:LongWord;</code> | ||
+ | | Unique Id of this Mailbox device in the Mailbox device table | ||
+ | |- | ||
+ | | <code>MailboxState:LongWord;</code> | ||
+ | | Mailbox device state (eg MAILBOX_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TMailboxDeviceStart;</code> | ||
+ | | A device specific DeviceStart method implementing a standard mailbox device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceStop:TMailboxDeviceStop;</code> | ||
+ | | A device specific DeviceStop method implementing a standard mailbox device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceReceive:TMailboxDeviceReceive;</code> | ||
+ | | A device specific DeviceReceive method implementing a standard mailbox device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceSend:TMailboxDeviceSend;</code> | ||
+ | | A device specific DeviceSend method implementing a standard mailbox device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceCall:TMailboxDeviceCall;</code> | ||
+ | | A device specific DeviceCall method implementing a standard mailbox device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceGetTimeout:TMailboxDeviceGetTimeout;</code> | ||
+ | | A device specific DeviceGetTimeout method implementing a standard mailbox device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetTimeout:TMailboxDeviceSetTimeout;</code> | ||
+ | | A device specific DeviceSetTimeout method implementing a standard mailbox device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>ReceiveCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SendCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CallCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | | <code>Timeout:LongWord;</code> | ||
+ | | Device timeout (Milliseconds) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PMailboxDevice;</code> | ||
+ | | Previous entry in Mailbox device table | ||
+ | |- | ||
+ | | <code>Next:PMailboxDevice;</code> | ||
+ | | Next entry in Mailbox device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Watchdog enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogEnumerate = function(Watchdog:PWatchdogDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogDeviceStart = function(Watchdog:PWatchdogDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogDeviceStop = function(Watchdog:PWatchdogDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device refresh''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogDeviceRefresh = function(Watchdog:PWatchdogDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device get remain''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogDeviceGetRemain = function(Watchdog:PWatchdogDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device get timeout''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogDeviceGetTimeout = function(Watchdog:PWatchdogDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device set timeout''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TWatchdogDeviceSetTimeout = function(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Watchdog device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PWatchdogDevice = ^TWatchdogDevice;</code> | ||
+ | |||
+ | <code>TWatchdogDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this Watchdog device | ||
+ | |- | ||
+ | |colspan="2"|''Watchdog Properties'' | ||
+ | |- | ||
+ | | <code>WatchdogId:LongWord;</code> | ||
+ | | Unique Id of this Watchdog device in the Watchdog device table | ||
+ | |- | ||
+ | | <code>WatchdogState:LongWord;</code> | ||
+ | | Watchdog device state (eg WATCHDOG_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TWatchdogDeviceStart;</code> | ||
+ | | A device specific DeviceStart method implementing a standard watchdog device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceStop:TWatchdogDeviceStop;</code> | ||
+ | | A device specific DeviceStop method implementing a standard watchdog device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceRefresh:TWatchdogDeviceRefresh;</code> | ||
+ | | A device specific DeviceRefresh method implementing a standard watchdog device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceGetRemain:TWatchdogDeviceGetRemain;</code> | ||
+ | | A device specific DeviceGetRemain method implementing a standard watchdog device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceGetTimeout:TWatchdogDeviceGetTimeout;</code> | ||
+ | | A device specific DeviceGetTimeout method implementing a standard watchdog device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetTimeout:TWatchdogDeviceSetTimeout;</code> | ||
+ | | A device specific DeviceSetTimeout method implementing a standard watchdog device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>StartCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>StopCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RefreshCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | | <code>Timeout:LongWord;</code> | ||
+ | | Device timeout (Milliseconds) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PWatchdogDevice;</code> | ||
+ | | Previous entry in Watchdog device table | ||
+ | |- | ||
+ | | <code>Next:PWatchdogDevice;</code> | ||
+ | | Next entry in Watchdog device table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Revision as of 23:05, 17 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo Device interface unit
To be documented
Constants
DEVICE_*
DEVICE_SIGNATURE_*
DEVICE_BUS_*
DEVICE_STATE_*
DEVICE_ID_*
DEVICE_CLASS_*
DEVICE_NOTIFICATION_*
NOTIFIER_SIGNATURE_*
NOTIFIER_STATE_*
NOTIFIER_FLAG_*
DEVICE_LOG_*
DRIVER_*
DRIVER_SIGNATURE_*
DRIVER_STATE_*
DRIVER_ID_*
DRIVER_CLASS_*
HOST_*
HOST_SIGNATURE_*
HOST_STATE_*
HOST_ID_*
HOST_CLASS_*
CLOCK_*
CLOCK_TYPE_*
CLOCK_STATE_*
CLOCK_FLAG_*
TIMER_*
TIMER_TYPE_*
TIMER_STATE_*
TIMER_FLAG_*
TIMER_EVENT_FLAG_*
RANDOM_*
RANDOM_TYPE_*
RANDOM_STATE_*
RANDOM_FLAG_*
MAILBOX_*
MAILBOX_TYPE_*
MAILBOX_STATE_*
MAILBOX_FLAG_*
WATCHDOG_*
WATCHDOG_TYPE_*
WATCHDOG_STATE_*
WATCHDOG_FLAG_*
Type definitions
Device enumeration callback
TDeviceEnumerate = function(Device:PDevice; Data:Pointer):LongWord;
|
Device notification callback
TDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Device entry
Notifier entry
Notifier task
Driver enumeration callback
TDriverEnumerate = function(Driver:PDriver; Data:Pointer):LongWord;
|
Driver entry
Host enumeration callback
THostEnumerate = function(Host:PHost; Data:Pointer):LongWord;
|
Host entry
Clock properties
Clock enumeration callback
TClockEnumerate = function(Clock:PClockDevice; Data:Pointer):LongWord;
|
Clock notification callback
TClockNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Clock device start
TClockDeviceStart = function(Clock:PClockDevice):LongWord;
|
Clock device stop
TClockDeviceStop = function(Clock:PClockDevice):LongWord;
|
Clock device read
TClockDeviceRead = function(Clock:PClockDevice):LongWord;
|
Clock device read 64
TClockDeviceRead64 = function(Clock:PClockDevice):Int64;
|
Clock device write 64
TClockDeviceWrite64 = function(Clock:PClockDevice;const Value:Int64):LongWord;
|
Clock device get rate
TClockDeviceGetRate = function(Clock:PClockDevice):LongWord;
|
Clock device set rate
TClockDeviceSetRate = function(Clock:PClockDevice;Rate:LongWord):LongWord;
|
Clock device properties
TClockDeviceProperties = function(Clock:PClockDevice;Properties:PClockProperties):LongWord;
|
Clock device types
Timer specific types
TTimerCallback = TCounterCallback;
|
Counter callback from Platform |
Timer properties
Timer waiter
Timer enumeration callback
TTimerEnumerate = function(Timer:PTimerDevice; Data:Pointer):LongWord;
|
Timer notification callback
TTimerNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
TImer device start
TTimerDeviceStart = function(Timer:PTimerDevice):LongWord;
|
Timer device stop
TTimerDeviceStop = function(Timer:PTimerDevice):LongWord;
|
Timer device read
TTimerDeviceRead = function(Timer:PTimerDevice):LongWord;
|
Timer device read 64
TTimerDeviceRead64 = function(Timer:PTimerDevice):Int64;
|
Timer device wait
TTimerDeviceWait = function(Timer:PTimerDevice):LongWord;
|
Timer device event
TTimerDeviceEvent = function(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
|
Timer device cancel
TTimerDeviceCancel = function(Timer:PTimerDevice):LongWord;
|
Timer device get rate
TTimerDeviceGetRate = function(Timer:PTimerDevice):LongWord;
|
Timer device set rate
TTimerDeviceSetRate = function(Timer:PTimerDevice; Rate:LongWord):LongWord;
|
Timer device get interval
TTimerDeviceGetInterval = function(Timer:PTimerDevice):LongWord;
|
Timer device set interval
TTimerDeviceSetInterval = function(Timer:PTimerDevice; Interval:LongWord):LongWord;
|
Timer device properties
TTimerDeviceProperties = function(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
|
Timer device types
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 extended
TRandomDeviceReadExtended = function(Random:PRandomDevice):Extended;
|
Random device types
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 types
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 types
Public variables
Device logging
DEVICE_DEFAULT_LOG_LEVEL:LongWord = DEVICE_LOG_LEVEL_DEBUG;
|
Minimum level for Device messages. Only messages with level greater than or equal to this will be printed. |
DEVICE_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
procedure DevicesInit;
Device functions
function DeviceDestroy(Device:PDevice):LongWord;
function DeviceGetName(Device:PDevice):String;
function DeviceSetName(Device:PDevice; const Name:String):LongWord;
function DeviceGetDescription(Device:PDevice):String;
function DeviceSetDescription(Device:PDevice; const Description:String):LongWord;
function DeviceRegister(Device:PDevice):LongWord;
function DeviceDeregister(Device:PDevice):LongWord;
function DeviceFind(DeviceClass,DeviceId:LongWord):PDevice;
function DeviceFindByName(const Name:String):PDevice;
function DeviceFindByDescription(const Description:String):PDevice;
function DeviceEnumerate(DeviceClass:LongWord; Callback:TDeviceEnumerate; Data:Pointer):LongWord;
function DeviceNotification(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
function NotifierAllocate(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer; Notification,Flags:LongWord):PNotifier;
function NotifierRelease(Notifier:PNotifier):LongWord;
function NotifierFind(Device:PDevice; DeviceClass:LongWord; Callback:TDeviceNotification; Data:Pointer):PNotifier;
function NotifierNotify(Device:PDevice; Notification:LongWord):LongWord;
Driver functions
function DriverDestroy(Driver:PDriver):LongWord;
function DriverGetName(Driver:PDriver):String;
function DriverSetName(Driver:PDriver; const Name:String):LongWord;
function DriverRegister(Driver:PDriver):LongWord;
function DriverDeregister(Driver:PDriver):LongWord;
function DriverFind(DriverClass,DriverId:LongWord):PDriver;
function DriverFindByName(const Name:String):PDriver;
function DriverEnumerate(DriverClass:LongWord; Callback:TDriverEnumerate; Data:Pointer):LongWord;
Clock device functions
function ClockDeviceStart(Clock:PClockDevice):LongWord;
function ClockDeviceStop(Clock:PClockDevice):LongWord;
function ClockDeviceRead(Clock:PClockDevice):LongWord;
function ClockDeviceRead64(Clock:PClockDevice):Int64;
function ClockDeviceWrite64(Clock:PClockDevice; const Value:Int64):LongWord;
function ClockDeviceGetRate(Clock:PClockDevice):LongWord;
function ClockDeviceSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;
function ClockDeviceProperties(Clock:PClockDevice; Properties:PClockProperties):LongWord;
function ClockDeviceCreateEx(Size:LongWord):PClockDevice;
function ClockDeviceDestroy(Clock:PClockDevice):LongWord;
function ClockDeviceRegister(Clock:PClockDevice):LongWord;
function ClockDeviceDeregister(Clock:PClockDevice):LongWord;
function ClockDeviceFind(ClockId:LongWord):PClockDevice;
function ClockDeviceFindByName(const Name:String):PClockDevice; inline;
function ClockDeviceFindByDescription(const Description:String):PClockDevice; inline;
function ClockDeviceEnumerate(Callback:TClockEnumerate; Data:Pointer):LongWord;
function ClockDeviceNotification(Clock:PClockDevice; Callback:TClockNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Timer device functions
function TimerDeviceStart(Timer:PTimerDevice):LongWord;
function TimerDeviceStop(Timer:PTimerDevice):LongWord;
function TimerDeviceRead(Timer:PTimerDevice):LongWord;
function TimerDeviceRead64(Timer:PTimerDevice):Int64;
function TimerDeviceWait(Timer:PTimerDevice):LongWord;
function TimerDeviceEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
function TimerDeviceCancel(Timer:PTimerDevice):LongWord;
function TimerDeviceGetRate(Timer:PTimerDevice):LongWord;
function TimerDeviceSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;
function TimerDeviceGetInterval(Timer:PTimerDevice):LongWord;
function TimerDeviceSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;
function TimerDeviceProperties(Timer:PTimerDevice; Properties:PTimerProperties):LongWord;
function TimerDeviceCreateEx(Size:LongWord):PTimerDevice;
function TimerDeviceDestroy(Timer:PTimerDevice):LongWord;
function TimerDeviceRegister(Timer:PTimerDevice):LongWord;
function TimerDeviceDeregister(Timer:PTimerDevice):LongWord;
function TimerDeviceFind(TimerId:LongWord):PTimerDevice;
function TimerDeviceFindByName(const Name:String):PTimerDevice; inline;
function TimerDeviceFindByDescription(const Description:String):PTimerDevice; inline;
function TimerDeviceEnumerate(Callback:TTimerEnumerate; Data:Pointer):LongWord;
function TimerDeviceNotification(Timer:PTimerDevice; Callback:TTimerNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Random device functions
function RandomDeviceSeed(Random:PRandomDevice; Seed:LongWord):LongWord;
function RandomDeviceReadLongWord(Random:PRandomDevice):LongWord;
function RandomDeviceReadQuadWord(Random:PRandomDevice):Int64;
function RandomDeviceReadExtended(Random:PRandomDevice):Extended;
function RandomDeviceCreateEx(Size:LongWord):PRandomDevice;
function RandomDeviceDestroy(Random:PRandomDevice):LongWord;
function RandomDeviceRegister(Random:PRandomDevice):LongWord;
function RandomDeviceDeregister(Random:PRandomDevice):LongWord;
function RandomDeviceFindByName(const Name:String):PRandomDevice; inline;
function RandomDeviceFindByDescription(const Description:String):PRandomDevice; inline;
function RandomDeviceEnumerate(Callback:TRandomEnumerate; Data:Pointer):LongWord;
function RandomDeviceNotification(Random:PRandomDevice; Callback:TRandomNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Mailbox device functions
function MailboxDeviceStart(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceReceive(Mailbox:PMailboxDevice; Channel:LongWord):LongWord;
function MailboxDeviceSend(Mailbox:PMailboxDevice; Channel,Data:LongWord):LongWord;
function MailboxDeviceCall(Mailbox:PMailboxDevice; Channel,Data:LongWord; var Response:LongWord):LongWord;
function MailboxDeviceGetTimeout(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceSetTimeout(Mailbox:PMailboxDevice; Timeout:LongWord):LongWord;
function MailboxDeviceCreateEx(Size:LongWord):PMailboxDevice;
function MailboxDeviceDestroy(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceRegister(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceDeregister(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceFind(MailboxId:LongWord):PMailboxDevice;
function MailboxDeviceFindByName(const Name:String):PMailboxDevice; inline;
function MailboxDeviceFindByDescription(const Description:String):PMailboxDevice; inline;
function MailboxDeviceEnumerate(Callback:TMailboxEnumerate; Data:Pointer):LongWord;
function MailboxDeviceNotification(Mailbox:PMailboxDevice; Callback:TMailboxNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Watchdog device functions
function WatchdogDeviceStart(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceStop(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceRefresh(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceGetRemain(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceGetTimeout(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceSetTimeout(Watchdog:PWatchdogDevice; Timeout:LongWord):LongWord;
function WatchdogDeviceCreateEx(Size:LongWord):PWatchdogDevice;
function WatchdogDeviceDestroy(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceRegister(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceDeregister(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceFind(WatchdogId:LongWord):PWatchdogDevice;
function WatchdogDeviceFindByName(const Name:String):PWatchdogDevice; inline;
function WatchdogDeviceFindByDescription(const Description:String):PWatchdogDevice; inline;
function WatchdogDeviceEnumerate(Callback:TWatchdogEnumerate; Data:Pointer):LongWord;
function WatchdogDeviceNotification(Watchdog:PWatchdogDevice; Callback:TWatchdogNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
RTL clock functions
RTL timer (counter) functions
function SysTimerWait:LongWord;
function SysTimerEvent(Callback:TTimerCallback; Data:Pointer):LongWord;
function SysTimerCancel:LongWord;
function SysTimerGetRate:LongWord;
function SysTimerSetRate(Rate:LongWord):LongWord;
function SysTimerGetInterval:LongWord;
function SysTimerSetInterval(Interval:LongWord):LongWord;
RTL random functions
function SysRandomAvailable:Boolean;
RTL watchdog functions
function SysWatchdogAvailable:Boolean;
Device helper functions
function DeviceCheck(Device:PDevice):PDevice;
function NotifierCheck(Notifier:PNotifier):PNotifier;
procedure DeviceLog(Level:LongWord; Device:PDevice; const AText:String);
procedure DeviceLogError(Device:PDevice; const AText:String);
procedure DeviceLogDebug(Device:PDevice; const AText:String);
Driver helper functions
function DriverCheck(Driver:PDriver):PDriver;
Clock device helper functions
function ClockDeviceGetCount:LongWord; inline;
function ClockDeviceGetDefault:PClockDevice; inline;
function ClockDeviceSetDefault(Clock:PClockDevice):LongWord;
function ClockDeviceCheck(Clock:PClockDevice):PClockDevice;
Timer device helper functions
function TimerDeviceGetCount:LongWord; inline;
function TimerDeviceGetDefault:PTimerDevice; inline;
function TimerDeviceSetDefault(Timer:PTimerDevice):LongWord;
function TimerDeviceCheck(Timer:PTimerDevice):PTimerDevice;
function TimerDeviceCreateWaiter(Timer:PTimerDevice; Callback:TTimerCallback; Data:Pointer):PTimerWaiter;
function TimerDeviceDestroyWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
function TimerDeviceRegisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
function TimerDeviceDeregisterWaiter(Timer:PTimerDevice; Waiter:PTimerWaiter):LongWord;
Random device helper functions
function RandomDeviceGetCount:LongWord; inline;
function RandomDeviceGetDefault:PRandomDevice; inline;
function RandomDeviceSetDefault(Random:PRandomDevice):LongWord;
function RandomDeviceCheck(Random:PRandomDevice):PRandomDevice;
Mailbox device helper functions
function MailboxDeviceGetCount:LongWord; inline;
function MailboxDeviceGetDefault:PMailboxDevice; inline;
function MailboxDeviceSetDefault(Mailbox:PMailboxDevice):LongWord;
function MailboxDeviceCheck(Mailbox:PMailboxDevice):PMailboxDevice;
Watchdog device helper functions
function WatchdogDeviceGetCount:LongWord; inline;
function WatchdogDeviceGetDefault:PWatchdogDevice; inline;
function WatchdogDeviceSetDefault(Watchdog:PWatchdogDevice):LongWord;
function WatchdogDeviceCheck(Watchdog:PWatchdogDevice):PWatchdogDevice;
Return to Unit Reference