Unit PlatformRPi3
Return to Unit Reference
Description
The RPi3 B has the Activity LED connected to the GPU, access is via a Virtual GPIO (Power LED appears to be unavailable).
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure RPi3Init;
Note | None documented |
---|
procedure RPi3SecondarySwitch; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3SecondarySecure; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3SecondaryHandler; assembler; nostackframe;
Note | None documented |
---|
RPi3 platform functions
procedure RPi3SMPInit;
Note | None documented |
---|
procedure RPi3BoardInit;
Note | None documented |
---|
procedure RPi3MemoryInit;
Note | None documented |
---|
procedure RPi3ClockInit;
Note | None documented |
---|
procedure RPi3PowerInit;
Note | None documented |
---|
procedure RPi3MailboxInit;
Note | None documented |
---|
procedure RPi3InterruptInit;
Note | None documented |
---|
procedure RPi3PeripheralInit;
Note | None documented |
---|
procedure RPi3FramebufferInit;
Note | None documented |
---|
procedure RPi3PageTableInit;
Note | None documented |
---|
procedure RPi3PowerLEDEnable;
Note | None documented |
---|
procedure RPi3PowerLEDOn;
Note | None documented |
---|
procedure RPi3PowerLEDOff;
Note | None documented |
---|
procedure RPi3ActivityLEDEnable;
Note | None documented |
---|
procedure RPi3ActivityLEDOn;
Note | None documented |
---|
procedure RPi3ActivityLEDOff;
Note | None documented |
---|
function RPi3MailboxReceive(Mailbox,Channel:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits |
---|
procedure RPi3MailboxSend(Mailbox,Channel,Data:LongWord);
Note | Data = first 28 bits, Channel = last 4 bits |
---|
function RPi3MailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3MailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3MailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3MailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3RequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
CPUID | CPU to route IRQ to |
---|---|
Number | IRQ number to register |
Handler | Interrupt handler function to register |
HandlerEx | Extended Interrupt handler function to register |
Note | Only one of Handler or HandlerEx can be specified |
function RPi3ReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
CPUID | CPU to route IRQ to |
---|---|
Number | IRQ number to deregister |
Handler | Interrupt handler function to deregister |
HandlerEx | Extended Interrupt handler function to deregister |
Note | Only one of Handler or HandlerEx can be specified |
function RPi3RequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
CPUID | CPU to route FIQ to |
---|---|
Number | FIQ number to register |
Handler | Interrupt handler function to register |
HandlerEx | Extended Interrupt handler function to register |
Note | Only one of Handler or HandlerEx can be specified |
function RPi3ReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
CPUID | CPU to route FIQ to |
---|---|
Number | FIQ number to deregister |
Handler | Interrupt handler function to deregister |
HandlerEx | Extended Interrupt handler function to deregister |
Note | Only one of Handler or HandlerEx can be specified |
function RPi3RegisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
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 |
HandlerEx | The extended handler function to be registered |
Note | Only one of Handler or HandlerEx can be specified |
function RPi3DeregisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
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 |
HandlerEx | The extended handler function to be deregistered |
Note | Only one of Handler or HandlerEx can be specified |
function RPi3GetInterruptEntry(Number:LongWord):TInterruptEntry;
Note | None documented |
---|
function RPi3GetLocalInterruptEntry(CPUID,Number:LongWord):TInterruptEntry; {Get the local interrupt entry for the specified interrupt number}
function
Note | None documented |
---|
function RPi3GetSystemCallEntry(Number:LongWord):TSystemCallEntry;
Note | None documented |
---|
function RPi3SystemRestart(Delay:LongWord):LongWord;
Note | None documented |
---|
function RPi3SystemShutdown(Delay:LongWord):LongWord;
Note | None documented |
---|
function RPi3SystemGetCommandLine:String;
Note | None documented |
---|
function RPi3CPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3GPUGetState:LongWord;
Note | None documented |
---|
function RPi3GPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3BoardGetModel:LongWord;
Note | None documented |
---|
function RPi3BoardGetSerial:Int64;
Note | None documented |
---|
function RPi3BoardGetRevision:LongWord;
Note | None documented |
---|
function RPi3BoardGetMACAddress:String;
Note | None documented |
---|
function RPi3FirmwareGetRevision:LongWord;
Note | None documented |
---|
function RPi3PowerGetWait(PowerId:LongWord):LongWord;
Note | None documented |
---|
function RPi3PowerGetState(PowerId:LongWord):LongWord;
Note | None documented |
---|
function RPi3PowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord;
Note | Power Lock not required due to Mailbox Property Call serialization |
---|
function RPi3ClockGetCount:LongWord;
Note | On the Raspberry Pi this comes from the System Timer free running counter which runs at 1MHz and therefore overflows every 4295 seconds |
---|
function RPi3ClockGetTotal:Int64;
Note | On the Raspberry Pi this comes from the System Timer free running counter which runs at 1MHz, the clock interrupt also uses this timer to increment the clock every second and therefore keep time. |
---|
function RPi3ClockGetRate(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockSetRate(ClockId,Rate:LongWord; Turbo:Boolean):LongWord;
Note | None documented |
---|
function RPi3ClockGetState(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockSetState(ClockId,State:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockGetMinRate(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockGetMaxRate(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TurboGetState(TurboId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TurboSetState(TurboId,State:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageGetValue(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageSetValue(VoltageId,Value:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageGetMinValue(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageGetMaxValue(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TemperatureGetCurrent(TemperatureId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TemperatureGetMaximum(TemperatureId:LongWord):LongWord;
Note | None documented |
---|
function RPi3GPUMemoryAllocate(Length,Alignment,Flags:LongWord):THandle;
Note | None documented |
---|
function RPi3GPUMemoryRelease(Handle:THandle):LongWord;
Note | None documented |
---|
function RPi3GPUMemoryLock(Handle:THandle):LongWord;
Note | None documented |
---|
function RPi3GPUMemoryUnlock(Handle:THandle):LongWord;
Note | None documented |
---|
function RPi3GPUExecuteCode(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord;
Note | None documented |
---|
function RPi3DispmanxHandleGet(Resource:THandle):THandle;
Note | None documented |
---|
function RPi3EDIDBlockGet(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferAllocate(Alignment:LongWord; var Address,Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferRelease:LongWord;
Note | None documented |
---|
function RPi3FramebufferSetState(State:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetDimensions(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPhysical(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetPhysical(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestPhysical(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetVirtual(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetVirtual(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestVirtual(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetDepth(var Depth:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetDepth(var Depth:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestDepth(var Depth:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPixelOrder(var Order:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetPixelOrder(var Order:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestPixelOrder(var Order:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetAlphaMode(var Mode:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetAlphaMode(var Mode:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestAlphaMode(var Mode:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPitch:LongWord;
Note | None documented |
---|
function RPi3FramebufferGetOffset(var X,Y:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetOffset(var X,Y:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestOffset(var X,Y:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPalette(Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetBacklight(Brightness:LongWord):LongWord;
Note | None documented |
---|
function RPi3TouchGetBuffer(var Address:LongWord):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOGetBuffer(var Address:LongWord):LongWord;
Note | None documented |
---|
function RPi3CursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3CursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord;
Relative | X, Y is relative to Display (Virtual) not Framebuffer (Physical) |
---|
function RPi3DMAGetChannels:LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOInputGet(Pin:LongWord):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOOutputSet(Pin,Level:LongWord):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOFunctionSelect(Pin,Mode:LongWord):LongWord;
Note | None documented |
---|
RPi3 thread functions
procedure RPi3SchedulerInit;
Note | None documented |
---|
procedure RPi3SchedulerStart(CPUID:LongWord);
Note | None documented |
---|
procedure RPi3SecondaryBoot(CPUID:LongWord);
Note | None documented |
---|
RPi3 IRQ functions
function RPi3DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Note | Called by ARMv8IRQHandler in PlatformARMv8
A DataMemoryBarrier is executed before and after calling this function |
---|
function RPi3HandleIRQ(Number,CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Note | None documented |
---|
RPi3 FIQ functions
function RPi3DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Note | Called by ARMv8FIQHandler in PlatformARMv8
A DataMemoryBarrier is executed before and after calling this function |
---|
function RPi3HandleFIQ(Number,CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Note | None documented |
---|
RPi3 SWI functions
function RPi3DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle;
Note | Called by ARMv8SoftwareInterruptHandler in PlatformARMv8
A DataMemoryBarrier is executed before and after calling this function |
---|
RPi3 clock functions
procedure RPi3ClockInterrupt(Parameter:Pointer);
Note | This schedules another clock interrupt to occur CLOCK_CYCLES_PER_TICK in the future, then updates ClockTicks and ClockSeconds and checks for timers to trigger. |
---|
procedure RPi3ClockUpdate(Cycles:LongWord; var Last:LongWord);
Cycles | Number of cycles after which the timer interrupt is to be triggered |
---|---|
Note | This refers to native clock cycles as specified by CLOCK_FREQUENCY |
Return to Unit Reference