Difference between revisions of "Unit PlatformRPi2"
(8 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '''Ultibo Platform | + | '''Ultibo Platform Interface unit for Raspberry Pi 2''' |
The RPi2 B has the Power LED connected to GPIO Pin 35 (Activity LED is now on GPIO Pin 47). | The RPi2 B has the Power LED connected to GPIO Pin 35 (Activity LED is now on GPIO Pin 47). | ||
Line 12: | Line 12: | ||
The RPi3 B+ has the Activity LED connected to GPIO Pin 29 (Power LED is only accessible via the GPIO expander driver). | The RPi3 B+ has the Activity LED connected to GPIO Pin 29 (Power LED is only accessible via the GPIO expander driver). | ||
+ | |||
+ | The RPi Zero2W has the Activity LED connected to GPIO Pin 29. | ||
=== Constants === | === Constants === | ||
Line 45: | Line 47: | ||
|- | |- | ||
| <code>RPI2_SECURE_BOOT = $00000001;</code> | | <code>RPI2_SECURE_BOOT = $00000001;</code> | ||
− | | If 1 then startup will attempt to switch back to secure world during boot process | + | | If 1 then startup will attempt to switch back to secure world during boot process (Moved to ARMSecureBoot) |
+ | |- | ||
+ | | <code>RPI2_SECURE_BOOT_OFFSET = $000000D4;</code> | ||
+ | | The address of the Secure Boot marker in the ARM boot stub | ||
+ | |- | ||
+ | | <code>RPI2_SECURE_BOOT_MARKER = $58495052;</code> | ||
+ | | The Secure Boot marker (ASCII "RPIX") | ||
|- | |- | ||
|} | |} | ||
Line 56: | Line 64: | ||
|- | |- | ||
| <code>RPI2_STARTUP_ADDRESS = $00008000;</code> | | <code>RPI2_STARTUP_ADDRESS = $00008000;</code> | ||
− | | | + | | Address of StartupHandler on Reset (Obtain from linker) |
|- | |- | ||
|} | |} | ||
Line 174: | Line 182: | ||
| <code>RPI2_KERNEL_COMMAND = 'cmdline.txt';</code> | | <code>RPI2_KERNEL_COMMAND = 'cmdline.txt';</code> | ||
| | | | ||
+ | |- | ||
+ | |colspan="2"|<code>RPI2_FIRMWARE_FILES = 'bootcode.bin,start.elf,fixup.dat,armstub32-rpi2.bin,armstub32-rpi3.bin';</code> | ||
+ | |- | ||
+ | |colspan="2"|<code>RPI2_DTB_FILES = 'bcm2709-rpi-2-b.dtb,bcm2709-rpi-cm2.dtb,bcm2710-rpi-2-b.dtb,bcm2710-rpi-3-b.dtb,bcm2710-rpi-3-b-plus.dtb,bcm2710-rpi-cm3.dtb,bcm2710-rpi-zero-2.dtb,bcm2710-rpi-zero-2-w.dtb';</code> | ||
|- | |- | ||
|} | |} | ||
Line 365: | Line 377: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code>InterruptEntries:array[0..(BCM2836_GPU_IRQ_COUNT + BCM2836_ARM_IRQ_COUNT - 1)] of | + | | <code>InterruptEntries:array[0..(BCM2836_GPU_IRQ_COUNT + BCM2836_ARM_IRQ_COUNT - 1)] of PInterruptEntry;</code> |
| style="width: 40%;"| | | style="width: 40%;"| | ||
|- | |- | ||
Line 371: | Line 383: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code>LocalInterruptEntries:array[RPI2_IRQ_LOCAL_START..(BCM2836_IRQ_COUNT - 1),0..(RPI2_CPU_COUNT - 1)] of | + | | <code>LocalInterruptEntries:array[RPI2_IRQ_LOCAL_START..(BCM2836_IRQ_COUNT - 1),0..(RPI2_CPU_COUNT - 1)] of PInterruptEntry;</code> |
| style="width: 40%;"| | | style="width: 40%;"| | ||
|- | |- | ||
Line 401: | Line 413: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code> | + | | <code>LocalIRQEnabled:array[0..(RPI2_CPU_COUNT - 1)] of LongWord;</code> |
| style="width: 40%;"|1 group of local IRQs to Enable/Disable per CPU (See: TBCM2836ARMLocalRegisters) | | style="width: 40%;"|1 group of local IRQs to Enable/Disable per CPU (See: TBCM2836ARMLocalRegisters) | ||
|- | |- | ||
Line 407: | Line 419: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code> | + | | <code>LocalFIQEnabled:array[0..(RPI2_CPU_COUNT - 1)] of LongWord;</code> |
| style="width: 40%;"|1 group of local FIQs to Enable/Disable per CPU (See: TBCM2836ARMLocalRegisters) | | style="width: 40%;"|1 group of local FIQs to Enable/Disable per CPU (See: TBCM2836ARMLocalRegisters) | ||
|- | |- | ||
Line 761: | Line 773: | ||
| Data = first 28 bits, Channel = last 4 bits | | Data = first 28 bits, Channel = last 4 bits | ||
Data pointer must be 16 byte aligned to allow for the 4 bit channel number | Data pointer must be 16 byte aligned to allow for the 4 bit channel number | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function RPi2MailboxPropertyTag(Tag:LongWord; Data:Pointer; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request a property tag (Get/Set) from the mailbox property channel</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Data | ||
+ | | Data does not need to include mailbox property channel header or footer. Data pointer does not need any specific alignment or caching attributes. | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size must be a multiple of 4 bytes. Size must include the size of the request and response which use the same buffer. | ||
|- | |- | ||
|} | |} | ||
Line 1,692: | Line 1,719: | ||
<pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Test Framebuffer Palette from the Mailbox property tags channel</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Test Framebuffer Palette from the Mailbox property tags channel</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferGetLayer(var Layer:LongInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get Framebuffer Layer from the Mailbox property tags channel</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferSetLayer(var Layer:LongInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set Framebuffer Layer from the Mailbox property tags channel</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferTestLayer(var Layer:LongInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Test Framebuffer Layer from the Mailbox property tags channel</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 2,117: | Line 2,180: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferDeviceSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function RPi2FramebufferDeviceSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,210: | Line 2,261: | ||
! Note | ! Note | ||
| None documented | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure RPi2BootOutput(Value:LongWord);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Output characters to UART0 without dependency on any other RTL setup</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This function is primarily intended for testing QEMU boot because it doesn't initialize the UART and won't work on real hardware. | ||
+ | Based on hexstrings() function by dwelch67 (https://github.com/dwelch67) | ||
|- | |- | ||
|} | |} |
Latest revision as of 05:09, 23 November 2022
Return to Unit Reference
Contents
[hide]Description
Ultibo Platform Interface unit for Raspberry Pi 2
The RPi2 B has the Power LED connected to GPIO Pin 35 (Activity LED is now on GPIO Pin 47).
The RPi3 B has the Activity LED connected to the GPU, access is via a Virtual GPIO (Power LED is only accessible via the GPIO expander driver).
The RPi3 B+ has the Activity LED connected to GPIO Pin 29 (Power LED is only accessible via the GPIO expander driver).
The RPi Zero2W has the Activity LED connected to GPIO Pin 29.
Constants
RPI2_VCIO_*
RPI2_VCBUS_*
RPI2_SECURE_*
RPI2_STARTUP_*
RPI2_PAGE_TABLE_*
RPI2_VECTOR_TABLE_*
RPI2_CPU_*
RPI2_IRQ_*, RPI2_FIQ_*
RPI2_SWI_*
RPI2_*_TIMER_*
RPI2_KERNEL_*
RPI2_GPIO_PWRLED_*
RPI2_GPIO_ACTLED_*
RPI2_MAILBOX_*
RPI2_LOCAL_MAILBOX_*
RPI2_FRAMEBUFFER_*
Type definitions
None defined
Public variables
RPi2 specific Ultibo variables
RPi2Initialized:Boolean;
|
RPi2CNTVOFFLow:LongWord = 0;
|
The low 32 bits of the Virtual Counter Offset register at boot time (CPU0 only) (Set by Startup). Must be initialized to remain in .data or else rewritten to zero with .bss |
RPi2CNTVOFFHigh:LongWord = 0;
|
The high 32 bits of the Virtual Counter Offset register at boot time (CPU0 only) (Set by Startup). Must be initialized to remain in .data or else rewritten to zero with .bss |
Timer variables
TimerRegisters:PBCM2836SystemTimerRegisters;
|
Mailbox variables
Mailbox0Registers:PBCM2836Mailbox0Registers;
|
Mailbox1Registers:PBCM2836Mailbox1Registers;
|
Interrupt variables
InterruptRegisters:PBCM2836InterruptRegisters;
|
InterruptEntries:array[0..(BCM2836_GPU_IRQ_COUNT + BCM2836_ARM_IRQ_COUNT - 1)] of PInterruptEntry;
|
LocalInterruptEntries:array[RPI2_IRQ_LOCAL_START..(BCM2836_IRQ_COUNT - 1),0..(RPI2_CPU_COUNT - 1)] of PInterruptEntry;
|
System call
SystemCallEntries:array[0..RPI2_SWI_COUNT - 1] of TSystemCallEntry;
|
IRQ/FIQ
IRQEnabled:array[0..2] of LongWord;
|
3 groups of IRQs to Enable/Disable (See: TBCM2836InterruptRegisters) |
FIQEnabled:LongWord;
|
The single IRQ number to Enable as FIQ instead (See: TBCM2836InterruptRegisters) |
LocalIRQEnabled:array[0..(RPI2_CPU_COUNT - 1)] of LongWord;
|
1 group of local IRQs to Enable/Disable per CPU (See: TBCM2836ARMLocalRegisters) |
LocalFIQEnabled:array[0..(RPI2_CPU_COUNT - 1)] of LongWord;
|
1 group of local FIQs to Enable/Disable per CPU (See: TBCM2836ARMLocalRegisters) |
Watchdog variables
WatchdogRegisters:PBCM2836PMWatchdogRegisters;
|
ARM local
ARMLocalRegisters:PBCM2836ARMLocalRegisters;
|
Virtual GPIO
VirtualGPIOBuffer:TBCM2837VirtualGPIOBuffer;
|
Function declarations
Initialization functions
procedure RPi2SecondarySwitch; assembler; nostackframe;
procedure RPi2SecondarySecure; assembler; nostackframe;
procedure RPi2SecondaryHandler; assembler; nostackframe;
RPi2 platform functions
procedure RPi2PageTableInit;
function RPi2MailboxReceive(Mailbox,Channel:LongWord):LongWord;
procedure RPi2MailboxSend(Mailbox,Channel,Data:LongWord);
function RPi2MailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord;
function RPi2MailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord;
function RPi2MailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord;
function RPi2MailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord;
function RPi2MailboxPropertyTag(Tag:LongWord; Data:Pointer; Size:LongWord):LongWord;
function RPi2RequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
function RPi2ReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
function RPi2RequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
function RPi2ReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
function RPi2RegisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;
function RPi2DeregisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;
function RPi2RegisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
function RPi2DeregisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
function RPi2GetInterruptEntry(Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;
function RPi2GetLocalInterruptEntry(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;
function RPi2GetSystemCallEntry(Number:LongWord):TSystemCallEntry;
function RPi2SystemGetCommandLine:String;
function RPi2CPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord;
function RPi2GPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord;
function RPi2BoardGetModel:LongWord;
function RPi2BoardGetSerial:Int64;
function RPi2BoardGetRevision:LongWord;
function RPi2BoardGetMACAddress:String;
function RPi2FirmwareGetRevision:LongWord;
function RPi2FirmwareGetThrottled:LongWord;
function RPi2PowerGetWait(PowerId:LongWord):LongWord;
function RPi2PowerGetState(PowerId:LongWord):LongWord;
function RPi2PowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord;
function RPi2ClockGetCount:LongWord;
function RPi2ClockGetRate(ClockId:LongWord):LongWord;
function RPi2ClockSetRate(ClockId,Rate:LongWord; Turbo:Boolean):LongWord;
function RPi2ClockGetState(ClockId:LongWord):LongWord;
function RPi2ClockSetState(ClockId,State:LongWord):LongWord;
function RPi2ClockGetMinRate(ClockId:LongWord):LongWord;
function RPi2ClockGetMaxRate(ClockId:LongWord):LongWord;
function RPi2TurboGetState(TurboId:LongWord):LongWord;
function RPi2TurboSetState(TurboId,State:LongWord):LongWord;
function RPi2VoltageGetValue(VoltageId:LongWord):LongWord;
function RPi2VoltageSetValue(VoltageId,Value:LongWord):LongWord;
function RPi2VoltageGetMinValue(VoltageId:LongWord):LongWord;
function RPi2VoltageGetMaxValue(VoltageId:LongWord):LongWord;
function RPi2TemperatureGetCurrent(TemperatureId:LongWord):LongWord;
function RPi2TemperatureGetMaximum(TemperatureId:LongWord):LongWord;
function RPi2GPUMemoryAllocate(Length,Alignment,Flags:LongWord):THandle;
function RPi2GPUMemoryRelease(Handle:THandle):LongWord;
function RPi2GPUMemoryLock(Handle:THandle):LongWord;
function RPi2GPUMemoryUnlock(Handle:THandle):LongWord;
function RPi2GPUExecuteCode(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord;
function RPi2DispmanxHandleGet(Resource:THandle):THandle;
function RPi2EDIDBlockGet(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
function RPi2FramebufferAllocate(Alignment:LongWord; var Address,Length:LongWord):LongWord;
function RPi2FramebufferRelease:LongWord;
function RPi2FramebufferSetState(State:LongWord):LongWord;
function RPi2FramebufferGetDimensions(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord;
function RPi2FramebufferGetPhysical(var Width,Height:LongWord):LongWord;
function RPi2FramebufferSetPhysical(var Width,Height:LongWord):LongWord;
function RPi2FramebufferTestPhysical(var Width,Height:LongWord):LongWord;
function RPi2FramebufferGetVirtual(var Width,Height:LongWord):LongWord;
function RPi2FramebufferSetVirtual(var Width,Height:LongWord):LongWord;
function RPi2FramebufferTestVirtual(var Width,Height:LongWord):LongWord;
function RPi2FramebufferGetDepth(var Depth:LongWord):LongWord;
function RPi2FramebufferSetDepth(var Depth:LongWord):LongWord;
function RPi2FramebufferTestDepth(var Depth:LongWord):LongWord;
function RPi2FramebufferGetPixelOrder(var Order:LongWord):LongWord;
function RPi2FramebufferSetPixelOrder(var Order:LongWord):LongWord;
function RPi2FramebufferTestPixelOrder(var Order:LongWord):LongWord;
function RPi2FramebufferGetAlphaMode(var Mode:LongWord):LongWord;
function RPi2FramebufferSetAlphaMode(var Mode:LongWord):LongWord;
function RPi2FramebufferTestAlphaMode(var Mode:LongWord):LongWord;
function RPi2FramebufferGetPitch:LongWord;
function RPi2FramebufferGetOffset(var X,Y:LongWord):LongWord;
function RPi2FramebufferSetOffset(var X,Y:LongWord):LongWord;
function RPi2FramebufferTestOffset(var X,Y:LongWord):LongWord;
function RPi2FramebufferGetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
function RPi2FramebufferSetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
function RPi2FramebufferTestOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
function RPi2FramebufferGetPalette(Buffer:Pointer; Length:LongWord):LongWord;
function RPi2FramebufferSetPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
function RPi2FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
function RPi2FramebufferGetLayer(var Layer:LongInt):LongWord;
function RPi2FramebufferSetLayer(var Layer:LongInt):LongWord;
function RPi2FramebufferTestLayer(var Layer:LongInt):LongWord;
function RPi2FramebufferTestVsync:LongWord;
function RPi2FramebufferSetVsync:LongWord;
function RPi2FramebufferSetBacklight(Brightness:LongWord):LongWord;
function RPi2FramebufferGetNumDisplays(var NumDisplays:LongWord):LongWord;
function RPi2FramebufferGetDisplayId(DisplayNum:LongWord):LongWord;
function RPi2FramebufferSetDisplayNum(DisplayNum:LongWord):LongWord;
function RPi2FramebufferGetDisplaySettings(DisplayNum:LongWord; var DisplaySettings:TDisplaySettings):LongWord;
function RPi2FramebufferDisplayIdToName(DisplayId:LongWord):String;
function RPi2TouchGetBuffer(var Address:PtrUInt):LongWord;
function RPi2TouchSetBuffer(Address:PtrUInt):LongWord;
function RPi2VirtualGPIOGetBuffer(var Address:PtrUInt):LongWord;
function RPi2VirtualGPIOSetBuffer(Address:PtrUInt):LongWord;
function RPi2CursorSetDefault:LongWord;
function RPi2CursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord;
function RPi2CursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord;
function RPi2DMAGetChannels:LongWord;
function RPi2VirtualGPIOAllocate:Boolean;
function RPi2VirtualGPIOOutputSet(Pin,Level:LongWord):LongWord;
function RPi2VirtualGPIOFunctionSelect(Pin,Mode:LongWord):LongWord;
RPi2 thread functions
procedure RPi2SchedulerInit;
procedure RPi2SchedulerStart(CPUID:LongWord);
RPi2 clock functions
procedure RPi2ClockInterrupt(Parameter:Pointer);
procedure RPi2ClockUpdate(Cycles:LongWord; var Last:LongWord);
RPi2 scheduler functions
function RPi2SchedulerInterrupt(CPUID:LongWord; Thread:TThreadHandle; Parameter:Pointer):TThreadHandle;
procedure RPi2SchedulerUpdate(Cycles:LongWord; var Last:LongWord);
procedure RPi2SchedulerSystemCall(Request:PSystemCallRequest);
RPi2 framebuffer functions
function RPi2FramebufferDeviceAllocate(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
function RPi2FramebufferDeviceAllocateAlt(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
function RPi2FramebufferDeviceRelease(Framebuffer:PFramebufferDevice):LongWord;
function RPi2FramebufferDeviceBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
function RPi2FramebufferDeviceCommit(Framebuffer:PFramebufferDevice; Address:PtrUInt; Size,Flags:LongWord):LongWord;
function RPi2FramebufferDeviceSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
RPi2 helper functions
procedure RPi2BootBlink; assembler; nostackframe;
procedure RPi2BootOutput(Value:LongWord);
procedure RPi2BootConsoleWriteEx(const Value:String; X,Y:LongWord);
function RPi2ConvertPowerIdRequest(PowerId:LongWord):LongWord;
function RPi2ConvertPowerStateRequest(PowerState:LongWord):LongWord;
function RPi2ConvertPowerStateResponse(PowerState:LongWord):LongWord;
function RPi2ConvertClockIdRequest(ClockId:LongWord):LongWord;
function RPi2ConvertClockStateRequest(ClockState:LongWord):LongWord;
function RPi2ConvertClockStateResponse(ClockState:LongWord):LongWord;
function RPi2ConvertVoltageIdRequest(VoltageId:LongWord):LongWord;
function RPi2ConvertTemperatureIdRequest(TemperatureId:LongWord):LongWord;
Return to Unit Reference