Return to Unit Reference
Description
To be documented
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
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)
Note
|
Secondary CPU boot is performed by SecondaryInit in Threads
|
[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)
Boot functions
[Expand]
procedure BootBlink; inline;
Description: Blink the Activity LED (Where Applicable)
Note
|
Intended for startup diagnostics when bootstrapping a new board
|
[Expand]
procedure BootOutput(Value:LongWord); inline;
Description: Output boot time information (Where Applicable)
Note
|
Intended for startup diagnostics when bootstrapping a new board
|
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
Return
|
The 32 bit current value of the counter or 0 on failure
|
[Expand]
function CounterRead64:Int64; inline;
Description: Read the current value of the default counter
Return
|
The 64 bit current value of the counter or 0 on failure
|
[Expand]
function CounterWait:LongWord; inline;
Description: Wait for the current interval to expire on the default counter
Return
|
ERROR_SUCCESS if the interval expired or another error code on failure
|
[Expand]
function CounterEvent(Callback:TCounterCallback; Data:Pointer):LongWord; inline;
Description: Schedule a function to be called when the current interval expires on the default counter
Callback
|
The function to be called when the interval expires
|
Data
|
A pointer to be pass to the function when the interval expires (Optional)
|
Return
|
ERROR_SUCCESS if the callback was scheduled successfully or another error code on failure
|
[Expand]
function CounterCancel:LongWord; inline;
Description: Cancel a previously scheduled event callback function on the default counter
Return
|
ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure
|
[Expand]
function CounterGetRate:LongWord; inline;
Description: Get the current clock rate in Hz of the default counter
Return
|
The current clock rate in Hz or 0 on failure
|
[Expand]
function CounterSetRate(Rate:LongWord):LongWord; inline;
Description: Set the current clock rate in Hz of the default counter
Rate
|
The clock rate in Hz to set
|
Return
|
ERROR_SUCCESS if the clock rate was set or another error code on failure
|
[Expand]
function CounterGetInterval:LongWord; inline;
Description: Get the current interval in ticks of the default counter
Return
|
The current interval in ticks or 0 on failure (or not set)
|
Note
|
The tick rate is determined by the clock rate
|
[Expand]
function CounterSetInterval(Interval:LongWord):LongWord; inline;
Description: Set the current interval in ticks of the default counter
Interval
|
The interval in ticks to set
|
Return
|
ERROR_SUCCESS if the interval was set or another error code on failure
|
Note
|
The tick rate is determined by the clock rate
|
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
Random number functions
[Expand]
function RandomAvailable:Boolean; inline;
Description: Check if a hardware random number generator is currently available
Note
|
The software random number generator from the RTL is always 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 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
Note
|
If the IRQ number is already registered then the request will fail
|
[Expand]
function ReleaseIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified IRQ number
Note
|
If the IRQ number is not currently registered then the request will fail
|
[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
Note
|
If the IRQ number is already registered then the request will fail
|
[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
Note
|
If the IRQ number is not currently registered then the request will fail
|
Fast interrupt request (FIQ) functions
[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)
Note
|
If the FIQ number is already registered then the request will fail
|
[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)
Note
|
If the FIQ number is not currently registered then the request will fail
|
[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)
Note
|
If the FIQ number is already registered then the request will fail
|
[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)
Note
|
If the FIQ number is not currently registered then the request will fail
|
System call (Software Interrupt or SWI) functions
[Expand]
procedure SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); inline;
Description: Perform a System Call function with the supplied parameters (Where Applicable)
Number
|
The System Call number to be called
|
Param1
|
The first parameter to pass to the function (Optional / Function defined)
|
Param2
|
The second parameter to pass to the function (Optional / Function defined)
|
Param3
|
The third parameter to pass to the function (Optional / Function defined)
|
[Expand]
function RegisterSystemCall(Number:LongWord; Handler:TSystemCallHandler):LongWord; inline;
Description: Request registration of the supplied handler to the specified System Call number (Where Applicable)
Number
|
The System Call number to be registered
|
Handler
|
The handler function to be registered
|
Note
|
If the System Call number is already registered then the request will fail
|
[Expand]
function DeregisterSystemCall(Number:LongWord; Handler:TSystemCallHandler):LongWord; inline;
Description: Request deregistration of the supplied handler from the specified System Call number (Where Applicable)
Number
|
The System Call number to be deregistered
|
Handler
|
The handler function to be deregistered
|
Note
|
If the System Call number is not currently registered then the request will fail
|
[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)
CPUID
|
The CPU ID to register the System Call against (or CPU_ID_ALL)
|
Number
|
The System Call number to be registered
|
Handler
|
The handler function to be registered (Optional) (Handler or HandlerEx must be specified, not both)
|
HandlerEx
|
The extended handler function to be registered (Optional) (Handler or HandlerEx must be specified, not both)
|
Note
|
If the System Call number is already registered then the request will fail
|
[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)
CPUID
|
The CPU ID to deregister the System Call from (or CPU_ID_ALL)
|
Number
|
The System Call number to be deregistered
|
Handler
|
The handler function to be deregistered (Optional) (Handler or HandlerEx must be specified, not both)
|
HandlerEx
|
The extended handler function to be deregistered (Optional) (Handler or HandlerEx must be specified, not both)
|
Note
|
If the System Call number is not currently registered then the request will fail
|
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; inline;
Description: Get the interrupt entry for the specified interrupt number
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; inline;
Description: Get the local interrupt entry for the specified interrupt number (Where Applicable)
System call entry 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; inline;
Description: Restart the system
[Expand]
function SystemShutdown(Delay:LongWord):LongWord; inline;
Description: Shutdown the system
[Expand]
function SystemGetUptime:Int64; inline;
Description: Get the current system up time in 100 nanosecond ticks since 1/1/1601
Return
|
The current system up time
|
Note
|
This is the same time format as Windows FILE_TIME and is intended to allow compatibility with file system functions etc
|
[Expand]
function SystemGetCommandLine:String; inline;
Description: Get the current command line
[Expand]
function SystemGetEnvironment:Pointer; inline;
Description: Get the current environment
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
Note
|
The return value is specific to the CPU type
|
[Expand]
function CPUGetState:LongWord; inline;
Description: Get the current CPU state
[Expand]
function CPUGetCurrent:LongWord; inline;
Description: Get the current CPU ID
[Expand]
function CPUGetMemory(var Address:PtrUInt; var Length:LongWord):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 ulitization of the specified CPU in percentage
CPUID
|
The CPU to get utilization from or CPU_ID_ALL for average of all CPUs
|
[Expand]
function CPUGetUtilization(CPUID:LongWord):LongWord; inline;
Description: Get the last second ulitization of the specified CPU
CPUID
|
The CPU to get utilization from or CPU_ID_ALL for average of all CPUs
|
[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
Note
|
The return value is specific to the CPU type and model
|
[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:LongWord):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
Note
|
If data cache is not supported, the size returned is zero. If separate data and instruction caches are not supported, the size returned is the unified size.
|
[Expand]
function L1DataCacheGetLineSize:LongWord; inline;
Description: Get the L1 data cache line size for this board
Note
|
If data cache is not supported, the size returned is zero. If separate data and instruction caches are not supported, the size returned is the unified size.
|
[Expand]
function L1InstructionCacheGetSize:LongWord; inline;
Description: Get the L1 instruction cache size for this board
Note
|
If instruction cache is not supported, the size returned is zero. If separate data and instruction caches are not supported, the size returned is the unified size.
|
[Expand]
function L1InstructionCacheGetLineSize:LongWord; inline;
Description: Get the L1 instruction cache line size for this board
Note
|
If instruction cache is not supported, the size returned is zero. If separate data and instruction caches are not supported, the size returned is the unified size.
|
[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
Note
|
If L2 cache is not supported, the size returned is zero
|
[Expand]
function L2CacheGetLineSize:LongWord; inline;
Description: Get the L2 cache line size for this board
Note
|
If L2 cache is not supported, the size returned is zero
|
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)
Firmware functions
[Expand]
function FirmwareGetRevision:LongWord; inline;
Description: Get the current board Firmware Revision
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:LongWord; 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)
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 ClockGetTime:Int64;
Description: Get the current system time in 100 nanosecond ticks since 1/1/1601
Return
|
The current system time
|
Note
|
This is the same time format as Windows FILE_TIME and is intended to allow compatibility with file system functions etc. By default the time returned by this function is considered to be UTC but the actual conversion between UTC and local time is handled at a higher level.
|
[Expand]
function ClockSetTime(const Time:Int64; RTC:Boolean):Int64;
Description: Set the current system time in 100 nanosecond ticks since 1/1/1601
Time
|
The time to be set
|
RTC
|
Set the default RTC (real time clock) if available
|
Return
|
The system time after setting
|
Note
|
This is the same time format as Windows FILE_TIME and is intended to allow compatibility with file system functions etc. By default the time passed to this function is considered to be UTC but the actual conversion between UTC and local time is handled at a higher level.
|
[Expand]
function ClockGetCount:LongWord; inline;
Description: Gets the current system clock count (32 least significant bits of total)
Note
|
This will normally come from the free running system timer in the board and is useful as a form of tick count but not for time keeping because the actual rate at which this increments is dependent on the system timer clock frequency of the specific board and may not be a measure of time in its raw form.
|
[Expand]
function ClockGetTotal:Int64; inline;
Description: Gets the total system clock count
Note
|
This will normally come from the free running system timer in the board and is useful as a form of tick count but not for time keeping because the actual rate at which this increments is dependent on the system timer clock frequency of the specific board and may not be a measure of time in its raw form.
|
[Expand]
function Clock?pdateOffset:LongWord; inline;
Description: Change 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 misc 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 Resouse 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
Note
|
The "physical" size is the size of the allocated buffer in memory, not the resolution of the video signal sent to the display device
|
[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
Note
|
The "virtual" size is the portion of buffer that is sent to the display device, not the resolution the buffer itself. This may be smaller than the allocated buffer size in order to implement panning
|
[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 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)
Touch functions
[Expand]
function TouchGetBuffer(var Address:LongWord):LongWord; inline;
Description: Get 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)
Relative
|
X, Y is relative to Display (Virtual) not Framebuffer (Physical)
|
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
Data
|
A linked list of DMA data blocks for the transfer
|
Direction
|
The direction of the DMA request (eg DMA_DIR_MEM_TO_MEM)
|
Peripheral
|
The peripheral ID for data request gating (eg DMA_DREQ_ID_NONE)
|
[Expand]
function DMAFillMemory(Dest:Pointer; Size:LongWord; Value:Byte):LongWord; inline;
Description: Fill memory at the destination address using DMA
Dest
|
The address to start the memory fill
|
Size
|
The size of memory to fill in bytes
|
Value
|
The value to fill the memory with
|
[Expand]
function DMACopyMemory(Source,Dest:Pointer; Size:LongWord):LongWord; inline;
Description: Copy memory from the source to the destination address using DMA
Source
|
The source address to start the memory copy
|
Dest
|
The destination address to start the memory copy
|
Size
|
The size of memory to copy in bytes
|
[Expand]
function DMAReadPeripheral(Address,Dest:Pointer; Size,Peripheral:LongWord):LongWord; inline;
Description: Read from a periperal address to the destination address using DMA
Address
|
The address of the periperhal register to read from
|
Source
|
The destination address to start writing to
|
Size
|
The size of the read in bytes
|
Peripheral
|
The peripheral ID for data request gating (eg DMA_DREQ_ID_UART_RX)
|
[Expand]
function DMAWritePeripheral(Source,Address:Pointer; Size,Peripheral:LongWord):LongWord; inline;
Description: Write to a peripheral address from the source address using DMA
Source
|
The source address to start reading from
|
Address
|
The address of the peripheral register to write to
|
Size
|
The size of the write in bytes
|
Peripheral
|
The peripheral ID for data request gating (eg DMA_DREQ_ID_UART_TX)
|
[Expand]
function DMAAllocateBuffer(Size:LongWord):Pointer; inline;
Description: Allocate a buffer compatible with DMA memory reads or writes
Size
|
The size of the buffer to allocate
|
[Expand]
function DMAAllocateBufferEx(var Size:LongWord):Pointer; inline;
Description: Allocate a buffer compatible with DMA memory reads or writes
Size
|
The size of the buffer to allocate (Updated on return to actual size)
|
[Expand]
function DMAReleaseBuffer(Buffer:Pointer):LongWord; inline;
Description: Release a buffer allocated with DMAAllocateBuffer
Buffer
|
The buffer to be released
|
[Expand]
function DMAGetChannels:LongWord; inline;
Description: Get the currently enabled DMA channel bitmap (If supported)
GPIO functions
[Expand]
function GPIOAvailable:Boolean; inline;
Description: Check if a GPIO device is available
Reg
|
The memory register to read from
|
Value
|
The value of the memory register
|
[Expand]
function GPIORead(Reg:LongWord):LongWord; inline;
Description: Perform a direct read from a GPIO register
Reg
|
The memory register to read from
|
Value
|
The value of the memory register
|
[Expand]
procedure GPIOWrite(Reg,Value:LongWord); inline;
Description: Perform a direct write to a GPIO register
Reg
|
The memory register to write to
|
Value
|
The value to write to the register
|
[Expand]
function GPIOInputGet(Pin:LongWord):LongWord; inline;
Description: Get the current state of a GPIO input pin
Pin
|
The pin to get the state for (eg GPIO_PIN_1)
|
Return
|
The current state (eg GPIO_LEVEL_HIGH) or GPIO_LEVEL_UNKNOWN on failure
|
[Expand]
function GPIOInputWait(Pin,Trigger,Timeout:LongWord):LongWord; inline;
Description: Wait for the state of a GPIO input pin to change
Pin
|
The pin to wait for the state to change (eg GPIO_PIN_1)
|
Trigger
|
The trigger event to wait for (eg GPIO_TRIGGER_HIGH)
|
Timeout
|
Number of milliseconds to wait for the change (INFINITE to wait forever)
|
Return
|
The state after the change (eg GPIO_LEVEL_HIGH) or GPIO_LEVEL_UNKNOWN on failure or timeout
|
[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
Pin
|
The pin to schedule the state change for (eg GPIO_PIN_1)
|
Trigger
|
The trigger event which will cause the function to be called (eg GPIO_TRIGGER_HIGH)
|
Timeout
|
The number of milliseconds before the scheduled trigger expires (INFINITE to never expire)
|
Callback
|
The function to be called when the trigger occurs
|
Data
|
A pointer to be pass to the function when the trigger occurs (Optional)
|
Return
|
ERROR_SUCCESS if the trigger was scheduled successfully or another error code on failure
|
Note
|
The pin and trigger that caused the event will be passed to the callback function
|
[Expand]
function GPIOOutput?et(Pin,Level:LongWord):LongWord; inline;
Description: Change the state of a GPIO output pin
Pin
|
The pin to change the state for (eg GPIO_PIN_1)
|
Level
|
The state to change the pin to (eg GPIO_LEVEL_HIGH)
|
Return
|
ERROR_SUCCESS if completed successfully or another error code on failure
|
[Expand]
function GPIOPullGet(Pin:LongWord):LongWord; inline;
Description: Get the current pull state of a GPIO pin
Pin
|
The pin to get the pull state for (eg GPIO_PIN_1)
|
Return
|
The current pull state of the pin (eg GPIO_PULL_UP) or GPIO_PULL_UNKNOWN on failure
|
[Expand]
function GPIOPullSelect(Pin,Mode:LongWord):LongWord; inline;
Description: Change the pull state of a GPIO pin
Pin
|
The pin to change the pull state for (eg GPIO_PIN_1)
|
Mode
|
The pull state to set for the pin (eg GPIO_PULL_UP)
|
Return
|
ERROR_SUCCESS if completed successfully or another error code on failure
|
Return to Unit Reference