Unit Platform

From Ultibo.org
Jump to: navigation, search

Return to Unit Reference


Description


Ultibo Platform Interface unit

Constants



[Expand]
Handle flag HANDLE_FLAG_*


[Expand]
Handle constants HANDLE_*


[Expand]
DMA data flag DMA_DATA_FLAG_*


[Expand]
Page table flag PAGE_TABLE_FLAG_*


[Expand]
Interrupt entry flag INTERRUPT_FLAG_*


[Expand]
Interrupt priority value INTERRUPT_PRIORITY_*


[Expand]
Interrupt return value INTERRUPT_RETURN_*


[Expand]
Vector table entry VECTOR_TABLE_ENTRY_*


[Expand]
Shutdown flag SHUTDOWN_FLAG_*


[Expand]
Shutdown constant SHUTDOWN_*


[Expand]
Exception type EXCEPTION_TYPE_*


[Expand]
Firmware throttling flag FIRMWARE_THROTTLE_*


[Expand]
Platform logging PLATFORM_LOG_LEVEL_*


[Expand]
IRQ logging IRQ_LOG_LEVEL_*


[Expand]
FIQ logging FIQ_LOG_LEVEL_*


[Expand]
SWI logging SWI_LOG_LEVEL_*


Type definitions



IRQ mask

TIRQMask = LongWord;

FIQ mask

TFIQMask = LongWord;

IRQ/FIQ mask

TIRQFIQMask = LongWord;

Abort mask

TAbortMask = LongWord;

DMA data

[Expand]

PDMAData = ^TDMAData;

TDMAData = record

System call request (SWI)

[Expand]

PSystemCallRequest = ^TSystemCallRequest;

TSystemCallRequest = record

Handle close

THandleClose = procedure(Data:THandle);

Handle close extended

THandleCloseEx = function(Data:THandle):LongWord;

Handle duplicate

THandleDuplicate = function(Data:THandle):THandle;

Handle enumeration callback

THandleEnumerate = function(Handle:PHandleEntry; Data:Pointer):LongWord;

Handle entry

[Expand]

PHandleEntry = ^THandleEntry;

THandleEntry = record

Handle entries

[Expand]

PHandleEntries = ^THandleEntries;

THandleEntries = array[0..HANDLE_TABLE_MASK + 1] of PHandleEntry;

Handle table

[Expand]

PHandleTable = ^THandleTable;

THandleTable = record

Shutdown callback

TShutdownCallback = function(Flags:LongWord; Parameter:Pointer):LongWord;

Shutdown entry

[Expand]

PShutdownEntry = ^TShutdownEntry;

TShutdownEntry = record

Shutdown data

[Expand]

PShutdownData = ^TShutdownData;

TShutdownData = record

Interrupt entry (IRQ/FIQ)

[Expand]

PInterruptEntry = ^TInterruptEntry;

TInterruptEntry = record

System call entry (SWI)

[Expand]

PSystemCallEntry = ^TSystemCallEntry;

TSystemCallEntry = record

Page table entry

[Expand]

PPageTableEntry = ^TPageTableEntry;

TPageTableEntry = record

Platform lock

[Expand]

PPlatformLock = ^TPlatformLock;

TPlatformLock = record

Platform semaphore

[Expand]

PPlatformSemaphore = ^TPlatformSemaphore;

TPlatformSemaphore = record

CPU initialization

TCPUInit = procedure;

FPU initialization

TFPUInit = procedure;

GPU initialization

TGPUInit = procedure;

MMU initialization

TMMUInit = procedure;

SMP initialization

TSMPInit = procedure;

Cache initialization

TCacheInit = procedure;

Board initialization

TBoardInit = procedure;

Memory initialization

TMemoryInit = procedure;

Clock initialization

TClockInit = procedure;

Power initialization

TPowerInit = procedure;

Mailbox initialization

TMailboxInit = procedure;

Interrupt initialization

TInterruptInit = procedure;

Peripheral initialization

TPeripheralInit = procedure;

Framebuffer initialization

TFramebufferInit = procedure;

Parse boot tags

TParseBootTags = procedure;

Parse command line

TParseCommandLine = procedure;

Parse environment

TParseEnvironment = procedure;

Options initialization

TOptionsInit = procedure;

Device tree valid

TDeviceTreeValid = function:Boolean;

Device tree get base

TDeviceTreeGetBase = function:PtrUInt;

Device tree get size

TDeviceTreeGetSize = function:LongWord;

Device tree read

TDeviceTreeRead = function(const Path,Name:String; Buffer:Pointer; var Size:LongWord):LongWord;

Device tree read 32

TDeviceTreeRead32 = function(const Path,Name:String; var Value:LongWord):LongWord;

Device tree read 64

TDeviceTreeRead64 = function(const Path,Name:String; var Value:UInt64):LongWord;

Device tree read string

TDeviceTreeReadString = function(const Path,Name:String; var Value:String):LongWord;

Inter Processor Interrupt (IPI) handler

TIPIHandler = TSharedInterruptHandler; Note: When used for IPI the CPUID parameter will be the sending CPU

System call (SWI) handler

TSystemCallHandler = procedure(Request:PSystemCallRequest);

System call (SWI) ex handler

TSystemCallExHandler = function(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle;

Thread yield

TThreadYield = function:LongWord;

Thread wait

TThreadWait = function(List:TListHandle; Lock:TSpinHandle; Flags:LongWord):LongWord;

Thread wait ex

TThreadWaitEx = function(List:TListHandle; Lock:TSpinHandle; Flags,Timeout:LongWord):LongWord;

Thread release

TThreadRelease = function(List:TListHandle):LongWord;

Thread abandon

TThreadAbandon = function(List:TListHandle):LongWord;

Thread wake

TThreadWake = function(Thread:TThreadHandle):LongWord;

Thread ready

TThreadReady = function(Thread:TThreadHandle; Reschedule:Boolean):LongWord;

Thread timeout

TThreadTimeout = function(Thread:TThreadHandle):LongWord;

Timer event

TTimerEvent = procedure(Data:Pointer);

Worker task

TWorkerTask = procedure(Data:Pointer);

Worker callback

TWorkerCallback = procedure(Data:Pointer);

Counter callback

TCounterCallback = procedure(Data:Pointer);

GPIO callback

TGPIOCallback = procedure(Data:Pointer; Pin,Trigger:LongWord);

Boot blink

TBootBlink = procedure;

Boot output

TBootOutput = procedure(Value:LongWord);

Boot console start

TBootConsoleStart = procedure;

Boot console write

TBootConsoleWrite = procedure(const Value:String);

Boot console write ex

TBootConsoleWriteEx = procedure(const Value:String; X,Y:LongWord);

Boot console get x

TBootConsoleGetX = function:LongWord;

Boot console get y

TBootConsoleGetY = function:LongWord;

Power LED enable

TPowerLEDEnable = procedure;

Power LED on

TPowerLEDOn = procedure;

Power LED off

TPowerLEDOff = procedure;

Activity LED enable

TActivityLEDEnable = procedure;

Activity LED on

TActivityLEDOn = procedure;

Activity LED off

TActivityLEDOff = procedure;

Counter available

TCounterAvailable = function:Boolean;

Counter read

TCounterRead = function:LongWord;

Counter read64

TCounterRead64 = function:Int64;

Counter wait

TCounterWait = function:LongWord;

Counter event

TCounterEvent = function(Callback:TCounterCallback; Data:Pointer):LongWord;

Counter cancel

TCounterCancel = function:LongWord;

Counter get rate

TCounterGetRate = function:LongWord;

Counter set rate

TCounterSetRate = function(Rate:LongWord):LongWord;

Counter get interval

TCounterGetInterval = function:LongWord;

Counter set interval

TCounterSetInterval = function(Interval:LongWord):LongWord;

Mailbox receive

TMailboxReceive = function(Mailbox,Channel:LongWord):LongWord;

Mailbox send

TMailboxSend = procedure(Mailbox,Channel,Data:LongWord);

Mailbox call

TMailboxCall = function(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord;

Mailbox call ex

TMailboxCallEx = function(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord;

Mailbox property call

TMailboxPropertyCall = function(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord;

Mailbox property call ex

TMailboxPropertyCallEx = function(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord;

Mailbox property tag

TMailboxPropertyTag = function(Tag:LongWord; Data:Pointer; Size:LongWord):LongWord;

Random available

TRandomAvailable = function:Boolean;

Random seed

TRandomSeed = procedure(Seed:LongWord);

Random read long int

TRandomReadLongInt = function(Limit:LongInt):LongInt;

Random read int64

TRandomReadInt64 = function(Limit:Int64):Int64;

Random read double

TRandomReadDouble = function:Double;

Watchdog available

TWatchdogAvailable = function:Boolean;

Watchdog start

TWatchdogStart = function(Milliseconds:LongWord):LongWord;

Watchdog stop

TWatchdogStop = function:LongWord;

Watchdog refresh

TWatchdogRefresh = function(Milliseconds:LongWord):LongWord;

Request IRQ

TRequestIRQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord;

Release IRQ

TReleaseIRQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord;

Request ex IRQ

TRequestExIRQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;

Release ex IRQ

TReleaseExIRQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;

Request FIQ

TRequestFIQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord;

Release FIQ

TReleaseFIQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; arameter:Pointer):LongWord;

Request ex FIQ

TRequestExFIQ = function(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;

Request IPI

TRequestIPI = function(CPUID,Number:LongWord; Handler:TIPIHandler; Parameter:Pointer):LongWord;

Release IPI

TReleaseIPI = function(CPUID,Number:LongWord; Handler:TIPIHandler; Parameter:Pointer):LongWord;

Register interrupt handler

TRegisterInterrupt = function(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;

Deregister interrupt handler

TDeregisterInterrupt = function(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;

System call

TSystemCall = procedure(Number:LongWord; Param1,Param2,Param3:PtrUInt);

Register system call

TRegisterSystemCall = function(Number:LongWord; Handler:TSystemCallHandler):LongWord;

Deregister system call

TDeregisterSystemCall = function(Number:LongWord; Handler:TSystemCallHandler):LongWord;

Register system call ex

TRegisterSystemCallEx = function(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;

Deregister system call ex

TDeregisterSystemCallEx = function(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;

Get interrupt count

TGetInterruptCount = function:LongWord;

Get interrupt start

TGetInterruptStart = function:LongWord;

Get interrupt entry

TGetInterruptEntry = function(Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;

Get local interrupt count

TGetLocalInterruptCount = function:LongWord;

Get local interrupt start

TGetLocalInterruptStart = function:LongWord;

Get local interrupt entry

TGetLocalInterruptEntry = function(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;

Get software interrupt count

TGetSoftwareInterruptCount = function:LongWord;

Get software interrupt start

TGetSoftwareInterruptStart = function:LongWord;

Get software interrupt entry

TGetSoftwareInterruptEntry = function(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;

Get system call count

TGetSystemCallCount = function:LongWord;

Get system call entry

TGetSystemCallEntry = function(Number:LongWord):TSystemCallEntry;

System restart

TSystemRestart = function(Delay:LongWord):LongWord;

System shutdown

TSystemShutdown = function(Delay:LongWord):LongWord;

System get uptime

TSystemGetUptime = function:Int64;

System get command line

TSystemGetCommandLine = function:String;

System get environment

TSystemGetEnvironment = function:Pointer;

CPU get arch

TCPUGetArch = function:LongWord;

CPU get type

TCPUGetType = function:LongWord;

CPU get boot

TCPUGetBoot = function:LongWord;

CPU get mask

TCPUGetMask = function:LongWord;

CPU get count

TCPUGetCount = function:LongWord;

CPU get mode

TCPUGetMode = function:LongWord;

CPU get state

TCPUGetState = function:LongWord;

CPU get group

TCPUGetGroup = function:LongWord;

CPU get current

TCPUGetCurrent = function:LongWord;

CPU get memory

TCPUGetMemory = function(var Address:PtrUInt; var Length:UInt64):LongWord;

CPU get percentage

TCPUGetPercentage = function(CPUID:LongWord):Double;

CPU get utilization

TCPUGetUtilization = function(CPUID:LongWord):LongWord;

CPU get model

TCPUGetModel = function:LongWord;

CPU get revision

TCPUGetRevision = function:LongWord;

CPU get description

TCPUGetDescription = function:String;

FPU get type

TFPUGetType = function:LongWord;

FPU get state

TFPUGetState = function:LongWord;

GPU get type

TGPUGetType = function:LongWord;

GPU get state

TGPUGetState = function:LongWord;

GPU get memory

TGPUGetMemory = function(var Address:PtrUInt; var Length:UInt64):LongWord;

L1 cache get type

TL1CacheGetType = function:LongWord;

L1 data cache get size

TL1DataCacheGetSize = function:LongWord;

L1 data cache get line size

TL1DataCacheGetLineSize = function:LongWord;

L1 instruction cache get size

TL1InstructionCacheGetSize = function:LongWord;

L1 instruction cache get line size

TL1InstructionCacheGetLineSize = function:LongWord;

L2 cache get type

TL2CacheGetType = function:LongWord;

L2 cache get size

TL2CacheGetSize = function:LongWord;

L2 cache get line size

TL2CacheGetLineSize = function:LongWord;

Board get type

TBoardGetType = function:LongWord;

Board get model

TBoardGetModel = function:LongWord;

Board get serial

TBoardGetSerial = function:Int64;

Board get revision

TBoardGetRevision = function:LongWord;

Board get MAC address

TBoardGetMACAddress = function:String;

Chip get revision

TChipGetRevision = function:LongWord;

Firmware get revision

TFirmwareGetRevision = function:LongWord;

Firmware get throttled

TFirmwareGetThrottled = function:LongWord;

Machine get type

TMachineGetType = function:LongWord;

Memory get base

TMemoryGetBase = function:PtrUInt;

Memory get size

TMemoryGetSize = function:UInt64;

Memory get page size

TMemoryGetPageSize = function:LongWord;

Memory get large page size

TMemoryGetLargePageSize = function:LongWord;

Memory get section size

TMemoryGetSectionSize = function:LongWord;

Memory get large section size

TMemoryGetLargeSectionSize = function:LongWord;

Power get wait

TPowerGetWait = function(PowerId:LongWord):LongWord;

Power get state

TPowerGetState = function(PowerId:LongWord):LongWord;

Power set state

TPowerSetState = function(PowerId,State:LongWord; Wait:Boolean):LongWord;

Clock get count

TClockGetCount = function:LongWord;

Clock get total

TClockGetTotal = function:Int64;

Clock update offset

TClockUpdateOffset = function:LongWord;

Clock get rate

TClockGetRate = function(ClockId:LongWord):LongWord;

Clock set rate

TClockSetRate = function(ClockId,Rate:LongWord; Turbo:Boolean):LongWord;

Clock get state

TClockGetState = function(ClockId:LongWord):LongWord;

Clock set state

TClockSetState = function(ClockId,State:LongWord):LongWord;

Clock get min rate

TClockGetMinRate = function(ClockId:LongWord):LongWord;

Clock get max rate

TClockGetMaxRate = function(ClockId:LongWord):LongWord;

Turbo get state

TTurboGetState = function(TurboId:LongWord):LongWord;

Turbo set state

TTurboSetState = function(TurboId,State:LongWord):LongWord;

Voltage get value

TVoltageGetValue = function (VoltageId:LongWord):LongWord;

Voltage set value

TVoltageSetValue = function (VoltageId,Value:LongWord):LongWord;

Voltage get min value

TVoltageGetMinValue = function(VoltageId:LongWord):LongWord;

Voltage get max value

TVoltageGetMaxValue = function(VoltageId:LongWord):LongWord;

Temperature get current

TTemperatureGetCurrent = function(TemperatureId:LongWord):LongWord;

Temperature get maximum

TTemperatureGetMaximum = function(TemperatureId:LongWord):LongWord;

GPU memory allocate

TGPUMemoryAllocate = function(Length,Alignment,Flags:LongWord):THandle;

GPU memory release

TGPUMemoryRelease = function(Handle:THandle):LongWord;

GPU memory lock

TGPUMemoryLock = function(Handle:THandle):LongWord;

GPU memory unlock

TGPUMemoryUnlock = function(Handle:THandle):LongWord;

GPU execute code

TGPUExecuteCode = function(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord;

Dispmanx handle get

TDispmanxHandleGet = function(Resource:THandle):THandle;

EDID block get

TEDIDBlockGet = function(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord;

Framebuffer available

TFramebufferAvailable = function:Boolean;

Framebuffer allocate

TFramebufferAllocate = function(Alignment:LongWord; var Address,Length:LongWord):LongWord;

Framebuffer release

TFramebufferRelease = function:LongWord;

Framebuffer set state

TFramebufferSetState = function(State:LongWord):LongWord;

Framebuffer get dimensions

TFramebufferGetDimensions = function(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord;

Framebuffer get physical

TFramebufferGetPhysical = function(var Width,Height:LongWord):LongWord;

Framebuffer set physical

TFramebufferSetPhysical = function(var Width,Height:LongWord):LongWord;

Framebuffer test physical

TFramebufferTestPhysical = function(var Width,Height:LongWord):LongWord;

Framebuffer get virtual

TFramebufferGetVirtual = function(var Width,Height:LongWord):LongWord;

Framebuffer set virtual

TFramebufferSetVirtual = function(var Width,Height:LongWord):LongWord;

Framebuffer test virtual

TFramebufferTestVirtual = function(var Width,Height:LongWord):LongWord;

Framebuffer get depth

TFramebufferGetDepth = function(var Depth:LongWord):LongWord;

Framebuffer set depth

TFramebufferSetDepth = function(var Depth:LongWord):LongWord;

Framebuffer test depth

TFramebufferTestDepth = function(var Depth:LongWord):LongWord;

Framebuffer get pixel order

TFramebufferGetPixelOrder = function(var Order:LongWord):LongWord;

Framebuffer set pixel order

TFramebufferSetPixelOrder = function(var Order:LongWord):LongWord;

Framebuffer test pixel order

TFramebufferTestPixelOrder = function(var Order:LongWord):LongWord;

Framebuffer get alpha mode

TFramebufferGetAlphaMode = function(var Mode:LongWord):LongWord;

Framebuffer set alpha mode

TFramebufferSetAlphaMode = function(var Mode:LongWord):LongWord;

Framebuffer test alpha mode

TFramebufferTestAlphaMode = function(var Mode:LongWord):LongWord;

Framebuffer get pitch

TFramebufferGetPitch = function:LongWord;

Framebuffer get offset

TFramebufferGetOffset = function(var X,Y:LongWord):LongWord;

Framebuffer set offset

TFramebufferSetOffset = function(var X,Y:LongWord):LongWord;

Framebuffer test offset

TFramebufferTestOffset = function(var X,Y:LongWord):LongWord;

Framebuffer get overscan

TFramebufferGetOverscan = function(var Top,Bottom,Left,Right:LongWord):LongWord;

Framebuffer set overscan

TFramebufferSetOverscan = function(var Top,Bottom,Left,Right:LongWord):LongWord;

Framebuffer test overscan

TFramebufferTestOverscan = function(var Top,Bottom,Left,Right:LongWord):LongWord;

Framebuffer get palette

TFramebufferGetPalette = function(Buffer:Pointer; Length:LongWord):LongWord;

Framebuffer set palette

TFramebufferSetPalette = function(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;

Framebuffer test palette

TFramebufferTestPalette = function(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;

Framebuffer get layer

TFramebufferGetLayer = function(var Layer:LongInt):LongWord;

Framebuffer set layer

TFramebufferSetLayer = function(var Layer:LongInt):LongWord;

Framebuffer test layer

TFramebufferTestLayer = function(var Layer:LongInt):LongWord;

Framebuffer test vsync

TFramebufferTestVsync = function:LongWord;

Framebuffer set vsync

TFramebufferSetVsync = function:LongWord;

Framebuffer set backlight

TFramebufferSetBacklight = function(Brightness:LongWord):LongWord;

Framebuffer get num displays

TFramebufferGetNumDisplays = function(var NumDisplays:LongWord):LongWord;

Framebuffer get display id

TFramebufferGetDisplayId = function(DisplayNum:LongWord):LongWord;

Framebuffer set display num

TFramebufferSetDisplayNum = function(DisplayNum:LongWord):LongWord;

Framebuffer get display settings

TFramebufferGetDisplaySettings = function(DisplayNum:LongWord; var DisplaySettings:TDisplaySettings):LongWord;

Framebuffer display id to name

TFramebufferDisplayIdToName = function(DisplayId:LongWord):String;

Touch get buffer

TTouchGetBuffer = function(var Address:PtrUInt):LongWord;

Touch set buffer

TTouchSetBuffer = function(Address:PtrUInt):LongWord;

Cursor set default

TCursorSetDefault = function:LongWord;

Cursor set info

TCursorSetInfo = function(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord;

Cursor set state

TCursorSetState = function(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord;

DMA available

TDMAAvailable = function:Boolean;

DMA transfer

TDMATransfer = function(Data:PDMAData; Direction,Peripheral:LongWord):LongWord;

DMA fill memory

TDMAFillMemory = function(Dest:Pointer; Size:LongWord; Value:Byte):LongWord;

DMA copy memory

TDMACopyMemory = function(Source,Dest:Pointer; Size:LongWord):LongWord;

DMA read peripheral

TDMAReadPeripheral = function(Address,Dest:Pointer; Size,Peripheral:LongWord):LongWord;

DMA write peripheral

TDMAWritePeripheral = function(Source,Address:Pointer; Size,Peripheral:LongWord):LongWord;

DMA allocate buffer

TDMAAllocateBuffer = function(Size:LongWord):Pointer;

DMA allocate buffer ex

TDMAAllocateBufferEx = function(var Size:LongWord):Pointer;

DMA release buffer

TDMAReleaseBuffer = function(Buffer:Pointer):LongWord;

DMA get channels

TDMAGetChannels = function:LongWord;

GPIO available

TGPIOAvailable = function:Boolean;

GPIO read

TGPIORead = function(Reg:LongWord):LongWord;

GPIO write

TGPIOWrite = procedure(Reg,Value:LongWord);

GPIO input get

TGPIOInputGet = function(Pin:LongWord):LongWord;

GPIO input wait

TGPIOInputWait = function(Pin,Trigger,Timeout:LongWord):LongWord;

GPIO input event

TGPIOInputEvent = function(Pin,Trigger,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord;

GPIO output set

TGPIOOutputSet = function(Pin,Level:LongWord):LongWord;

GPIO pull get

TGPIOPullGet = function(Pin:LongWord):LongWord;

GPIO pull select

TGPIOPullSelect = function(Pin,Mode:LongWord):LongWord;

GPIO function get

TGPIOFunctionGet = function(Pin:LongWord):LongWord;

GPIO function select

TGPIOFunctionSelect = function(Pin,Mode:LongWord):LongWord;

Virtual GPIO input get

TVirtualGPIOInputGet = function(Pin:LongWord):LongWord;

Virtual GPIO output set

TVirtualGPIOOutputSet = function(Pin,Level:LongWord):LongWord;

Virtual GPIO function get

TVirtualGPIOFunctionGet = function(Pin:LongWord):LongWord;

Virtual GPIO function select

TVirtualGPIOFunctionSelect = function(Pin,Mode:LongWord):LongWord;

SPI available

TSPIAvailable = function:Boolean;

SPI start

TSPIStart = function(Mode,ClockRate,ClockPhase,ClockPolarity:LongWord):LongWord;

SPI stop

TSPIStop = function:LongWord;

SPI read

TSPIRead = function(ChipSelect:Word; Dest:Pointer; Size:LongWord; var Count:LongWord):LongWord;

SPI write

TSPIWrite = function(ChipSelect:Word; Source:Pointer; Size:LongWord; var Count:LongWord):LongWord;

SPI write read

TSPIWriteRead = function(ChipSelect:Word; Source,Dest:Pointer; Size:LongWord; var Count:LongWord):LongWord;

SPI get mode

TSPIGetMode = function:LongWord;

SPI set mode

TSPISetMode = function(Mode:LongWord):LongWord;

SPI get clock rate

TSPIGetClockRate = function(ChipSelect:Word):LongWord;

SPI set clock rate

TSPISetClockRate = function(ChipSelect:Word; ClockRate:LongWord):LongWord;

SPI get clock phase

TSPIGetClockPhase = function:LongWord;

SPI set clock phase

TSPISetClockPhase = function(ClockPhase:LongWord):LongWord;

SPI get clock polarity

TSPIGetClockPolarity = function:LongWord;

SPI set clock polarity

TSPISetClockPolarity = function(ClockPolarity:LongWord):LongWord;

SPI get select polarity

TSPIGetSelectPolarity = function(ChipSelect:Word):LongWord;

SPI set select polarity

TSPISetSelectPolarity = function(ChipSelect:Word; SelectPolarity:LongWord):LongWord;

SPI get description

TSPIGetDescription = function(Id:LongWord):String;

I2C available

TI2CAvailable = function:Boolean;

I2C start

TI2CStart = function(Rate:LongWord):LongWord;

I2C stop

TI2CStop = function:LongWord;

I2C read

TI2CRead = function(Address:Word; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;

I2C write

TI2CWrite = function(Address:Word; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;

I2C write read

TI2CWriteRead = function(Address:Word; Initial:Pointer; Len:LongWord; Data:Pointer; Size:LongWord; var Count:LongWord):LongWord;

I2C write write

TI2CWriteWrite = function(Address:Word; Initial:Pointer; Len:LongWord; Data:Pointer; Size:LongWord; var Count:LongWord):LongWord;

I2C get rate

TI2CGetRate = function:LongWord;

I2C set rate

TI2CSetRate = function(Rate:LongWord):LongWord;

I2C get address

TI2CGetAddress = function:Word;

I2C set address

TI2CSetAddress = function(Address:Word):LongWord;

I2C get description

TI2CGetDescription = function(Id:LongWord):String;

I2C slave get description

TI2CSlaveGetDescription = function(Id:LongWord):String;

PWM available

TPWMAvailable = function:Boolean;

PWM start

TPWMStart = function:LongWord;

PWM stop

TPWMStop = function:LongWord;

PWM write

TPWMWrite = function(Value:LongWord):LongWord;

PWM set mode

TPWMSetMode = function(Mode:LongWord):LongWord;

PWM set range

TPWMSetRange = function(Range:LongWord):LongWord;

PWM set frequency

TPWMSetFrequency = function(Frequency:LongWord):LongWord;

PWM configure

TPWMConfigure = function(DutyNS,PeriodNS:LongWord):LongWord;

PWM get description

TPWMGetDescription = function(Id,Channel:LongWord):String;

RTC available

TRTCAvailable = function:Boolean;

RTC get time

TRTCGetTime = function:Int64;

RTC set time

TRTCSetTime = function(const Time:Int64):Int64;

UART get description

TUARTGetDescription = function(Id:LongWord):String;

Serial available

TSerialAvailable = function:Boolean;

Serial open

TSerialOpen = function(BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord;

Serial close

TSerialClose = function:LongWord;

Serial read

TSerialRead = function(Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;

Serial write

TSerialWrite = function(Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;

Peripheral get base

TPeripheralGetBase = function:PtrUInt;

Peripheral get size

TPeripheralGetSize = function:LongWord;

Peripheral read

TPeripheralRead = function(Base,Reg:LongWord):LongWord;

Peripheral write

TPeripheralWrite = procedure(Base,Reg,Value:LongWord);

Local Peripheral get base

TLocalPeripheralGetBase = function:PtrUInt;

Local peripheral get size

TLocalPeripheralGetSize = function:LongWord;

Get SP

TGetSP = function:PtrUInt;

Get PC

TGetPC = function:PtrUInt;

Get IRQ

TGetIRQ = function:Boolean;

Enable IRQ

TEnableIRQ = procedure;

Disable IRQ

TDisableIRQ = procedure;

Save IRQ

TSaveIRQ = function:TIRQMask;

Restore IRQ

TRestoreIRQ = function(IRQMask:TIRQMask):TIRQMask;

Get FIQ

TGetFIQ = function:Boolean;

Enable FIQ

TEnableFIQ = procedure;

Disable FIQ

TDisableFIQ = procedure;

Save FIQ

TSaveFIQ = function:TFIQMask;

Restore FIQ

TRestoreFIQ = function(FIQMask:TFIQMask):TFIQMask;

Enable IRQ/FIQ

TEnableIRQFIQ = procedure;

Disable IRQ/FIQ

TDisableIRQFIQ = procedure;

Save IRQ/FIQ

TSaveIRQFIQ = function:TIRQFIQMask;

Restore IRQ/FIQ

TRestoreIRQFIQ = function(IRQFIQMask:TIRQFIQMask):TIRQFIQMask;

Get abort

TGetAbort = function:Boolean;

Enable abort

TEnableAbort = procedure;

Disable abort

TDisableAbort = procedure;

Save abort

TSaveAbort = function:TAbortMask;

Restore abort

TRestoreAbort = function(AbortMask:TAbortMask):TAbortMask;

Halt

THalt = procedure;

Pause

TPause = procedure;

Halt thread

THaltThread = function(ExitCode:LongWord):LongWord;

Send event

TSendEvent = procedure;

Wait for event

TWaitForEvent = procedure;

Wait for interrupt

TWaitForInterrupt = procedure;

Read memory barrier

TReadMemoryBarrier = procedure;

Write memory barrier

TWriteMemoryBarrier = procedure;

Data memory barrier

TDataMemoryBarrier = procedure;

Data synchronization barrier

TDataSynchronizationBarrier = procedure;

Instruction memory barrier

TInstructionMemoryBarrier = procedure;

Invalidate TLB

TInvalidateTLB = procedure;

Invalidate data TLB

TInvalidateDataTLB = procedure;

Invalidate instruction TLB

TInvalidateInstructionTLB = procedure;

Invalidate cache

TInvalidateCache = procedure;

Clean data cache

TCleanDataCache = procedure;

Invalidate data cache

TInvalidateDataCache = procedure;

Clean and invalidate data cache

TCleanAndInvalidateDataCache = procedure;

Invalidate instruction cache

TInvalidateInstructionCache = procedure;

Clean data cache range

TCleanDataCacheRange = procedure(Address:PtrUInt; Size:LongWord);

Invaliate data cache range

TInvalidateDataCacheRange = procedure(Address:PtrUInt; Size:LongWord);

Clean and invalidate data cache range

TCleanAndInvalidateDataCacheRange = procedure(Address:PtrUInt; Size:LongWord);

Invalidate instruction cache range

TInvalidateInstructionCacheRange = procedure(Address:PtrUInt; Size:LongWord);

Flush prefetch buffer

TFlushPrefetchBuffer = procedure;

Flush branch target cache

TFlushBranchTargetCache = procedure;

Context switch

TContextSwitch = procedure(OldStack,NewStack:Pointer; NewThread:TThreadHandle);

Context switch IRQ

TContextSwitchIRQ = procedure(OldStack,NewStack:Pointer; NewThread:TThreadHandle);

Context switch FIQ

TContextSwitchFIQ = procedure(OldStack,NewStack:Pointer; NewThread:TThreadHandle);

Context switch SWI

TContextSwitchSWI = procedure(OldStack,NewStack:Pointer; NewThread:TThreadHandle);

Interlocked or

TInterlockedOr = function(var Target:LongInt; Value:LongInt):LongInt;

Interlocked x or

TInterlockedXor = function(var Target:LongInt; Value:LongInt):LongInt;

Interlocked and

TInterlockedAnd = function(var Target:LongInt; Value:LongInt):LongInt;

Interlocked decrement

TInterlockedDecrement = function(var Target:LongInt):LongInt;

Interlocked increment

TInterlockedIncrement = function(var Target:LongInt):LongInt;

Interlocked exchange

TInterlockedExchange = function(var Target:LongInt; Source:LongInt):LongInt;

Interlocked add exchange

TInterlockedAddExchange = function(var Target:LongInt; Source:LongInt):LongInt;

Interlocked compare exchange

TInterlockedCompareExchange = function(var Target:LongInt; Source,Compare:LongInt):LongInt;

Page table get levels

TPageTableGetLevels = function:LongWord;

Page directory get base

TPageDirectoryGetBase = function:PtrUInt;

Page directory get size

TPageDirectoryGetSize = function:LongWord;

Page table get base

TPageTableGetBase = function:PtrUInt;

Page table get size

TPageTableGetSize = function:LongWord;

Page table get entry

TPageTableGetEntry = procedure(Address:PtrUInt; var Entry:TPageTableEntry);

Page table set entry

TPageTableSetEntry = function(const Entry:TPageTableEntry):LongWord;

Page table get page size

TPageTableGetPageSize = function(Address:PtrUInt):LongWord;

Page table get page flags

TPageTableGetPageFlags = function(Address:PtrUInt):LongWord;

Page table get page physical

TPageTableGetPagePhysical = function(Address:PtrUInt):PtrUInt;

Page tables get address

TPageTablesGetAddress = function:PtrUInt;

Page tables get length

TPageTablesGetLength = function:LongWord;

Page tables get count

TPageTablesGetCount = function:LongWord;

Page tables get shift

TPageTablesGetShift = function:LongWord;

Page tables get next

TPageTablesGetNext = function:PtrUInt;

Page tables get used

TPageTablesGetUsed = function:LongWord;

Page tables get free

TPageTablesGetFree = function:LongWord;

Vector table get base

TVectorTableGetBase = function:PtrUInt;

Vector table get size

TVectorTableGetSize = function:LongWord;

Vector table get count

TVectorTableGetCount = function:LongWord;

Vector table get entry

TVectorTableGetEntry = function(Number:LongWord):PtrUInt;

Vector table set entry

TVectorTableSetEntry = function(Number:LongWord; Address:PtrUInt):LongWord;

First bit set

TFirstBitSet = function(Value:LongWord):LongWord;

Count leading zeros

TCountLeadingZeros = function(Value:LongWord):LongWord;

Text IO write char

TTextIOWriteChar = function(ACh:Char; AUserData:Pointer):Boolean;

Text IO read char

TTextIOReadChar = function(var ACh:Char; AUserData:Pointer):Boolean;

Text IO write buffer

TTextIOWriteBuffer = function(ABuffer:PChar; ACount:LongInt; AUserData:Pointer):LongInt;

Console get key

TConsoleGetKey = function(var ACh:Char; AUserData:Pointer):Boolean;

Console peek key

TConsolePeekKey = function(var ACh:Char; AUserData:Pointer):Boolean;

Console write char

TConsoleWriteChar = function(ACh:Char; AUserData:Pointer):Boolean;

Console read char

TConsoleReadChar = function(var ACh:Char; AUserData:Pointer):Boolean;

Console read wide char

TConsoleReadWideChar = function(var ACh:WideChar; AUserData:Pointer):Boolean;

Console hide mouse

TConsoleHideMouse = function(AUserData:Pointer):Boolean;

Console show mouse

TConsoleShowMouse = function(X,Y:LongWord; AUserData:Pointer):Boolean;

Console read mouse

TConsoleReadMouse = function(var X,Y,Buttons:LongWord; AUserData:Pointer):Boolean;

Code page to wide char

TCodePageToWideChar = function(Ch:Char):WideChar;

Wide char to code page

TWideCharToCodePage = function(Ch:WideChar):Char;

Host get name

THostGetName = function:String;

Host set name

THostSetName = function(const AName:String):Boolean;

Host get domain

THostGetDomain = function:String;

Host set domain

THostSetDomain = function(const ADomain:String):Boolean;

Module load

TModuleLoad = function(const AName:String):THandle;

Module unload

TModuleUnload = function(AHandle:THandle):Boolean;

Module get name

TModuleGetName = function(AHandle:THandle):String;

Symbol add

TSymbolAdd = function(AHandle:THandle; const AName:String; AAddress:PtrUInt):Boolean;

Symbol remove

TSymbolRemove = function(AHandle:THandle; const AName:String):Boolean;

Symbol get address

TSymbolGetAddress = function(AHandle:THandle; const AName:String):PtrUInt;

Logging output

TLoggingOutput = procedure(const AText:String);

Logging output ex

TLoggingOutputEx = procedure(AFacility,ASeverity:LongWord; const ATag,AContent:String);

Environment get

TEnvironmentGet = function(const AName:String):String;

Environment set

TEnvironmentSet = function(const AName,AValue:String):LongWord;

Environment count

TEnvironmentCount = function(AReset:Boolean):LongWord;

Environment index

TEnvironmentIndex = function(const AName:String):LongWord;

Environment string

TEnvironmentString = function(AIndex:LongWord):String;

Text IO data

[Expand]

PTextIOData = ^TTextIOData;

TTextIOData = record

Platform timer

[Expand]

PPlatformTimer = ^TPlatformTimer;

TPlatformTimer = record

Platform worker

[Expand]

PPlatformWorker = ^TPlatformWorker;

TPlatformWorker = record


Class definitions



Platform specific classes

EHardwareException = class(Exception)
EDataAbort = class(EHardwareException);
EPrefetchAbort = class(EHardwareException);
EUndefinedInstruction = class(EHardwareException);


Public variables



Platform logging

PLATFORM_DEFAULT_LOG_LEVEL:LongWord = PLATFORM_LOG_LEVEL_DEBUG; Minimum level for Platform messages. Only messages with level greater than or equal to this will be printed.
PLATFORM_LOG_ENABLED:Boolean;

IRQ logging

IRQ_DEFAULT_LOG_LEVEL:LongWord = IRQ_LOG_LEVEL_INFO; Minimum level for IRQ messages. Only messages with level greater than or equal to this will be printed.
IRQ_LOG_ENABLED:Boolean;

FIQ logging

FIQ_DEFAULT_LOG_LEVEL:LongWord = FIQ_LOG_LEVEL_INFO; Minimum level for FIQ messages. Only messages with level greater than or equal to this will be printed.
FIQ_LOG_ENABLED:Boolean;

SWI logging

SWI_DEFAULT_LOG_LEVEL:LongWord = SWI_LOG_LEVEL_INFO; Minimum level for SWI messages. Only messages with level greater than or equal to this will be printed.
SWI_LOG_ENABLED:Boolean;

Platform specific variables

PlatformInitialized:Boolean;
CPUInitialized:Boolean;
FPUInitialized:Boolean;
GPUInitialized:Boolean;
MMUInitialized:Boolean;
SMPInitialized:Boolean;
CacheInitialized:Boolean;
BoardInitialized:Boolean;
MemoryInitialized:Boolean;
ClockInitialized:Boolean;
PowerInitialized:Boolean;
MailboxInitialized:Boolean;
InterruptsInitialized:Boolean;
PeripheralsInitialized:Boolean;
ParseBootTagsCompleted:Boolean;
ParseCommandLineCompleted:Boolean;
ParseEnvironmentCompleted:Boolean;
OptionsInitCompleted:Boolean;

Lock variables

ClockLock:TPlatformLock;
PowerLock:TPlatformLock;
MailboxLock:TPlatformLock;
ShutdownLock:TPlatformLock;
InterruptLock:TPlatformLock;
PageTableLock:TPlatformLock;
VectorTableLock:TPlatformLock;
HandleNameLock:TPlatformLock;
HandleTableLock:TPlatformLock;
ShutdownTableLock:TPlatformLock;
UtilityLock:TPlatformLock;
EnvironmentLock:TPlatformLock;

Semaphore variables

ShutdownSemaphore:TPlatformSemaphore;

Worker variables

ShutdownWorker:TPlatformWorker;

Clock variables

ClockBase:Int64 = TIME_TICKS_TO_1899; The system time as of the last setting of the clock
ClockLast:LongWord; The timer value of the last clock tick
ClockTicks:LongWord; Current number of clock ticks (When this reaches CLOCK_TICKS_PER_SECOND then ClockSeconds is incremented and this is reset to zero)
ClockSeconds:LongWord; Current number of clock seconds (This forms the system clock)
ClockRTCInvalid:LongBool; True if available time from RTC is invalid

Utilization variables

UtilizationLast:array of LongWord; The per CPU utilization for the last second (Allocated by scheduler initialization)
UtilizationCurrent:array of LongWord; The per CPU utilization for the current second (Updated by Idle thread and reset by Scheduler interrupt) (Allocated by scheduler initialization)

Initialization handlers

CPUInitHandler:TCPUInit;
FPUInitHandler:TFPUInit;
GPUInitHandler:TGPUInit;
MMUInitHandler:TMMUInit;
SMPInitHandler:TSMPInit;
CacheInitHandler:TCacheInit;
BoardInitHandler:TBoardInit;
MemoryInitHandler:TMemoryInit;
ClockInitHandler:TClockInit;
PowerInitHandler:TPowerInit;
MailboxInitHandler:TMailboxInit;
InterruptInitHandler:TInterruptInit;
PeripheralInitHandler:TPeripheralInit;
ParseBootTagsHandler:TParseBootTags;
ParseCommandLineHandler:TParseCommandLine;
ParseEnvironmentHandler:TParseEnvironment;
OptionsInitHandler:TOptionsInit;

Device tree handlers

DeviceTreeValidHandler:TDeviceTreeValid;
DeviceTreeGetBaseHandler:TDeviceTreeGetBase;
DeviceTreeGetSizeHandler:TDeviceTreeGetSize;
DeviceTreeReadHandler:TDeviceTreeRead;
DeviceTreeRead32Handler:TDeviceTreeRead32;
DeviceTreeRead64Handler:TDeviceTreeRead64;
DeviceTreeReadStringHandler:TDeviceTreeReadString;

Blink/Output handlers

BootBlinkHandler:TBootBlink;
BootOutputHandler:TBootOutput;
BootConsoleStartHandler:TBootConsoleStart;
BootConsoleWriteHandler:TBootConsoleWrite;
BootConsoleWriteExHandler:TBootConsoleWriteEx;
BootConsoleGetXHandler:TBootConsoleGetX;
BootConsoleGetYHandler:TBootConsoleGetY;

LED handlers

PowerLEDEnableHandler:TPowerLEDEnable;
PowerLEDOnHandler:TPowerLEDOn;
PowerLEDOffHandler:TPowerLEDOff;
ActivityLEDEnableHandler:TActivityLEDEnable;
ActivityLEDOnHandler:TActivityLEDOn;
ActivityLEDOffHandler:TActivityLEDOff;

Counter handlers

CounterAvailableHandler:TCounterAvailable;
CounterReadHandler:TCounterRead;
CounterRead64Handler:TCounterRead64;
CounterWaitHandler:TCounterWait;
CounterEventHandler:TCounterEvent;
CounterCancelHandler:TCounterCancel;
CounterGetRateHandler:TCounterGetRate;
CounterSetRateHandler:TCounterSetRate;
CounterGetIntervalHandler:TCounterGetInterval;
CounterSetIntervalHandler:TCounterSetInterval;

Mailbox handlers

MailboxReceiveHandler:TMailboxReceive;
MailboxSendHandler:TMailboxSend;
MailboxCallHandler:TMailboxCall;
MailboxCallExHandler:TMailboxCallEx;
MailboxPropertyCallHandler:TMailboxPropertyCall;
MailboxPropertyCallExHandler:TMailboxPropertyCallEx;
MailboxPropertyTagHandler:TMailboxPropertyTag;

Random handlers

RandomAvailableHandler:TRandomAvailable;
RandomSeedHandler:TRandomSeed;
RandomReadLongIntHandler:TRandomReadLongInt;
RandomReadInt64Handler:TRandomReadInt64;
RandomReadExtendedHandler:TRandomReadExtended;

Watchdog handlers

WatchdogAvailableHandler:TWatchdogAvailable;
WatchdogStartHandler:TWatchdogStart;
WatchdogStopHandler:TWatchdogStop;
WatchdogRefreshHandler:TWatchdogRefresh;

Interrupt request (IRQ) handlers

RequestIRQHandler:TRequestIRQ;
ReleaseIRQHandler:TReleaseIRQ;
RequestExIRQHandler:TRequestExIRQ;
ReleaseExIRQHandler:TReleaseExIRQ;

Fast interrupt request (FIQ) handlers

RequestFIQHandler:TRequestFIQ;
ReleaseFIQHandler:TReleaseFIQ;
RequestExFIQHandler:TRequestExFIQ;
ReleaseExFIQHandler:TReleaseExFIQ;

Inter processor interrupt (IPI) handlers

RequestIPIHandler:TRequestIPI;
ReleaseIPIHandler:TReleaseIPI;

Interrupt register/deregister handlers

RegisterInterruptHandler:TRegisterInterrupt;
DeregisterInterruptHandler:TDeregisterInterrupt;

System call (SWI) handlers

SystemCallHandler:TSystemCall;
RegisterSystemCallHandler:TRegisterSystemCall;
DeregisterSystemCallHandler:TDeregisterSystemCall;
RegisterSystemCallExHandler:TRegisterSystemCallEx;
DeregisterSystemCallExHandler:TDeregisterSystemCallEx;

Interrupt entry handlers

GetInterruptCountHandler:TGetInterruptCount;
GetInterruptStartHandler:TGetInterruptStart;
GetInterruptEntryHandler:TGetInterruptEntry;

Local interrupt entry handlers

GetLocalInterruptCountHandler:TGetLocalInterruptCount;
GetLocalInterruptStartHandler:TGetLocalInterruptStart;
GetLocalInterruptEntryHandler:TGetLocalInterruptEntry;

Software interrupt entry (IPI) handlers

GetSoftwareInterruptCountHandler:TGetSoftwareInterruptCount;
GetSoftwareInterruptStartHandler:TGetSoftwareInterruptStart;
GetSoftwareInterruptEntryHandler:TGetSoftwareInterruptEntry;

System call entry (SWI) handlers

GetSystemCallCountHandler:TGetSystemCallCount;
GetSystemCallEntryHandler:TGetSystemCallEntry;

System handlers

SystemRestartHandler:TSystemRestart;
SystemShutdownHandler:TSystemShutdown;
SystemGetUptimeHandler:TSystemGetUptime;
SystemGetCommandLineHandler:TSystemGetCommandLine;
SystemGetEnvironmentHandler:TSystemGetEnvironment;

CPU handlers

CPUGetArchHandler:TCPUGetArch;
CPUGetTypeHandler:TCPUGetType;
CPUGetBootHandler:TCPUGetBoot;
CPUGetMaskHandler:TCPUGetMask;
CPUGetCountHandler:TCPUGetCount;
CPUGetModeHandler:TCPUGetMode;
CPUGetStateHandler:TCPUGetState;
CPUGetGroupHandler:TCPUGetGroup;
CPUGetCurrentHandler:TCPUGetCurrent;
CPUGetMemoryHandler:TCPUGetMemory;
CPUGetPercentageHandler:TCPUGetPercentage;
CPUGetUtilizationHandler:TCPUGetUtilization;
CPUGetModelHandler:TCPUGetModel;
CPUGetRevisionHandler:TCPUGetRevision;
CPUGetDescriptionHandler:TCPUGetDescription;

FPU handlers

FPUGetTypeHandler:TFPUGetType;
FPUGetStateHandler:TFPUGetState;

GPU handlers

GPUGetTypeHandler:TGPUGetType;
GPUGetStateHandler:TGPUGetState;
GPUGetMemoryHandler:TGPUGetMemory;

Cache handlers

L1CacheGetTypeHandler:TL1CacheGetType;
L1DataCacheGetSizeHandler:TL1DataCacheGetSize;
L1DataCacheGetLineSizeHandler:TL1DataCacheGetLineSize;
L1InstructionCacheGetSizeHandler:TL1InstructionCacheGetSize;
L1InstructionCacheGetLineSizeHandler:TL1InstructionCacheGetLineSize;
L2CacheGetTypeHandler:TL2CacheGetType;
L2CacheGetSizeHandler:TL2CacheGetSize;
L2CacheGetLineSizeHandler:TL2CacheGetLineSize;

Board handlers

BoardGetTypeHandler:TBoardGetType;
BoardGetModelHandler:TBoardGetModel;
BoardGetSerialHandler:TBoardGetSerial;
BoardGetRevisionHandler:TBoardGetRevision;
BoardGetMACAddressHandler:TBoardGetMACAddress;

Chip handlers

ChipGetRevisionHandler:TChipGetRevision;

Firmware handlers

FirmwareGetRevisionHandler:TFirmwareGetRevision;
FirmwareGetThrottledHandler:TFirmwareGetThrottled;

Machine handlers

MachineGetTypeHandler:TMachineGetType;

Memory handlers

MemoryGetBaseHandler:TMemoryGetBase;
MemoryGetSizeHandler:TMemoryGetSize;
MemoryGetPageSizeHandler:TMemoryGetPageSize;
MemoryGetLargePageSizeHandler:TMemoryGetLargePageSize;
MemoryGetSectionSizeHandler:TMemoryGetSectionSize;
MemoryGetLargeSectionSizeHandler:TMemoryGetLargeSectionSize;

Power handlers

PowerGetWaitHandler:TPowerGetWait;
PowerGetStateHandler:TPowerGetState;
PowerSetStateHandler:TPowerSetState;

Clock handlers

ClockGetCountHandler:TClockGetCount;
ClockGetTotalHandler:TClockGetTotal;
ClockUpdateOffsetHandler:TClockUpdateOffset;
ClockGetRateHandler:TClockGetRate;
ClockSetRateHandler:TClockSetRate;
ClockGetStateHandler:TClockGetState;
ClockSetStateHandler:TClockSetState;
ClockGetMinRateHandler:TClockGetMinRate;
ClockGetMaxRateHandler:TClockGetMaxRate;

Turbo handlers

TurboGetStateHandler:TTurboGetState;
TurboSetStateHandler:TTurboSetState;

Voltage handlers

VoltageGetValueHandler:TVoltageGetValue;
VoltageSetValueHandler:TVoltageSetValue;
VoltageGetMinValueHandler:TVoltageGetMinValue;
VoltageGetMaxValueHandler:TVoltageGetMaxValue;

Temperature handlers

TemperatureGetCurrentHandler:TTemperatureGetCurrent;
TemperatureGetMaximumHandler:TTemperatureGetMaximum;

GPU memory handlers

GPUMemoryAllocateHandler:TGPUMemoryAllocate;
GPUMemoryReleaseHandler:TGPUMemoryRelease;
GPUMemoryLockHandler:TGPUMemoryLock;
GPUMemoryUnlockHandler:TGPUMemoryUnlock;

GPU miscellaneous handlers

GPUExecuteCodeHandler:TGPUExecuteCode;
DispmanxHandleGetHandler:TDispmanxHandleGet;
EDIDBlockGetHandler:TEDIDBlockGet;

Framebuffer handlers

FramebufferAvailableHandler:TFramebufferAvailable;
FramebufferAllocateHandler:TFramebufferAllocate;
FramebufferReleaseHandler:TFramebufferRelease;
FramebufferSetStateHandler:TFramebufferSetState;
FramebufferGetDimensionsHandler:TFramebufferGetDimensions;
FramebufferGetPhysicalHandler:TFramebufferGetPhysical;
FramebufferSetPhysicalHandler:TFramebufferSetPhysical;
FramebufferTestPhysicalHandler:TFramebufferTestPhysical;
FramebufferGetVirtualHandler:TFramebufferGetVirtual;
FramebufferSetVirtualHandler:TFramebufferSetVirtual;
FramebufferTestVirtualHandler:TFramebufferTestVirtual;
FramebufferGetDepthHandler:TFramebufferGetDepth;
FramebufferSetDepthHandler:TFramebufferSetDepth;
FramebufferTestDepthHandler:TFramebufferTestDepth;
FramebufferGetPixelOrderHandler:TFramebufferGetPixelOrder;
FramebufferSetPixelOrderHandler:TFramebufferSetPixelOrder;
FramebufferTestPixelOrderHandler:TFramebufferTestPixelOrder;
FramebufferGetAlphaModeHandler:TFramebufferGetAlphaMode;
FramebufferSetAlphaModeHandler:TFramebufferSetAlphaMode;
FramebufferTestAlphaModeHandler:TFramebufferTestAlphaMode;
FramebufferGetPitchHandler:TFramebufferGetPitch;
FramebufferGetOffsetHandler:TFramebufferGetOffset;
FramebufferSetOffsetHandler:TFramebufferSetOffset;
FramebufferTestOffsetHandler:TFramebufferTestOffset;
FramebufferGetOverscanHandler:TFramebufferGetOverscan;
FramebufferSetOverscanHandler:TFramebufferSetOverscan;
FramebufferTestOverscanHandler:TFramebufferTestOverscan;
FramebufferGetPaletteHandler:TFramebufferGetPalette;
FramebufferSetPaletteHandler:TFramebufferSetPalette;
FramebufferTestPaletteHandler:TFramebufferTestPalette;
FramebufferGetLayerHandler:TFramebufferGetLayer;
FramebufferSetLayerHandler:TFramebufferSetLayer;
FramebufferTestLayerHandler:TFramebufferTestLayer;
FramebufferTestVsyncHandler:TFramebufferTestVsync;
FramebufferSetVsyncHandler:TFramebufferSetVsync;
FramebufferSetBacklightHandler:TFramebufferSetBacklight;
FramebufferGetNumDisplaysHandler:TFramebufferGetNumDisplays;
FramebufferGetDisplayIdHandler:TFramebufferGetDisplayId;
FramebufferSetDisplayNumHandler:TFramebufferSetDisplayNum;
FramebufferGetDisplaySettingsHandler:TFramebufferGetDisplaySettings;
FramebufferDisplayIdToNameHandler:TFramebufferDisplayIdToName;

Cursor handlers

CursorSetDefaultHandler:TCursorSetDefault;
CursorSetInfoHandler:TCursorSetInfo;
CursorSetStateHandler:TCursorSetState;

Touch handlers

TouchGetBufferHandler:TTouchGetBuffer;
TouchSetBufferHandler:TTouchSetBuffer;

DMA handlers

DMAAvailableHandler:TDMAAvailable;
DMATransferHandler:TDMATransfer;
DMAFillMemoryHandler:TDMAFillMemory;
DMACopyMemoryHandler:TDMACopyMemory;
DMAReadPeripheralHandler:TDMAReadPeripheral;
DMAWritePeripheralHandler:TDMAWritePeripheral;
DMAAllocateBufferHandler:TDMAAllocateBuffer;
DMAAllocateBufferExHandler:TDMAAllocateBufferEx;
DMAReleaseBufferHandler:TDMAReleaseBuffer;
DMAGetChannelsHandler:TDMAGetChannels;

GPIO handlers

GPIOAvailableHandler:TGPIOAvailable;
GPIOReadHandler:TGPIORead;
GPIOWriteHandler:TGPIOWrite;
GPIOInputGetHandler:TGPIOInputGet;
GPIOInputWaitHandler:TGPIOInputWait;
GPIOInputEventHandler:TGPIOInputEvent;
GPIOOutputSetHandler:TGPIOOutputSet;
GPIOPullGetHandler:TGPIOPullGet;
GPIOPullSelectHandler:TGPIOPullSelect;
GPIOFunctionGetHandler:TGPIOFunctionGet;
GPIOFunctionSelectHandler:TGPIOFunctionSelect;

Virtual GPIO handlers

VirtualGPIOInputGetHandler:TVirtualGPIOInputGet;
VirtualGPIOOutputSetHandler:TVirtualGPIOOutputSet;
VirtualGPIOFunctionGetHandler:TVirtualGPIOFunctionGet;
VirtualGPIOFunctionSelectHandler:TVirtualGPIOFunctionSelect;

SPI handlers

SPIAvailableHandler:TSPIAvailable;
SPIStartHandler:TSPIStart;
SPIStopHandler:TSPIStop;
SPIReadHandler:TSPIRead;
SPIWriteHandler:TSPIWrite;
SPIWriteReadHandler:TSPIWriteRead;
SPIGetModeHandler:TSPIGetMode;
SPISetModeHandler:TSPISetMode;
SPIGetClockRateHandler:TSPIGetClockRate;
SPISetClockRateHandler:TSPISetClockRate;
SPIGetClockPhaseHandler:TSPIGetClockPhase;
SPISetClockPhaseHandler:TSPISetClockPhase;
SPIGetClockPolarityHandler:TSPIGetClockPolarity;
SPISetClockPolarityHandler:TSPISetClockPolarity;
SPIGetSelectPolarityHandler:TSPIGetSelectPolarity;
SPISetSelectPolarityHandler:TSPISetSelectPolarity;
SPIGetDescriptionHandler:TSPIGetDescription;

I2C handlers

I2CAvailableHandler:TI2CAvailable;
I2CStartHandler:TI2CStart;
I2CStopHandler:TI2CStop;
I2CReadHandler:TI2CRead;
I2CWriteHandler:TI2CWrite;
I2CWriteReadHandler:TI2CWriteRead;
I2CWriteWriteHandler:TI2CWriteWrite;
I2CGetRateHandler:TI2CGetRate;
I2CSetRateHandler:TI2CSetRate;
I2CGetAddressHandler:TI2CGetAddress;
I2CSetAddressHandler:TI2CSetAddress;
I2CGetDescriptionHandler:TI2CGetDescription;
I2CSlaveGetDescriptionHandler:TI2CSlaveGetDescription;

PWM handlers

PWMAvailableHandler:TPWMAvailable;
PWMStartHandler:TPWMStart;
PWMStopHandler:TPWMStop;
PWMWriteHandler:TPWMWrite;
PWMSetModeHandler:TPWMSetMode;
PWMSetRangeHandler:TPWMSetRange;
PWMSetFrequencyHandler:TPWMSetFrequency;
PWMConfigureHandler:TPWMConfigure;
PWMGetDescriptionHandler:TPWMGetDescription;

RTC handlers

RTCAvailableHandler:TRTCAvailable;
RTCGetTimeHandler:TRTCGetTime;
RTCSetTimeHandler:TRTCSetTime;

UART handlers

UARTGetDescriptionHandler:TUARTGetDescription;

Serial handlers

SerialAvailableHandler:TSerialAvailable;
SerialOpenHandler:TSerialOpen;
SerialCloseHandler:TSerialClose;
SerialReadHandler:TSerialRead;
SerialWriteHandler:TSerialWrite;

Peripheral handlers

PeripheralGetBaseHandler:TPeripheralGetBase;
PeripheralGetSizeHandler:TPeripheralGetSize;
PeripheralReadHandler:TPeripheralRead;
PeripheralWriteHandler:TPeripheralWrite;
LocalPeripheralGetBaseHandler:TLocalPeripheralGetBase;
LocalPeripheralGetSizeHandler:TLocalPeripheralGetSize;

Get SP/PC handlers

GetSPHandler:TGetSP;
GetPCHandler:TGetPC;

Enable/Disable/Save/Restore IRQ/FIQ handlers

GetIRQHandler:TGetIRQ;
EnableIRQHandler:TEnableIRQ;
DisableIRQHandler:TDisableIRQ;
SaveIRQHandler:TSaveIRQ;
RestoreIRQHandler:TRestoreIRQ;
GetFIQHandler:TGetFIQ;
EnableFIQHandler:TEnableFIQ;
DisableFIQHandler:TDisableFIQ;
SaveFIQHandler:TSaveFIQ;
RestoreFIQHandler:TRestoreFIQ;
EnableIRQFIQHandler:TEnableIRQFIQ;
DisableIRQFIQHandler:TDisableIRQFIQ;
SaveIRQFIQHandler:TSaveIRQFIQ;
RestoreIRQFIQHandler:TRestoreIRQFIQ;
GetAbortHandler:TGetAbort;
EnableAbortHandler:TEnableAbort;
DisableAbortHandler:TDisableAbort;
SaveAbortHandler:TSaveAbort;
RestoreAbortHandler:TRestoreAbort;

Halt/Pause handlers

HaltHandler:THalt;
PauseHandler:TPause;

Halt thread handlers

HaltThreadHandler:THaltThread;

SendEvent/WaitForEvent/Interrupt handlers

SendEventHandler:TSendEvent;
WaitForEventHandler:TWaitForEvent;
WaitForInterruptHandler:TWaitForInterrupt;

Barrier handlers

ReadMemoryBarrierHandler:TReadMemoryBarrier;
WriteMemoryBarrierHandler:TWriteMemoryBarrier;
DataMemoryBarrierHandler:TDataMemoryBarrier;
DataSynchronizationBarrierHandler:TDataSynchronizationBarrier;
InstructionMemoryBarrierHandler:TInstructionMemoryBarrier;

TLB handlers

InvalidateTLBHandler:TInvalidateTLB;
InvalidateDataTLBHandler:TInvalidateDataTLB;
InvalidateInstructionTLBHandler:TInvalidateInstructionTLB;

Cache handlers

InvalidateCacheHandler:TInvalidateCache;
CleanDataCacheHandler:TCleanDataCache;
InvalidateDataCacheHandler:TInvalidateDataCache;
CleanAndInvalidateDataCacheHandler:TCleanAndInvalidateDataCache;
InvalidateInstructionCacheHandler:TInvalidateInstructionCache;
CleanDataCacheRangeHandler:TCleanDataCacheRange;
InvalidateDataCacheRangeHandler:TInvalidateDataCacheRange;
CleanAndInvalidateDataCacheRangeHandler:TCleanAndInvalidateDataCacheRange;
InvalidateInstructionCacheRangeHandler:TInvalidateInstructionCacheRange;

Prefetch buffer handlers

FlushPrefetchBufferHandler:TFlushPrefetchBuffer;

Branch target cache handlers

FlushBranchTargetCacheHandler:TFlushBranchTargetCache;

Context switch handlers

ContextSwitchHandler:TContextSwitch;
ContextSwitchIRQHandler:TContextSwitchIRQ;
ContextSwitchFIQHandler:TContextSwitchFIQ;
ContextSwitchSWIHandler:TContextSwitchSWI;

And/Xor/Or/Increment/Decrement/Exchange handlers

InterlockedOrHandler:TInterlockedOr;
InterlockedXorHandler:TInterlockedXor;
InterlockedAndHandler:TInterlockedAnd;
InterlockedDecrementHandler:TInterlockedDecrement;
InterlockedIncrementHandler:TInterlockedIncrement;
InterlockedExchangeHandler:TInterlockedExchange;
InterlockedAddExchangeHandler:TInterlockedAddExchange;
InterlockedCompareExchangeHandler:TInterlockedCompareExchange;

Page table handlers

PageTableGetLevelsHandler:TPageTableGetLevels;
PageDirectoryGetBaseHandler:TPageDirectoryGetBase;
PageDirectoryGetSizeHandler:TPageDirectoryGetSize;
PageTableGetBaseHandler:TPageTableGetBase;
PageTableGetSizeHandler:TPageTableGetSize;
PageTableGetEntryHandler:TPageTableGetEntry;
PageTableSetEntryHandler:TPageTableSetEntry;
PageTableGetPageSizeHandler:TPageTableGetPageSize;
PageTableGetPageFlagsHandler:TPageTableGetPageFlags;
PageTableGetPagePhysicalHandler:TPageTableGetPagePhysical;

Page tables handlers

PageTablesGetAddressHandler:TPageTablesGetAddress;
PageTablesGetLengthHandler:TPageTablesGetLength;
PageTablesGetCountHandler:TPageTablesGetCount;
PageTablesGetShiftHandler:TPageTablesGetShift;
PageTablesGetNextHandler:TPageTablesGetNext;
PageTablesGetUsedHandler:TPageTablesGetUsed;
PageTablesGetFreeHandler:TPageTablesGetFree;

Vector table handlers

VectorTableGetBaseHandler:TVectorTableGetBase;
VectorTableGetSizeHandler:TVectorTableGetSize;
VectorTableGetCountHandler:TVectorTableGetCount;
VectorTableGetEntryHandler:TVectorTableGetEntry;
VectorTableSetEntryHandler:TVectorTableSetEntry;

First bit set handlers

FirstBitSetHandler:TFirstBitSet;

Count leading zeros handlers

CountLeadingZerosHandler:TCountLeadingZeros;

Text IO handlers

TextIOWriteCharHandler:TTextIOWriteChar;
TextIOReadCharHandler:TTextIOReadChar;
TextIOWriteBufferHandler:TTextIOWriteBuffer;

Console handlers

ConsoleGetKeyHandler:TConsoleGetKey;
ConsolePeekKeyHandler:TConsolePeekKey;
ConsoleWriteCharHandler:TConsoleWriteChar;
ConsoleReadCharHandler:TConsoleReadChar;
ConsoleReadWideCharHandler:TConsoleReadWideChar;
ConsoleHideMouseHandler:TConsoleHideMouse;
ConsoleShowMouseHandler:TConsoleShowMouse;
ConsoleReadMouseHandler:TConsoleReadMouse;

Code page handlers

CodePageToWideCharHandler:TCodePageToWideChar;
WideCharToCodePageHandler:TWideCharToCodePage;

Name handlers

HostGetNameHandler:THostGetName;
HostSetNameHandler:THostSetName;
HostGetDomainHandler:THostGetDomain;
HostSetDomainHandler:THostSetDomain;

Module handlers

ModuleLoadHandler:TModuleLoad;
ModuleUnloadHandler:TModuleUnload;
ModuleGetNameHandler:TModuleGetName;

Symbol handlers

SymbolAddHandler:TSymbolAdd;
SymbolRemoveHandler:TSymbolRemove;
SymbolGetAddressHandler:TSymbolGetAddress;

Logging handlers

LoggingOutputHandler:TLoggingOutput;
LoggingOutputExHandler:TLoggingOutputEx;


Function declarations



Initialization functions

[Expand]
procedure PlatformInit;
Description: Initialize platform specific information for the current hardware


[Expand]
procedure CPUInit;
Description: Initialize the CPU including performance features etc (Where Applicable)


[Expand]
procedure FPUInit;
Description: Initialize the Floating Point Processor Unit (Where Applicable)


[Expand]
procedure GPUInit;
Description: Initialize the Graphics Processor Unit (Where Applicable)


[Expand]
procedure MMUInit;
Description: Initialize the Memory Management Unit (Where Applicable)


[Expand]
procedure SMPInit;
Description: Initialize the Symetric Multi Processor support (Where Applicable)


[Expand]
procedure CacheInit;
Description: Initialize CPU Data and Instruction Caching (Where Applicable)


[Expand]
procedure BoardInit;
Description: Initialize Board specific information (Where Applicable)


[Expand]
procedure MemoryInit;
Description: Initialize Memory specific information (Where Applicable)


[Expand]
procedure ClockInit;
Description: Initialize the Clock handling


[Expand]
procedure PowerInit;
Description: Initialize Power management (Where Applicable)


[Expand]
procedure MailboxInit;
Description: Initialize Mailbox access (Where Applicable)


[Expand]
procedure InterruptInit;
Description: Initialize Interrupt handling


[Expand]
procedure PeripheralInit;
Description: Initialize Peripheral devices (Where Applicable)


[Expand]
procedure ParseBootTags;
Description: Parse any boot tag information passed by the bootloader (Where Applicable)


[Expand]
procedure ParseCommandLine;
Description: Setup argc, argv and cmdline and process known command line options (Where Applicable)


[Expand]
procedure ParseEnvironment;
Description: Setup envp and process known environment options (Where Applicable)


[Expand]
procedure OptionsInit;
Description: Process known command line and environment options (Where Applicable)


Device tree functions

[Expand]
function DeviceTreeValid:Boolean; inline;
Description: Check if valid Device Tree information was provided by the firmware/bootloader


[Expand]
function DeviceTreeGetBase:PtrUInt; inline;
Description: Get the base address of the Device Tree Blob (Where Applicable)


[Expand]
function DeviceTreeGetSize:LongWord; inline;
Description: Get the total size of the Device Tree Blob (Where Applicable)


[Expand]
function DeviceTreeRead(const Path,Name:String; Buffer:Pointer; var Size:LongWord):LongWord; inline;
Description: Read the raw value of a Device Tree property (Where Applicable)


[Expand]
function DeviceTreeRead32(const Path,Name:String; var Value:LongWord):LongWord; inline;
Description: Read a 32-bit value from a Device Tree property (Where Applicable)


[Expand]
function DeviceTreeRead64(const Path,Name:String; var Value:UInt64):LongWord; inline;
Description: Read a 64-bit value from a Device Tree property (Where Applicable)


[Expand]
function DeviceTreeReadString(const Path,Name:String; var Value:String):LongWord; inline;
Description: Read a string value from a Device Tree property (Where Applicable)


Boot functions

[Expand]
procedure BootBlink; inline;
Description: Blink the Activity LED (Where Applicable)


[Expand]
procedure BootOutput(Value:LongWord); inline;
Description: Output boot time information (Where Applicable)


[Expand]
procedure BootConsoleStart; inline;
Description: Start the boot time console display (Where Applicable)


[Expand]
procedure BootConsoleWrite(const Value:String); inline;
Description: Output text to the boot time console display (Where Applicable)


[Expand]
procedure BootConsoleWriteEx(const Value:String; X,Y:LongWord); inline;
Description: Output text to the boot time console display at the specified X and Y position (Where Applicable)


[Expand]
function BootConsoleGetX:LongWord; inline;
Description: Get the current X position of the boot time console display (Where Applicable)


[Expand]
function BootConsoleGetY:LongWord; inline;
Description: Get the current Y position of the boot time console display (Where Applicable)


LED functions

[Expand]
procedure PowerLEDEnable; inline;
Description: Enable the Power LED (Where Applicable)


[Expand]
procedure PowerLEDOn; inline;
Description: Turn On the Power LED (Where Applicable)


[Expand]
procedure PowerLEDOff; inline;
Description: Turn Off the Power LED (Where Applicable)


[Expand]
procedure ActivityLEDEnable; inline;
Description: Enable the Activity LED (Where Applicable)


[Expand]
procedure ActivityLEDOn; inline;
Description: Turn On the Activity LED (Where Applicable)


[Expand]
procedure ActivityLEDOff; inline;
Description: Turn Off the Activity LED (Where Applicable)


Counter functions (Timer device)

[Expand]
function CounterAvailable:Boolean; inline;
Description: Check if a counter is currently available


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


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


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


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


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


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


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


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


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


Mailbox functions

[Expand]
function MailboxReceive(Mailbox,Channel:LongWord):LongWord; inline;
Description: Receive from specified mailbox on specified channel


[Expand]
procedure MailboxSend(Mailbox,Channel,Data:LongWord); inline;
Description: Send to specified mailbox on specified channel


[Expand]
function MailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord; inline;
Description: Perform a transaction (Send/Receive) to specified mailbox on specified channel


[Expand]
function MailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord; inline;
Description: Perform a transaction (Send/Receive) to specified mailbox on specified channel


[Expand]
function MailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord; inline;
Description: Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel


[Expand]
function MailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord; inline;
Description: Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel


[Expand]
function MailboxPropertyTag(Tag:LongWord; Data:Pointer; Size:LongWord):LongWord; inline;
Description: Request a property tag (Get/Set) from the mailbox property channel


Random number functions

[Expand]
function RandomAvailable:Boolean; inline;
Description: Check if a hardware random number generator is currently available


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


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


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


[Expand]
function RandomReadDouble:Double; inline;
Description: To be documented


[Expand]
function RandomReadExtended:Extended; inline;
Description: To be documented


Watchdog timer functions

[Expand]
function WatchdogAvailable:Boolean; inline; 
Description: Check if a watchdog timer is currently available


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


[Expand]
function WatchdogStop:LongWord; inline;
Description: To be documented


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


Interrupt request (IRQ) functions

[Expand]
function RequestIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied handler to the specified IRQ number


[Expand]
function ReleaseIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified IRQ number


[Expand]
function RequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied extended handler to the specified IRQ number


[Expand]
function ReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied extended handler from the specified IRQ number


[Expand]
function RequestFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied handler to the specified FIQ number (Where Applicable)


[Expand]
function ReleaseFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified FIQ number (Where Applicable)


[Expand]
function RequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied extended handler to the specified FIQ number (Where Applicable)


[Expand]
function ReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied extended handler from the specified FIQ number (Where Applicable)


Inter processor interrupt (IPI) functions

[Expand]
function RequestIPI(CPUID,Number:LongWord; Handler:TIPIHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied handler to the specified IPI (Inter-processor interrupt) number (Where Applicable)


[Expand]
function ReleaseIPI(CPUID,Number:LongWord; Handler:TIPIHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified IPI (Inter-processor interrupt) number (Where Applicable)


Interrupt register/deregister functions

[Expand]
function RegisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request registration of the supplied handler to the specified interrupt number (Where Applicable)


[Expand]
function DeregisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified interrupt number (Where Applicable)


System call (SWI) functions

[Expand]
procedure SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); inline;
Description: Perform a System Call function with the supplied parameters (Where Applicable)


[Expand]
function RegisterSystemCall(Number:LongWord; Handler:TSystemCallHandler):LongWord; inline;
Description: Request registration of the supplied handler to the specified System Call number (Where Applicable)


[Expand]
function DeregisterSystemCall(Number:LongWord; Handler:TSystemCallHandler):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified System Call number (Where Applicable)


[Expand]
function RegisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord; inline;
Description: Request registration of the supplied extended handler to the specified System Call number (Where Applicable)


[Expand]
function DeregisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord; inline;
Description: Request deregistration of the supplied extended handler from the specified System Call number (Where Applicable)


Interrupt entry functions

[Expand]
function GetInterruptCount:LongWord; inline;
Description: Get the number of interrupt entries for the current platform


[Expand]
function GetInterruptStart:LongWord; inline;
Description: Get the starting number of interrupt entries for the current platform


[Expand]
function GetInterruptEntry(Number:LongWord):TInterruptEntry; overload;
Description: Get the interrupt entry for the specified interrupt number


[Expand]
function GetInterruptEntry(Number,Instance:LongWord;var Interrupt:TInterruptEntry):LongWord; inline; overload;
Description: Get the interrupt entry for the specified interrupt number and instance


Local interrupt entry functions

[Expand]
function GetLocalInterruptCount:LongWord; inline;
Description: Get the number of local interrupt entries for the current platform (Where Applicable)


[Expand]
function GetLocalInterruptStart:LongWord; inline;
Description: Get the starting number of local interrupt entries for the current platform (Where Applicable)


[Expand]
function GetLocalInterruptEntry(CPUID,Number:LongWord):TInterruptEntry;
Description: Get the local interrupt entry for the specified interrupt number (Where Applicable)


[Expand]
function GetLocalInterruptEntry(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord; inline;
Description: Get the local interrupt entry for the specified interrupt number and instance (Where Applicable)


Software interrupt entry (IPI) functions

[Expand]
function GetSoftwareInterruptCount:LongWord; inline;
Description: Get the number of software interrupt entries for the current platform (Where Applicable)


[Expand]
function GetSoftwareInterruptStart:LongWord; inline;
Description: Get the starting number of software interrupt entries for the current platform (Where Applicable)


[Expand]
function GetSoftwareInterruptEntry(CPUID,Number:LongWord):TInterruptEntry; overload;
Description: Get the software interrupt entry for the specified interrupt number and instance (Where Applicable)


[Expand]
function GetSoftwareInterruptEntry(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord; inline; overload;
Description: Get the software interrupt entry for the specified interrupt number and instance (Where Applicable)


System call entry (SWI) functions

[Expand]
function GetSystemCallCount:LongWord; inline;
Description: Get the number of system call entries for the current platform (Where Applicable)


[Expand]
function GetSystemCallEntry(Number:LongWord):TSystemCallEntry; inline;
Description: Get the system call entry for the specified system call number (Where Applicable)


System functions

[Expand]
function SystemRestart(Delay:LongWord):LongWord;
Description: Restart the system


[Expand]
function SystemShutdown(Delay:LongWord):LongWord;
Description: Shutdown the system


[Expand]
function SystemRegisterShutdown(Callback:TShutdownCallback; Parameter:Pointer; Timeout:LongWord):LongWord;
Description: Register a procedure to be called during system shutdown or restart


[Expand]
function SystemDeregisterShutdown(Callback:TShutdownCallback; Parameter:Pointer):LongWord;
Description: Deregister a procedure from being called during system shutdown or restart


[Expand]
function SystemGetUptime:Int64; inline;
Description: Get the current system up time in 100 nanosecond ticks since 1/1/1601


[Expand]
function SystemGetCommandLine:String; inline;
Description: Get the current command line


[Expand]
function SystemGetEnvironment:Pointer; inline;
Description: Get the current environment


[Expand]
function SystemDateToString(Date:TDateTime):String; inline;
Description: Return the supplied date value as a string in the system defined format


[Expand]
function SystemTimeToString(Time:TDateTime):String; inline;
Description: Return the supplied time value as a string in the system defined format


[Expand]
function SystemDateTimeToString(DateTime:TDateTime):String; inline;
Description: Return the supplied date and time value as a string in the system defined format


[Expand]
function SystemIntervalToString(Interval:TDateTime):String; inline;
Description: Return the supplied time interval as a string in the system defined format


CPU functions

[Expand]
function CPUGetArch:LongWord; inline;
Description: Get the CPU architecture for this board


[Expand]
function CPUGetType:LongWord; inline;
Description: Get the CPU type for this board


[Expand]
function CPUGetBoot:LongWord; inline;
Description: Get the boot CPU for this board


[Expand]
function CPUGetMask:LongWord; inline;
Description: Get the CPU mask for this board


[Expand]
function CPUGetCount:LongWord; inline;
Description: Get the CPU count for this board


[Expand]
function CPUGetMode:LongWord; inline;
Description: Get the current CPU moded


[Expand]
function CPUGetState:LongWord; inline;
Description: Get the current CPU state


[Expand]
function CPUGetGroup:LongWord; inline;
Description: Get the current CPU group


[Expand]
function CPUGetCurrent:LongWord; inline;
Description: Get the current CPU Id


[Expand]
function CPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord; inline;
Description: Get the memory start and size available to the CPU


[Expand]
function CPUGetPercentage(CPUID:LongWord):Double; inline;
Description: Get the last second utilization of the specified CPU in percentage


[Expand]
function CPUGetUtilization(CPUID:LongWord):LongWord; inline;
Description: Get the last second utilization of the specified CPU


[Expand]
function CPUGetModel:LongWord; inline;
Description: Get the CPU model of the current CPU


[Expand]
function CPUGetRevision:LongWord; inline;
Description: Get the CPU revision of the current CPU


[Expand]
function CPUGetDescription:String; inline;
Description: Get the CPU description of the current CPU


FPU functions

[Expand]
function FPUGetType:LongWord; inline;
Description: Get the FPU type for this board


[Expand]
function FPUGetState:LongWord; inline;
Description: Get the current FPU state


GPU functions

[Expand]
function GPUGetType:LongWord; inline;
Description: Get the GPU type for this board


[Expand]
function GPUGetState:LongWord; inline;
Description: Get the current GPU state


[Expand]
function GPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord; inline;
Description: Get the memory start and size available to the GPU


Cache functions

[Expand]
function L1CacheGetType:LongWord; inline;
Description: Get the L1 cache type for this board


[Expand]
function L1DataCacheGetSize:LongWord; inline;
Description: Get the L1 data cache size for this board


[Expand]
function L1DataCacheGetLineSize:LongWord; inline;
Description: Get the L1 data cache line size for this board


[Expand]
function L1InstructionCacheGetSize:LongWord; inline; 
Description: Get the L1 instruction cache size for this board


[Expand]
function L1InstructionCacheGetLineSize:LongWord; inline;
Description: Get the L1 instruction cache line size for this board


[Expand]
function L2CacheGetType:LongWord; inline;
Description: Get the L2 cache type for this board


[Expand]
function L2CacheGetSize:LongWord; inline;
Description: Get the L2 cache size for this board


[Expand]
function L2CacheGetLineSize:LongWord; inline;
Description: Get the L2 cache line size for this board


Version functions

[Expand]
procedure VersionGetInfo(var Major,Minor,Revision:LongWord);
Description: Get the version information of the currently running system


[Expand]
function VersionGetDate:String;
Description: Get the version release date of the currently running system


[Expand]
function VersionGetName:String;
Description: Get the version release name of the currently running system


[Expand]
function VersionGetVersion:String;
Description: Get the version string of the currently running system


Board functions

[Expand]
function BoardGetType:LongWord; inline;
Description: Get the current Board type


[Expand]
function BoardGetModel:LongWord; inline;
Description: Get the current Board model


[Expand]
function BoardGetSerial:Int64; inline;
Description: Get the current Board serial number


[Expand]
function BoardGetRevision:LongWord; inline;
Description: Get the current Board revision number


[Expand]
function BoardGetMACAddress:String; inline;
Description: Get the current Board MAC address (Where Applicable)


Chip functions

[Expand]
function ChipGetRevision:LongWord; inline;
Description: Get the current Chip revision number


Firmware functions

[Expand]
function FirmwareGetRevision:LongWord; inline;
Description: Get the current board Firmware Revision


[Expand]
function FirmwareGetThrottled:LongWord; inline;
Description: Get the current throttling state from the firmware


Machine functions

[Expand]
function MachineGetType:LongWord; inline;
Description: Get the current Machine type


Memory functions

[Expand]
function MemoryGetBase:PtrUInt; inline;
Description: Get the base address of system memory


[Expand]
function MemoryGetSize:UInt64; inline;
Description: Get the total size of system memory


[Expand]
function MemoryGetPageSize:LongWord; inline;
Description: Get the page size of system memory


[Expand]
function MemoryGetLargePageSize:LongWord; inline;
Description: Get the large page size of system memory (Where Applicable)


[Expand]
function MemoryGetSectionSize:LongWord; inline;
Description: Get the section size of system memory (Where Applicable)


[Expand]
function MemoryGetLargeSectionSize:LongWord; inline;
Description: Get the large section size of system memory (Where Applicable)


Power functions

[Expand]
function PowerOn(PowerId:LongWord):LongWord;
Description: Power On the specified device


[Expand]
function PowerOff(PowerId:LongWord):LongWord;
Description: Power Off the specified device


[Expand]
function PowerGetWait(PowerId:LongWord):LongWord; inline;
Description: Get the enable wait time in Microseconds of the specified device


[Expand]
function PowerGetState(PowerId:LongWord):LongWord; inline;
Description: Get the power state of the specified device


[Expand]
function PowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord; inline;
Description: Set the power state of the specified device (Optionally waiting for ready)


Clock functions

[Expand]
function ClockTicks:LongWord;
Description: Get the current number of clock ticks


[Expand]
function ClockSeconds:LongWord;
Description: Get the number of clock seconds since the system was started


[Expand]
function ClockMilliseconds:Int64;
Description: Get the number of clock milliseconds since the system was started


[Expand]
function ClockMicroseconds:Int64;
Description: Get the number of clock microseconds since the system was started


[Expand]
function ClockNanoseconds:Int64;
Description: Get the number of clock nanoseconds since the system was started


[Expand]
function ClockGetTime:Int64;
Description: Get the current system time in 100 nanosecond ticks since 1/1/1601


[Expand]
function ClockSetTime(const Time:Int64; RTC:Boolean):Int64;
Description: Set the current system time in 100 nanosecond ticks since 1/1/1601


[Expand]
function ClockGetCount:LongWord; inline;
Description: Gets the current system clock count (32 least significant bits of total)


[Expand]
function ClockGetTotal:Int64; inline;
Description: Gets the total system clock count


[Expand]
function ClockUpdateOffset:LongWord; inline;
Description: Update the system time offset between UTC and Local


[Expand]
function ClockGetRate(ClockId:LongWord):LongWord; inline;
Description: Get the clock rate in Hz of the specified Clock


[Expand]
function ClockSetRate(ClockId,Rate:LongWord; Turbo:Boolean):LongWord; inline;
Description: Set the clock rate in Hz of the specified Clock


[Expand]
function ClockGetState(ClockId:LongWord):LongWord; inline;
Description: Get the state of the specified Clock


[Expand]
function ClockSetState(ClockId,State:LongWord):LongWord; inline;
Description: Set the state of the specified Clock


[Expand]
function ClockGetMinRate(ClockId:LongWord):LongWord; inline;
Description: Get the minimum clock rate in Hz of the specified Clock


[Expand]
function ClockGetMaxRate(ClockId:LongWord):LongWord; inline;
Description: Get the maximum clock rate in Hz of the specified Clock


Turbo functions

[Expand]
function TurboGetState(TurboId:LongWord):LongWord; inline;
Description: Get the Turbo state (0 equals Off/1 equals On) of the specified device


[Expand]
function TurboSetState(TurboId,State:LongWord):LongWord; inline;
Description: Set the Turbo state (0 equals Off/1 equals On) of the specified device


Voltage functions

[Expand]
function VoltageGetValue(VoltageId:LongWord):LongWord; inline;
Description: Get the current voltage level of the specified device


[Expand]
function VoltageSetValue(VoltageId,Value:LongWord):LongWord; inline;
Description: Set the current voltage level of the specified device


[Expand]
function VoltageGetMinValue(VoltageId:LongWord):LongWord; inline;
Description: Get the minimum voltage level of the specified device


[Expand]
function VoltageGetMaxValue(VoltageId:LongWord):LongWord; inline;
Description: Get the maximum voltage level of the specified device


Temperature functions

[Expand]
function TemperatureGetCurrent(TemperatureId:LongWord):LongWord; inline;
Description: Get the current temperature in thousandths of a degree C of the specified device


[Expand]
function TemperatureGetMaximum(TemperatureId:LongWord):LongWord; inline;
Description: Get the maximum temperature in thousandths of a degree C of the specified device


GPU memory functions

[Expand]
function GPUMemoryAllocate(Length,Alignment,Flags:LongWord):THandle; inline;
Description: Allocate memory from the GPU


[Expand]
function GPUMemoryRelease(Handle:THandle):LongWord; inline;
Description: Release memory allocated from the GPU


[Expand]
function GPUMemoryLock(Handle:THandle):LongWord; inline;
Description: Lock memory allocated from the GPU and return an address


[Expand]
function GPUMemoryUnlock(Handle:THandle):LongWord; inline;
Description: Unlock memory allocated from the GPU


GPU miscellaneous functions

[Expand]
function GPUExecuteCode(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord; inline;
Description: Execute a block of code on the GPU


[Expand]
function DispmanxHandleGet(Resource:THandle):THandle; inline;
Description: Convert a Dispmanx Resource handle to a Memory handle (Which can be passed to Lock/Unlock above)


[Expand]
function EDIDBlockGet(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord; inline;
Description: Get an EDID block from HDMI


Framebuffer functions

[Expand]
function FramebufferAvailable:Boolean; inline;
Description: Check if a framebuffer device is currently available


[Expand]
function FramebufferAllocate(Alignment:LongWord; var Address,Length:LongWord):LongWord; inline;
Description: Allocate a new Framebuffer


[Expand]
function FramebufferRelease:LongWord; inline;
Description: Release the current Framebuffer


[Expand]
function FramebufferSetState(State:LongWord):LongWord; inline;
Description: Set the current Framebuffer (Display) state (0 for Off/1 for On)


[Expand]
function FramebufferGetDimensions(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord; inline;
Description: Get the default Dimensions of the Framebuffer (Physical Width, Height and Overscan Top, Bottom, Left, Right in Pixels)


[Expand]
function FramebufferGetPhysical(var Width,Height:LongWord):LongWord; inline;
Description: Get the Physical Framebuffer Width and Height in Pixels


[Expand]
function FramebufferSetPhysical(var Width,Height:LongWord):LongWord; inline;
Description: Set the Physical Framebuffer Width and Height in Pixels


[Expand]
function FramebufferTestPhysical(var Width,Height:LongWord):LongWord; inline;
Description: Test the Physical Framebuffer Width and Height in Pixels


[Expand]
function FramebufferGetVirtual(var Width,Height:LongWord):LongWord; inline;
Description: Get the Virtual Framebuffer Width and Height in Pixels


[Expand]
function FramebufferSetVirtual(var Width,Height:LongWord):LongWord; inline;
Description: Set the Virtual Framebuffer Width and Height in Pixels


[Expand]
function FramebufferTestVirtual(var Width,Height:LongWord):LongWord; inline;
Description: Test the Virtual Framebuffer Width and Height in Pixels


[Expand]
function FramebufferGetDepth(var Depth:LongWord):LongWord; inline;
Description: Get the Framebuffer Depth in Bits per Pixel


[Expand]
function FramebufferSetDepth(var Depth:LongWord):LongWord; inline;
Description: Set the Framebuffer Depth in Bits per Pixel


[Expand]
function FramebufferTestDepth(var Depth:LongWord):LongWord; inline;
Description: Test the Framebuffer Depth in Bits per Pixel


[Expand]
function FramebufferGetPixelOrder(var Order:LongWord):LongWord; inline;
Description: Get the Framebuffer Pixel Order (0 = BGR/1 = RGB)


[Expand]
function FramebufferSetPixelOrder(var Order:LongWord):LongWord; inline;
Description: Set the Framebuffer Pixel Order (0 = BGR/1 = RGB)


[Expand]
function FramebufferTestPixelOrder(var Order:LongWord):LongWord; inline;
Description: Test the Framebuffer Pixel Order (0 = BGR/1 = RGB)


[Expand]
function FramebufferGetAlphaMode(var Mode:LongWord):LongWord; inline;
Description: Get the Framebuffer Alpha Mode


[Expand]
function FramebufferSetAlphaMode(var Mode:LongWord):LongWord; inline;
Description: Set the Framebuffer Alpha Mode


[Expand]
function FramebufferTestAlphaMode(var Mode:LongWord):LongWord; inline;
Description: Test the Framebuffer Alpha Mode


[Expand]
function FramebufferGetPitch:LongWord; inline;
Description: Get the Framebuffer Pitch in Bytes per Line


[Expand]
function FramebufferGetOffset(var X,Y:LongWord):LongWord; inline;
Description: Get the Framebuffer Virtual Offset in Pixels


[Expand]
function FramebufferSetOffset(var X,Y:LongWord):LongWord; inline;
Description: Set the Framebuffer Virtual Offset in Pixels


[Expand]
function FramebufferTestOffset(var X,Y:LongWord):LongWord; inline;
Description: Test the Framebuffer Virtual Offset in Pixels


[Expand]
function FramebufferGetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord; inline;
Description: Get the Framebuffer Top, Bottom, Left and Right Overscan in Pixels


[Expand]
function FramebufferSetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord; inline;
Description: Set the Framebuffer Top, Bottom, Left and Right Overscan in Pixels


[Expand]
function FramebufferTestOverscan(var Top,Bottom,Left,Right:LongWord):LongWord; inline;
Description: Test the Framebuffer Top, Bottom, Left and Right Overscan in Pixels


[Expand]
function FramebufferGetPalette(Buffer:Pointer; Length:LongWord):LongWord; inline;
Description: Get the Framebuffer Palette in RGBA values


[Expand]
function FramebufferSetPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord; inline;
Description: Set the Framebuffer Palette in RGBA values


[Expand]
function FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord; inline;
Description: Test the Framebuffer Palette in RGBA values


[Expand]
function FramebufferGetLayer(var Layer:LongInt):LongWord; inline;
Description: Get the Framebuffer Layer


[Expand]
function FramebufferSetLayer(var Layer:LongInt):LongWord; inline;
Description: Set the Framebuffer Layer


[Expand]
function FramebufferTestLayer(var Layer:LongInt):LongWord; inline;
Description: Test the Framebuffer Layer


[Expand]
function FramebufferTestVsync:LongWord; inline;
Description: Test the Framebuffer Vertical Sync (Where Applicable)


[Expand]
function FramebufferSetVsync:LongWord; inline;
Description: Set (Wait For) the Framebuffer Vertical Sync (Where Applicable)


[Expand]
function FramebufferSetBacklight(Brightness:LongWord):LongWord; inline;
Description: Set the Framebuffer Backlight brightness (Where Applicable)


[Expand]
function FramebufferGetNumDisplays(var NumDisplays:LongWord):LongWord; inline;
Description: Get the number of framebuffer displays (Where Applicable)


[Expand]
function FramebufferGetDisplayId(DisplayNum:LongWord):LongWord; inline;
Description: Get the display id for the specified display number (Where Applicable)


[Expand]
function FramebufferSetDisplayNum(DisplayNum:LongWord):LongWord; inline;
Description: Set the current framebuffer display number (Where Applicable)


[Expand]
function FramebufferGetDisplaySettings(DisplayNum:LongWord; var DisplaySettings:TDisplaySettings):LongWord; inline;
Description: Get the display settings for the specified display number (Where Applicable)


[Expand]
function FramebufferDisplayIdToName(DisplayId:LongWord):String; inline;
Description: Get the name for the specified display id (Where Applicable)


Touch functions

[Expand]
function TouchGetBuffer(var Address:PtrUInt):LongWord; inline;
Description: Get the Touchscreen memory buffer (Where Applicable)


[Expand]
function TouchSetBuffer(Address:PtrUInt):LongWord; inline;
Description: Set the Touchscreen memory buffer (Where Applicable)


Cursor functions

[Expand]
function CursorSetDefault:LongWord; inline;
Description: Set the default Cursor Info (Where Applicable)


[Expand]
function CursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord; inline;
Description: Set the Cursor Info (Width and Height, Hotspot and Pixel image)


[Expand]
function CursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord; inline;
Description: Set the Cursor State (Enabled, X and Y)


DMA functions

[Expand]
function DMAAvailable:Boolean; inline;
Description: Check if DMA is currently available


[Expand]
function DMATransfer(Data:PDMAData; Direction,Peripheral:LongWord):LongWord; inline;
Description: Perform a DMA transfer using the list of DMA data blocks provided


[Expand]
function DMAFillMemory(Dest:Pointer; Size:LongWord; Value:Byte):LongWord; inline;
Description: Fill memory at the destination address using DMA


[Expand]
function DMACopyMemory(Source,Dest:Pointer; Size:LongWord):LongWord; inline;
Description: Copy memory from the source to the destination address using DMA


[Expand]
function DMAReadPeripheral(Address,Dest:Pointer; Size,Peripheral:LongWord):LongWord; inline;
Description: Read from a peripheral address to the destination address using DMA


[Expand]
function DMAWritePeripheral(Source,Address:Pointer; Size,Peripheral:LongWord):LongWord; inline;
Description: Write to a peripheral address from the source address using DMA


[Expand]
function DMAAllocateBuffer(Size:LongWord):Pointer; inline;
Description: Allocate a buffer compatible with DMA memory reads or writes


[Expand]
function DMAAllocateBufferEx(var Size:LongWord):Pointer; inline;
Description: Allocate a buffer compatible with DMA memory reads or writes


[Expand]
function DMAReleaseBuffer(Buffer:Pointer):LongWord; inline;
Description: Release a buffer allocated with DMAAllocateBuffer


[Expand]
function DMAGetChannels:LongWord; inline;
Description: Get the currently enabled DMA channel bitmap (If supported)


Handle functions

[Expand]
function HandleCreate(Data:THandle; AType:LongWord):THandle; inline;
Description: Create and Open a new unnamed handle of the supplied type


[Expand]
function HandleCreateEx(const Name:String; Flags:LongWord; Data:THandle; AType:LongWord):PHandleEntry;
Description: Create and Open a new named or unnamed handle of the supplied type


[Expand]
function HandleDestroy(Handle:THandle):LongWord;
Description: Close and Destroy a named or unnamed handle


[Expand]
function HandleGet(Handle:THandle):PHandleEntry;
Description: Get the handle entry for the supplied handle


[Expand]
function HandleFind(const Name:String):PHandleEntry;
Description: Find an existing named handle of the supplied type


[Expand]
function HandleEnumerate(Callback:THandleEnumerate; Data:Pointer):LongWord;
Description: Enumerate all handles in the handle table


[Expand]
function HandleOpen(const Name:String):THandle;
Description: Open an existing named handle


[Expand]
function HandleClose(Handle:THandle):LongWord; inline;
Description: Close a named or unnamed handle


[Expand]
function HandleDuplicate(Handle:THandle):THandle;
Description: Duplicate an existing named or unnamed handle


GPIO functions

[Expand]
function GPIOAvailable:Boolean; inline;
Description: Check if a GPIO device is available


[Expand]
function GPIORead(Reg:LongWord):LongWord; inline;
Description: Perform a direct read from a GPIO register


[Expand]
procedure GPIOWrite(Reg,Value:LongWord); inline;
Description: Perform a direct write to a GPIO register


[Expand]
function GPIOInputGet(Pin:LongWord):LongWord; inline;
Description: Get the current state of a GPIO input pin


[Expand]
function GPIOInputWait(Pin,Trigger,Timeout:LongWord):LongWord; inline;
Description: Wait for the state of a GPIO input pin to change


[Expand]
function GPIOInputEvent(Pin,Trigger,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord; inline;
Description: Schedule a function to be called when the state of a GPIO input pin changes


[Expand]
function GPIOOutputSet(Pin,Level:LongWord):LongWord; inline;
Description: Change the state of a GPIO output pin


[Expand]
function GPIOLevelGet(Pin:LongWord):LongWord; inline;
Description: Get the current level (state) of a GPIO pin


[Expand]
function GPIOLevelSet(Pin,Level:LongWord):LongWord; inline;
Description: Set the level (state) of a GPIO pin


[Expand]
function GPIOPullGet(Pin:LongWord):LongWord; inline;
Description: Get the current pull state of a GPIO pin


[Expand]
function GPIOPullSelect(Pin,Mode:LongWord):LongWord; inline;
Description: Change the pull state of a GPIO pin


[Expand]
function GPIOFunctionGet(Pin:LongWord):LongWord; inline;
Description: Get the current function of a GPIO pin


[Expand]
function GPIOFunctionSelect(Pin,Mode:LongWord):LongWord; inline;
Description: Change the function of a GPIO pin


Virtual GPIO functions

[Expand]
function VirtualGPIOInputGet(Pin:LongWord):LongWord; inline;
Description: Get the current state of a virtual GPIO input pin


[Expand]
function VirtualGPIOOutputSet(Pin,Level:LongWord):LongWord; inline;
Description: Set the state of a virtual GPIO output pin


[Expand]
function VirtualGPIOLevelGet(Pin:LongWord):LongWord; inline;
Description: Get the current level (state) of a virtual GPIO pin


[Expand]
function VirtualGPIOLevelSet(Pin,Level:LongWord):LongWord; inline;
Description: Set the level (state) of a virtual GPIO pin


[Expand]
function VirtualGPIOFunctionGet(Pin:LongWord):LongWord; inline;
Description: Get the current function of a virtual GPIO pin


[Expand]
function VirtualGPIOFunctionSelect(Pin,Mode:LongWord):LongWord; inline;
Description: Change the function of a virtual GPIO pin


SPI functions

[Expand]
function SPIAvailable:Boolean; inline;
Description: Check if an SPI device is available


[Expand]
function SPIStart(Mode,ClockRate,ClockPhase,ClockPolarity:LongWord):LongWord; inline;
Description: Start the default SPI device ready for writing and reading


[Expand]
function SPIStop:LongWord; inline;
Description: Stop the default SPI device and terminate writing and reading


[Expand]
function SPIRead(ChipSelect:Word; Dest:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Read data from the default SPI device. Because SPI writes and then reads for each byte, dummy data will be written for each byte to be read.


[Expand]
function SPIWrite(ChipSelect:Word; Source:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Write data to the default SPI device. Because SPI writes and then reads for each byte, received data will be discarded for each byte written.


[Expand]
function SPIWriteRead(ChipSelect:Word; Source,Dest:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Write data to and Read data from the default SPI device in one operation. Because SPI writes and then reads for each byte, both the source and dest buffers must be the same size.


[Expand]
function SPIGetMode:LongWord; inline;
Description: Get the device mode of the default SPI device


[Expand]
function SPISetMode(Mode:LongWord):LongWord; inline;
Description: Set the device mode for the default SPI device


[Expand]
function SPIGetClockRate(ChipSelect:Word):LongWord; inline;
Description: Get the clock rate of the default SPI device


[Expand]
function SPISetClockRate(ChipSelect:Word;ClockRate:LongWord):LongWord; inline;
Description: Set the clock rate for the default SPI device


[Expand]
function SPIGetClockPhase:LongWord; inline;
Description: Get the clock phase of the default SPI device


[Expand]
function SPISetClockPhase(ClockPhase:LongWord):LongWord; inline;
Description: Set the clock phase for the default SPI device


[Expand]
function SPIGetClockPolarity:LongWord; inline;
Description: Get the clock polarity of the default SPI device


[Expand]
function SPISetClockPolarity(ClockPolarity:LongWord):LongWord; inline;
Description: Set the clock polarity for the default SPI device


[Expand]
function SPIGetSelectPolarity(ChipSelect:Word):LongWord; inline;
Description: Get the chip select polarity of the default SPI device


[Expand]
function SPISetSelectPolarity(ChipSelect:Word; SelectPolarity:LongWord):LongWord; inline;
Description: Set the chip select polarity for the default SPI device


[Expand]
function SPIGetDescription(Id:LongWord):String; inline;
Description: Return the device description of an SPI device


I2C functions

[Expand]
function I2CAvailable:Boolean; inline;
Description: Check if an I2C device is available


[Expand]
function I2CStart(Rate:LongWord):LongWord; inline;
Description: Start the default I2C device ready for reading and writing


[Expand]
function I2CStop:LongWord; inline;
Description: Stop the default I2C device and terminate reading and writing


[Expand]
function I2CRead(Address:Word; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Read data from the default I2C device


[Expand]
function I2CWrite(Address:Word; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Write data to the default I2C device


[Expand]
function I2CWriteRead(Address:Word; Initial:Pointer; Len:LongWord; Data:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Write data to and Read data from the default I2C device in one operation. Useful for devices that require a register address specified before a read (eg EEPROM devices)


[Expand]
function I2CWriteWrite(Address:Word; Initial:Pointer; Len:LongWord; Data:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Write 2 data blocks to the default I2C device in one operation. Useful for devices that require a register address specified before a write (eg EEPROM devices)


[Expand]
function I2CGetRate:LongWord; inline;
Description: Get the clock rate of the default I2C device


[Expand]
function I2CSetRate(Rate:LongWord):LongWord; inline;
Description: Set the clock rate for the default I2C device


[Expand]
function I2CGetAddress:Word; inline;
Description: Get the slave address for the default I2C device


[Expand]
function I2CSetAddress(Address:Word):LongWord; inline;
Description: Set the slave address for the default I2C device


[Expand]
function I2CGetDescription(Id:LongWord):String; inline;
Description: Get the device description of an I2C device


[Expand]
function I2CSlaveGetDescription(Id:LongWord):String; inline;
Description: Get the device description of an I2C slave device


PWM functions

[Expand]
function PWMAvailable:Boolean; inline;
Description: Check if a PWM device is available


[Expand]
function PWMStart:LongWord; inline;
Description: Start the default PWM device


[Expand]
function PWMStop:LongWord; inline;
Description: Stop the default PWM device


[Expand]
function PWMWrite(Value:LongWord):LongWord; inline;
Description: Write a value to the default PWM device


[Expand]
function PWMSetMode(Mode:LongWord):LongWord; inline;
Description: Set the mode for the default PWM device


[Expand]
function PWMSetRange(Range:LongWord):LongWord; inline;
Description: Set the range for the default PWM device


[Expand]
function PWMSetFrequency(Frequency:LongWord):LongWord; inline;
Description: Set the clock frequency for the default PWM device


[Expand]
function PWMConfigure(DutyNS,PeriodNS:LongWord):LongWord; inline;
Description: Set the configuration of the default PWM device


[Expand]
function PWMGetDescription(Id,Channel:LongWord):String; inline;
Description: Get the device description of an PWM device


RTC functions

[Expand]
function RTCAvailable:Boolean; inline;
Description: Check if a Real Time Clock (RTC) device is available


[Expand]
function RTCGetTime:Int64; inline;
Description: Get the current time from a Real Time Clock device


[Expand]
function RTCSetTime(const Time:Int64):Int64; inline;
Description: Set the current time for a Real Time Clock device


UART functions

[Expand]
function UARTGetDescription(Id:LongWord):String; inline;
Description: Get the device description of a UART device


Serial functions

[Expand]
function SerialAvailable:Boolean; inline;
Description: Check if a Serial device is available


[Expand]
function SerialOpen(BaudRate,DataBits,StopBits,Parity,FlowControl,ReceiveDepth,TransmitDepth:LongWord):LongWord; inline;
Description: Open the default Serial device ready for sending and receiving


[Expand]
function SerialClose:LongWord; inline;
Description: Close the default Serial device and terminate sending and receiving


[Expand]
function SerialRead(Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Read data from the default Serial device


[Expand]
function SerialWrite(Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord; inline;
Description: Write data to the default Serial device


Peripheral functions

[Expand]
function PeripheralGetBase:PtrUInt; inline;
Description: Get the base address of the peripherals


[Expand]
function PeripheralGetSize:LongWord; inline;
Description: Get the total size of the peripherals


[Expand]
function PeripheralRead(Base,Reg:LongWord):LongWord; inline;
Description: Read from a Peripheral register


[Expand]
procedure PeripheralWrite(Base,Reg,Value:LongWord); inline;
Description: Write to a Peripheral register


[Expand]
function LocalPeripheralGetBase:PtrUInt; inline;
Description: Get the base address of the local peripherals (Peripherals local to each CPU)


[Expand]
function LocalPeripheralGetSize:LongWord; inline;
Description: Get the total size of the local peripherals (Peripherals local to each CPU)


System functions

[Expand]
function GetSP:PtrUInt; inline;
Description: Get the current stack pointer (SP)


[Expand]
function GetPC:PtrUInt; inline;
Description: Get the current program counter (PC)


[Expand]
function GetIRQ:Boolean; inline;
Description: Get Interrupts (IRQ) state


[Expand]
procedure EnableIRQ; inline;
Description: Enable Interrupts (IRQ) unconditionally


[Expand]
procedure DisableIRQ; inline;
Description: Disable Interrupts (IRQ) unconditionally


[Expand]
function SaveIRQ:TIRQMask; inline;
Description: Disable Interrupts (IRQ) and return the previous state


[Expand]
function RestoreIRQ(IRQMask:TIRQMask):TIRQMask; inline;
Description: Restore Interrupts (IRQ) to a previous state


[Expand]
function GetFIQ:Boolean; inline;
Description: Get Fast Interrupts (FIQ) state


[Expand]
procedure EnableFIQ; inline;
Description: Enable Fast Interrupts (FIQ) unconditionally


[Expand]
procedure DisableFIQ; inline;
Description: Disable Fast Interrupts (FIQ) unconditionally


[Expand]
function SaveFIQ:TFIQMask; inline;
Description: Disable Fast Interrupts (FIQ) and return the previous state


[Expand]
function RestoreFIQ(FIQMask:TFIQMask):TFIQMask; inline;
Description: Restore Fast Interrupts (FIQ) to a previous state


[Expand]
procedure EnableIRQFIQ; inline;
Description: Enable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally


[Expand]
procedure DisableIRQFIQ; inline;
Description: Disable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally


[Expand]
function SaveIRQFIQ:TIRQFIQMask; inline;
Description: Disable Interrupts and Fast Interrupts (IRQ/FIQ) and return the previous state


[Expand]
function RestoreIRQFIQ(IRQFIQMask:TIRQFIQMask):TIRQFIQMask; inline;
Description: Restore Interrupts and Fast Interrupts (IRQ/FIQ) to a previous state


[Expand]
function GetAbort:Boolean; inline;
Description: Get Abort state


[Expand]
procedure EnableAbort; inline;
Description: Enable Abort unconditionally


[Expand]
procedure DisableAbort; inline;
Description: Disable Abort unconditionally


[Expand]
function SaveAbort:TAbortMask; inline;
Description: Disable Abort and return the previous state


[Expand]
function RestoreAbort(AbortMask:TAbortMask):TAbortMask; inline;
Description: Restore Abort to a previous state


[Expand]
procedure Halt; inline;
Description: Halt the current processor


[Expand]
procedure Pause; inline;
Description: Pause the current processor and wait for an Event or Interrupt (Where Applicable)


[Expand]
function HaltThread(ExitCode:LongWord):LongWord; inline;
Description: Halt the current thread


[Expand]
procedure SendEvent; inline;
Description: Send a signal that an Event has occurred (Where Applicable)


[Expand]
procedure WaitForEvent; inline;
Description: Wait for an Event to occur (Where Applicable)


[Expand]
procedure WaitForInterrupt; inline;
Description: Wait for an Interrupt to occur (Where Applicable)


[Expand]
procedure ReadMemoryBarrier; inline;
Description: Perform a Read Memory Barrier operation (Where Applicable)


[Expand]
procedure WriteMemoryBarrier; inline;
Description: Perform a Write Memory Barrier operation (Where Applicable)


[Expand]
procedure DataMemoryBarrier; inline;
Description: Perform a Data Memory Barrier operation (Where Applicable)


[Expand]
procedure DataSynchronizationBarrier; inline;
Description: Perform a Data Synchronization Barrier operation (Where Applicable)


[Expand]
procedure InstructionMemoryBarrier; inline;
Description: Perform an Instruction Memory Barrier operation (Where Applicable)


[Expand]
procedure InvalidateTLB; inline;
Description: Perform an Invalidate Entire TLB operation (Where Applicable)


[Expand]
procedure InvalidateDataTLB; inline;
Description: Perform an Invalidate Data TLB operation (Where Applicable)


[Expand]
procedure InvalidateInstructionTLB; inline;
Description: Perform an Invalidate Instruction TLB operation (Where Applicable)


[Expand]
procedure InvalidateCache; inline;
Description: Perform an Invalidate Entire Cache operation (Where Applicable)


[Expand]
procedure CleanDataCache; inline;
Description: Perform a Clean Data Cache operation (Where Applicable)


[Expand]
procedure InvalidateDataCache; inline;
Description: Perform an Invalidate Data Cache operation (Where Applicable)


[Expand]
procedure CleanAndInvalidateDataCache; inline;
Description: Perform a Clean and Invalidate Data Cache operation (Where Applicable)


[Expand]
procedure InvalidateInstructionCache; inline;
Description: Perform an Invalidate Instruction Cache operation (Where Applicable)


[Expand]
procedure CleanDataCacheRange(Address:PtrUInt; Size:LongWord); inline;
Description: Perform a Clean Data Cache Range operation (Where Applicable)


[Expand]
procedure InvalidateDataCacheRange(Address:PtrUInt; Size:LongWord); inline;
Description: Perform an Invalidate Data Cache Range operation (Where Applicable)


[Expand]
procedure CleanAndInvalidateDataCacheRange(Address:PtrUInt; Size:LongWord); inline;
Description: Perform a Clean and Invalidate Data Cache Range operation (Where Applicable)


[Expand]
procedure InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord); inline;
Description: Perform an Invalidate Instruction Cache Range operation (Where Applicable)


[Expand]
procedure FlushPrefetchBuffer; inline;
Description: Perform a Flush Prefetch Buffer operation (Where Applicable)


[Expand]
procedure FlushBranchTargetCache; inline;
Description: Perform a Flush Entire Branch Target Cache operation (Where Applicable)


[Expand]
procedure ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); inline;
Description: Perform a Context Switch from one thread to another


[Expand]
procedure ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); inline;
Description: Perform a Context Switch from one thread to another from an IRQ handler


[Expand]
procedure ContextSwitchFIQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); inline;
Description: Perform a Context Switch from one thread to another from an FIQ handler


[Expand]
procedure ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle); inline;
Description: Perform a Context Switch from one thread to another from a software interrupt handler


[Expand]
function InterlockedOr(var Target:LongInt;Value:LongInt):LongInt; inline;
Description: Perform an atomic OR operation


[Expand]
function InterlockedXor(var Target:LongInt; Value:LongInt):LongInt; inline;
Description: Perform an atomic XOR operation


[Expand]
function InterlockedAnd(var Target:LongInt; Value:LongInt):LongInt; inline;
Description: Perform an atomic AND operation


[Expand]
function InterlockedDecrement(var Target:LongInt):LongInt; inline;
Description: Perform an atomic decrement operation


[Expand]
function InterlockedIncrement(var Target:LongInt):LongInt; inline;
Description: Perform an atomic increment operation


[Expand]
function InterlockedExchange(var Target:LongInt; Source:LongInt):LongInt; inline;
Description: Perform an atomic exchange operation


[Expand]
function InterlockedAddExchange(var Target:LongInt; Source:LongInt):LongInt; inline;
Description: Perform an atomic add and exchange operation


[Expand]
function InterlockedCompareExchange(var Target:LongInt; Source,Compare:LongInt):LongInt; inline;
Description: Perform an atomic compare and exchange operation


[Expand]
function PageTableGetLevels:LongWord; inline;
Description: Get the number of page table levels for the current platform


[Expand]
function PageDirectoryGetBase:PtrUInt; inline;
Description: Get the base address of the first level page directory (Where applicable)


[Expand]
function PageDirectoryGetSize:LongWord; inline;
Description: Get the size of the first level page directory (Where applicable)


[Expand]
function PageTableGetBase:PtrUInt; inline;
Description: Get the base address of the first or second level page table


[Expand]
function PageTableGetSize:LongWord; inline;
Description: Get the size of the first or second level page table


[Expand]
function PageTableGetEntry(Address:PtrUInt):TPageTableEntry; overload;
Description: Get the Page Table entry that corresponds to the supplied virtual address


[Expand]
procedure PageTableGetEntry(Address:PtrUInt; var Entry:TPageTableEntry); inline; overload;
Description: Get the Page Table entry that corresponds to the supplied virtual address


[Expand]
function PageTableSetEntry(const Entry:TPageTableEntry):LongWord; inline;
Description: Set the Page Table entry that corresponds to the supplied virtual address


[Expand]
function PageTableGetPageSize(Address:PtrUInt):LongWord; inline;
Description: Get the Size from the Page Table page that corresponds to the supplied virtual address


[Expand]
function PageTableGetPageFlags(Address:PtrUInt):LongWord; inline;
Description: Get the Flags from the Page Table page that corresponds to the supplied virtual address


[Expand]
function PageTableGetPageRange(Address:PtrUInt):LongWord; inline;
Description: Get the Physical Range from the Page Table page that corresponds to the supplied virtual address


[Expand]
function PageTableGetPagePhysical(Address:PtrUInt):PtrUInt; inline;
Description: Get the Physical Address from the Page Table page that corresponds to the supplied virtual address


[Expand]
function PageTablesGetAddress:PtrUInt; inline;
Description: Get the address of the second or third level page tables


[Expand]
function PageTablesGetLength:LongWord; inline;
Description: Get the size of the second or third level page tables


[Expand]
function PageTablesGetCount:LongWord; inline;
Description: Get the number of second or third level page tables


[Expand]
function PageTablesGetShift:LongWord; inline;
Description: Get the multiplier to convert count to actual size of the second or third level page tables


[Expand]
function PageTablesGetNext:PtrUInt; inline;
Description: Get the address of the next available second or third level page table


[Expand]
function PageTablesGetUsed:LongWord; inline;
Description: Get the number of used second or third level page tables


[Expand]
function PageTablesGetFree:LongWord; inline;
Description: Get the number of available second or third level page tables


[Expand]
function VectorTableGetBase:PtrUInt; inline;
Description: Get the base address of the interrupt vector table


[Expand]
function VectorTableGetSize:LongWord; inline;
Description: Get the size in bytes of the interrupt vector table


[Expand]
function VectorTableGetCount:LongWord; inline;
Description: Get the number of entries in the interrupt vector table


[Expand]
function VectorTableGetEntry(Number:LongWord):PtrUInt; inline;
Description: Get the interrupt vector table entry that corresponds to the supplied number


[Expand]
function VectorTableSetEntry(Number:LongWord; Address:PtrUInt):LongWord; inline;
Description: Set the interrupt vector table entry that corresponds to the supplied number


Exception functions

[Expand]
procedure HardwareException(AType:LongWord; Address,Frame:Pointer);
Description: To be documented


[Expand]
procedure UnhandledException(Obj:TObject; Addr:CodePointer; FrameCount:LongInt; Frames:PCodePointer);
Description: To be documented


Text IO functions

[Expand]
procedure TextIOOpen(var F:Text; AWrite:TTextIOWriteChar; ARead:TTextIOReadChar; AMode:LongInt; AUserData:Pointer);
Description: Open a text file with the input or output directed to the default text IO device


[Expand]
procedure TextIOClose(var T:TextRec);
Description: Close a text file that was opened by TextIOOpen (Dummy only)


[Expand]
procedure TextIORead(var T:TextRec);
Description: Internal read function for text files using the text IO device


[Expand]
procedure TextIOWrite(var T:TextRec);
Description: Internal write function for text files using the text IO device


[Expand]
function TextIOReadData(ARead:TTextIOReadChar; AUserData:Pointer; ABuffer:PChar; ACount:LongInt):LongInt;
Description: Internal read function for text files using the text IO device


[Expand]
function TextIOWriteChar(ACh:Char; AUserData:Pointer):Boolean; inline;
Description: Output a character to the default text IO device


[Expand]
function TextIOReadChar(var ACh:Char; AUserData:Pointer):Boolean; inline;
Description: Input a character from the default text IO device


[Expand]
function TextIOWriteBuffer(ABuffer:PChar; ACount:LongInt; AUserData:Pointer):LongInt;
Description: Output one or more characters to the default text IO device


Console functions

[Expand]
function ConsoleGetKey(var ACh:Char; AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsolePeekKey(var ACh:Char; AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsoleWriteChar(ACh:Char; AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsoleReadChar(var ACh:Char; AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsoleReadWideChar(var ACh:WideChar; AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsoleHideMouse(AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsoleShowMouse(X,Y:LongWord; AUserData:Pointer):Boolean; inline;
Description: To be documented


[Expand]
function ConsoleReadMouse(var X,Y,Buttons:LongWord; AUserData:Pointer):Boolean; inline;
Description: To be documented


CodePage functions

[Expand]
function CodePageToWideChar(Ch:Char):WideChar; inline;
Description: To be documented


[Expand]
function WideCharToCodePage(Ch:WideChar):Char; inline;
Description: To be documented


Name functions

[Expand]
function HostGetName:String; inline;
Description: To be documented


[Expand]
function HostSetName(const AName:String):Boolean; inline;
Description: To be documented


[Expand]
function HostGetDomain:String; inline;
Description: To be documented


[Expand]
function HostSetDomain(const ADomain:String):Boolean; inline;
Description: To be documented


Module functions

[Expand]
function ModuleLoad(const AName:String):THandle; inline;
Description: To be documented


[Expand]
function ModuleUnload(AHandle:THandle):Boolean; inline;
Description: To be documented


[Expand]
function ModuleGetName(AHandle:THandle):String; inline;
Description: To be documented


Symbol functions

[Expand]
function SymbolAdd(AHandle:THandle; const AName:String; AAddress:PtrUInt):Boolean; inline;
Description: To be documented


[Expand]
function SymbolRemove(AHandle:THandle; const AName:String):Boolean; inline;
Description: To be documented


[Expand]
function SymbolGetAddress(AHandle:THandle; const AName:String):PtrUInt; inline;
Description: To be documented


Logging functions

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


[Expand]
procedure LoggingOutputEx(AFacility,ASeverity:LongWord; const ATag,AContent:String); inline;
Description: To be documented


Environment functions

[Expand]
function EnvironmentGet(const AName:String):String; inline;
Description: Locate an environment variable and return the current value


[Expand]
function EnvironmentSet(const AName,AValue:String):LongWord; inline;
Description: Add an environment variable or update an existing variable


[Expand]
function EnvironmentCount(AReset:Boolean):LongWord; inline;
Description: Get the current number of environment variables


[Expand]
function EnvironmentIndex(const AName:String):LongWord; inline;
Description: Locate an environment variable and return the index


[Expand]
function EnvironmentString(AIndex:LongWord):String; inline;
Description: Get an environment variable by index


[Expand]
function EnvironmentSetDefault(const AName,AValue:String):LongWord;
Description: Default version of EnvironmentSet function used if no handler is registered


Utility functions

[Expand]
function FirstBitSet(Value:LongWord):LongWord; inline;
Description: Find the first set bit in a nonzero 32 bit value


[Expand]
function CountLeadingZeros(Value:LongWord):LongWord; inline;
Description: Count the number of leading 0 bits in a nonzero 32 bit value


[Expand]
function PhysicalToIOAddress(Address:Pointer):PtrUInt; inline;
Description: Convert Physical address to an IO addresses (Where Applicable)


[Expand]
function IOAddressToPhysical(Address:Pointer):PtrUInt; inline;
Description: Convert an IO address to a Physical address (Where Applicable)


[Expand]
function PhysicalToBusAddress(Address:Pointer):PtrUInt; inline;
Description: Convert a Physical address to a Bus address (Where Applicable)


[Expand]
function BusAddressToPhysical(Address:Pointer):PtrUInt; inline;
Description: Convert a Bus address to a Physical address (Where Applicable)


[Expand]
procedure NanosecondDelay(Nanoseconds:LongWord);
Description: Non sleep wait for a number of nanoseconds


[Expand]
procedure MicrosecondDelay(Microseconds:LongWord);
Description: Non sleep wait for a number of microseconds


[Expand]
procedure MillisecondDelay(Milliseconds:LongWord);
Description: Non sleep wait for a number of milliseconds


[Expand]
procedure NanosecondDelayEx(Nanoseconds:LongWord; Wait:Boolean);
Description: Non sleep wait for a number of nanoseconds


[Expand]
procedure MicrosecondDelayEx(Microseconds:LongWord; Wait:Boolean);
Description: Non sleep wait for a number of microseconds


[Expand]
procedure MillisecondDelayEx(Milliseconds:LongWord; Wait:Boolean);
Description: Non sleep wait for a number of milliseconds


System random functions

[Expand]
procedure SystemRandomize;
Description: To be documented


Dos conversion functions

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


Dos info/date/time functions

[Expand]
function DosDosVersion:Word;
Description: To be documented


[Expand]
procedure DosGetDate(var Year,Month,MDay,WDay:Word);
Description: To be documented


[Expand]
procedure DosSetDate(Year,Month,Day:Word);
Description: To be documented


[Expand]
procedure DosGetTime(var Hour,Minute,Second,Sec100:Word);
Description: To be documented


[Expand]
procedure DosSetTime(Hour,Minute,Second,Sec100:Word);
Description: To be documented


Dos environment functions

[Expand]
function DosEnvCount:Longint;
Description: To be documented


[Expand]
function DosEnvStr(Index:LongInt):ShortString;
Description: To be documented


[Expand]
function DosGetEnv(EnvVar:ShortString):ShortString; 
Description: To be documented


SysUtils tick functions

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


[Expand]
function SysUtilsGetTickCount64:QWord;
Description: To be documented


SysUtils locale functions

[Expand]
procedure SysUtilsGetLocalTime(var SystemTime:TSystemTime);
Description: Get the current local time as a SystemTime value


[Expand]
procedure SysUtilsSetLocalTime(const SystemTime:TSystemTime);
Description: Set the current local time from a SystemTime value


[Expand]
function SysUtilsGetUniversalTime(var SystemTime:TSystemTime):Boolean;
Description: Get the current UTC time as a SystemTime value


[Expand]
function SysUtilsGetLocalTimeOffset:Integer;
Description: Get the current local time offset value


[Expand]
function SysUtilsGetLocalTimeOffsetEx(const DateTime:TDateTime; const InputIsUTC:Boolean; out Offset:Integer):Boolean;
Description: Get the current local time offset value at the given date and time


Platform helper functions

[Expand]
function HandleTypeToString(HandleType:LongWord):String;
Description: To be documented


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


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


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


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


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


Return to Unit Reference