Difference between revisions of "Unit PlatformRPi"
From Ultibo.org
Line 10: | Line 10: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi ARM physical to VC IO mapping constants''' <code> RPI_VCIO_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_VCIO_ALIAS = BCM2835_VCIO_ALIAS;</code> | ||
+ | |The VCIO Alias (For ARM Physcial to VC IO translation) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi ARM physical to VC bus mapping constants''' <code> RPI_VCBUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_VCBUS_ALIAS = BCM2835_VCBUS_4_ALIAS;</code> | ||
+ | | The currently selected VCBUS Alias (For ARM Physcial to VC Bus translation) (Affected by disable_l2cache setting in config.txt) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi address of StartupHandler on reset constants''' <code> RPI_STARTUP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_STARTUP_ADDRESS = $00008000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi page table address and size constants''' <code> RPI_PAGE_TABLE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_PAGE_TABLE_BASE = $00004000;</code> | ||
+ | | Place the first level Page Table after the interrupt vectors at 0x00001000 and before the code start at 0x00008000 | ||
+ | |- | ||
+ | | <code>RPI_PAGE_TABLE_SIZE = SIZE_16K;</code> | ||
+ | | ARM1176 first level Page Table is exactly 16KB in size (4096 32 bit (4 byte) entries) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi vector table address and size constants''' <code> RPI_VECTOR_TABLE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_VECTOR_TABLE_BASE = $00001000;</code> | ||
+ | | Place the Interrupt Vector Table at 0x00001000 before the code start at 0x00008000 | ||
+ | |- | ||
+ | | <code>RPI_VECTOR_TABLE_SIZE = SIZE_64;</code> | ||
+ | | The Interrupt Vector Table is exactly 64 bytes (16 32 bit (4 byte) entries) | ||
+ | |- | ||
+ | | <code>RPI_VECTOR_TABLE_COUNT = 8;</code> | ||
+ | | The Interrupt Vector Table contains 8 entries on an ARMv6 device | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi CPU count, boot and mask constants''' <code> RPI_CPU_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_CPU_COUNT = BCM2835_CPU_COUNT;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>RPI_CPU_BOOT = CPU_ID_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RPI_CPU_MASK = CPU_AFFINITY_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi SWI constants''' <code> RPI_SWI_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_SWI_COUNT = 256;</code> | ||
+ | | Number of available SWI entries | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi kernel image name constants''' <code> RPI_KERNEL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_KERNEL_NAME = 'kernel.img';</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>RPI_KERNEL_CONFIG = 'config.txt';</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>RPI_KERNEL_COMMAND = 'cmdline.txt';</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi plus GPIO power LED constants ''' <code> RPIPLUS_GPIO_PWRLED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>NAME_</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"|Note: GPIO Pin 35 on the A+/B+ is set on boot to Pull Up/Down Enable which must be cleared before using the pin | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPFSEL = BCM2835_GPFSEL3;</code> | ||
+ | | GPFSEL register for PWR LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPSET = BCM2835_GPSET1;</code> | ||
+ | | GPSET register for PWR LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPCLR = BCM2835_GPCLR1;</code> | ||
+ | | GPCLR register for PWR LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPFSHIFT = 15;</code> | ||
+ | | GPFSEL register shift for PWR LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPFMASK = BCM2835_GPFSEL_MASK;</code> | ||
+ | | GPFSEL register mask for PWR LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPSHIFT = (35 - 32);</code> | ||
+ | | GPSET/GPCLR register shift for PWR LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_PWRLED_GPMASK = BCM2835_GPSET_MASK;</code> | ||
+ | | GPSET/GPCLR register mask for PWR LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|GPIO Pin 35 on A+/B+ | ||
+ | |- | ||
+ | |colspan="2"|See: http://www.raspberrypi.org/forums/viewtopic.php?t=72260 | ||
+ | |- | ||
+ | |colspan="2"|See also for how to control GPPUD etc: http://wiki.osdev.org/Raspberry_Pi_Bare_Bones | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi GPIO activity LED constants ''' <code> RPI_GPIO_ACTLED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|GPIO Pin 16 - A/B Only | ||
+ | |- | ||
+ | |colspan="2"|Note: GPIO Pin 47 on the A+/B+ is Pull High instead of Pull Low, to turn on the LED use RPIPLUS_GPIO_ACTLED_GPSET instead of RPIPLUS_GPIO_ACTLED_GPCLR | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPFSEL = BCM2835_GPFSEL1;</code> | ||
+ | | GPFSEL register for ACT LED | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPSET = BCM2835_GPSET0;</code> | ||
+ | | GPSET register for ACT LED | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPCLR = BCM2835_GPCLR0;</code> | ||
+ | | GPCLR register for ACT LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPFSHIFT = 18;</code> | ||
+ | | GPFSEL register shift for ACT LED | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPFMASK = BCM2835_GPFSEL_MASK;</code> | ||
+ | | GPFSEL register mask for ACT LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPSHIFT = 16;</code> | ||
+ | | GPSET/GPCLR register shift for ACT LED | ||
+ | |- | ||
+ | | <code>RPI_GPIO_ACTLED_GPMASK = BCM2835_GPSET_MASK;</code> | ||
+ | | GPSET/GPCLR register mask for ACT LED | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi plus GPIO activity LED constants''' <code> RPIPLUS_GPIO_ACTLED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|GPIO Pin 47 - A+/B+ Only | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPFSEL = BCM2835_GPFSEL4;</code> | ||
+ | | GPFSEL register for ACT LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPSET = BCM2835_GPSET1;</code> | ||
+ | | GPSET register for ACT LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPCLR = BCM2835_GPCLR1;</code> | ||
+ | | GPCLR register for ACT LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPFSHIFT = 21;</code> | ||
+ | | GPFSEL register shift for ACT LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPFMASK = BCM2835_GPFSEL_MASK;</code> | ||
+ | | GPFSEL register mask for ACT LED | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPSHIFT = (47 - 32);</code> | ||
+ | | GPSET/GPCLR register shift for ACT LED | ||
+ | |- | ||
+ | | <code>RPIPLUS_GPIO_ACTLED_GPMASK = BCM2835_GPSET_MASK;</code> | ||
+ | | GPSET/GPCLR register mask for ACT LED | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''RPi mailbox constants''' <code> RPI_MAILBOX_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>RPI_MAILBOX_TIMEOUT = 100;</code> | ||
+ | | Default timeout to wait for mailbox calls to complete (Milliseconds) | ||
+ | |- | ||
+ | | <code>RPI_MAILBOX_TIMEOUT_EX = 1000;</code> | ||
+ | | Extended timeout to wait for mailbox calls to complete (Milliseconds) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === |
Revision as of 03:51, 19 December 2016
Return to Unit Reference
Contents
[hide]Description
The RPi A+/B+ have the Power LED connected to GPIO Pin 35 (Activity LED is now on GPIO Pin 47 instead of Pin 16 in model A/B).
Constants
[Expand]
RPi ARM physical to VC IO mapping constants
RPI_VCIO_*
[Expand]
RPi ARM physical to VC bus mapping constants
RPI_VCBUS_*
[Expand]
RPi address of StartupHandler on reset constants
RPI_STARTUP_*
[Expand]
RPi page table address and size constants
RPI_PAGE_TABLE_*
[Expand]
RPi vector table address and size constants
RPI_VECTOR_TABLE_*
[Expand]
RPi CPU count, boot and mask constants
RPI_CPU_*
[Expand]
RPi SWI constants
RPI_SWI_*
[Expand]
RPi kernel image name constants
RPI_KERNEL_*
[Expand]
RPi plus GPIO power LED constants
RPIPLUS_GPIO_PWRLED_*
[Expand]
RPi GPIO activity LED constants
RPI_GPIO_ACTLED_*
[Expand]
RPi plus GPIO activity LED constants
RPIPLUS_GPIO_ACTLED_*
[Expand]
RPi mailbox constants
RPI_MAILBOX_*
Type definitions
None defined
Public variables
To be documented
Function declarations
Initialization functions
RPi platform functions
[Expand]
procedure RPiPageTableInit;
Description: Initialize the Hardware Page Tables before enabling the MMU
[Expand]
function RPiMailboxReceive(Mailbox,Channel:LongWord):LongWord;
Description: Receive from specified mailbox on specified channel
[Expand]
procedure RPiMailboxSend(Mailbox,Channel,Data:LongWord);
Description: Send to specified mailbox on specified channel
[Expand]
function RPiMailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord;
Description: Perform a transaction (Send/Receive) to specified mailbox on specified channel
[Expand]
function RPiMailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord;
Description: Perform a transaction (Send/Receive) to specified mailbox on specified channel
[Expand]
function RPiMailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord;
Description: Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel
[Expand]
function RPiMailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord;
Description: Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel
[Expand]
function RPiRequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Description: Request registration of the supplied handler to the specified IRQ number
[Expand]
function RPiReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Description: Request deregistration of the supplied handler from the specified IRQ number
[Expand]
function RPiRequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Description: Request registration of the supplied handler to the specified FIQ number
[Expand]
function RPiReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Description: Request deregistration of the supplied handler from the specified FIQ number
[Expand]
function RPiRegisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
Description: Request registration of the supplied extended handler to the specified System Call number
[Expand]
function RPiDeregisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
Description: Request deregistration of the supplied extended handler from the specified System Call number
[Expand]
function RPiGetInterruptEntry(Number:LongWord):TInterruptEntry;
Description: Get the interrupt entry for the specified interrupt number
[Expand]
function RPiGetSystemCallEntry(Number:LongWord):TSystemCallEntry;
Description: To be documented
[Expand]
function RPiSystemGetCommandLine:String;
Description: Get the Command Line from the Mailbox property tags channel
[Expand]
function RPiCPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord;
Description: Get the CPU Memory from the Mailbox property tags channel
[Expand]
function RPiGPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord;
Description: Get the GPU Memory from the Mailbox property tags channel
[Expand]
function RPiBoardGetModel:LongWord;
Description: Get the Board Model from the Mailbox property tags channel
[Expand]
function RPiBoardGetSerial:Int64;
Description: Get the Board Serial from the Mailbox property tags channel
[Expand]
function RPiBoardGetRevision:LongWord;
Description: Get the Board Revision from the Mailbox property tags channel
[Expand]
function RPiBoardGetMACAddress:String;
Description: Get the Board MAC Address from the Mailbox property tags channel
[Expand]
function RPiFirmwareGetRevision:LongWord;
Description: Get the Firmware Revision from the Mailbox property tags channel
[Expand]
function RPiPowerGetWait(PowerId:LongWord):LongWord;
Description: Get the Power Wait from the Mailbox property tags channel
[Expand]
function RPiPowerGetState(PowerId:LongWord):LongWord;
Description: Get the Power State from the Mailbox property tags channel
[Expand]
function RPiPowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord;
Description: Set the Power State in the Mailbox property tags channel
[Expand]
function RPiClockGetCount:LongWord;
Description: Gets the current system clock count (32 least significant bits of total)
[Expand]
function RPiClockGetRate(ClockId:LongWord):LongWord;
Description: Get the Clock Rate from the Mailbox property tags channel
[Expand]
function RPiClockSetRate(ClockId,Rate:LongWord; Turbo:Boolean):LongWord;
Description: Set the Clock Rate in the Mailbox property tags channel
[Expand]
function RPiClockGetState(ClockId:LongWord):LongWord;
Description: Get the Clock State from the Mailbox property tags channel
[Expand]
function RPiClockSetState(ClockId,State:LongWord):LongWord;
Description: Set the Clock State in the Mailbox property tags channel
[Expand]
function RPiClockGetMinRate(ClockId:LongWord):LongWord;
Description: Get the Clock Min Rate from the Mailbox property tags channel
[Expand]
function RPiClockGetMaxRate(ClockId:LongWord):LongWord;
Description: Get the Clock Max Rate from the Mailbox property tags channel
[Expand]
function RPiTurboGetState(TurboId:LongWord):LongWord;
Description: Get the Turbo State from the Mailbox property tags channel
[Expand]
function RPiTurboSetState(TurboId,State:LongWord):LongWord;
Description: Set the Turbo State in the Mailbox property tags channel
[Expand]
function RPiVoltageGetValue(VoltageId:LongWord):LongWord;
Description: Get the Voltage Value from the Mailbox property tags channel
[Expand]
function RPiVoltageSetValue(VoltageId,Value:LongWord):LongWord;
Description: Set the Voltage Value in the Mailbox property tags channel
[Expand]
function RPiVoltageGetMinValue(VoltageId:LongWord):LongWord;
Description: Get the Voltage Min Value from the Mailbox property tags channel
[Expand]
function RPiVoltageGetMaxValue(VoltageId:LongWord):LongWord;
Description: Get the Voltage Max Value from the Mailbox property tags channel
[Expand]
function RPiTemperatureGetCurrent(TemperatureId:LongWord):LongWord;
Description: Get the Temperature Current from the Mailbox property tags channel
[Expand]
function RPiTemperatureGetMaximum(TemperatureId:LongWord):LongWord;
Description: Get the Temperature Maximum Model from the Mailbox property tags channel
[Expand]
function RPiGPUMemoryAllocate(Length,Alignment,Flags:LongWord):THandle;
Description: Allocate GPU Memory from the Mailbox property tags channel
[Expand]
function RPiGPUMemoryRelease(Handle:THandle):LongWord;
Description: Release GPU Memory from the Mailbox property tags channel
[Expand]
function RPiGPUMemoryLock(Handle:THandle):LongWord;
Description: Lock GPU Memory from the Mailbox property tags channel
[Expand]
function RPiGPUMemoryUnlock(Handle:THandle):LongWord;
Description: Unlock GPU Memory from the Mailbox property tags channel
[Expand]
function RPiGPUExecuteCode(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord;
Description: Execute GPU Code from the Mailbox property tags channel
[Expand]
function RPiDispmanxHandleGet(Resource:THandle):THandle;
Description: Get Dispmanx Memory Handle from the Mailbox property tags channel
[Expand]
function RPiEDIDBlockGet(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Description: Get EDID Block from the Mailbox property tags channel
[Expand]
function RPiFramebufferAllocate(Alignment:LongWord; var Address,Length:LongWord):LongWord;
Description: Allocate Framebuffer from the Mailbox property tags channel
[Expand]
function RPiFramebufferRelease:LongWord;
Description: Release Framebuffer from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetState(State:LongWord):LongWord;
Description: Set Framebuffer State (Blank Screen) from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetDimensions(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord;
Description: Get Framebuffer Dimensions from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetPhysical(var Width,Height:LongWord):LongWord;
Description: Get Framebuffer Physical size from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetPhysical(var Width,Height:LongWord):LongWord;
Description: Set Framebuffer Physical size from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestPhysical(var Width,Height:LongWord):LongWord;
Description: Test Framebuffer Physical size from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetVirtual(var Width,Height:LongWord):LongWord;
Description: Get Framebuffer Virtual size from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetVirtual(var Width,Height:LongWord):LongWord;
Description: Set Framebuffer Virtual size from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestVirtual(var Width,Height:LongWord):LongWord;
Description: Test Framebuffer Virtual size from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetDepth(var Depth:LongWord):LongWord;
Description: Get Framebuffer Depth (Bits per pixel) from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetDepth(var Depth:LongWord):LongWord;
Description: Set Framebuffer Depth (Bits per pixel) from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestDepth(var Depth:LongWord):LongWord;
Description: Test Framebuffer Depth (Bits per pixel) from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetPixelOrder(var Order:LongWord):LongWord;
Description: Get Framebuffer Pixel Order (RGB) from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetPixelOrder(var Order:LongWord):LongWord;
Description: Set Framebuffer Pixel Order (RGB) from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestPixelOrder(var Order:LongWord):LongWord;
Description: Test Framebuffer Pixel Order (RGB) from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetAlphaMode(var Mode:LongWord):LongWord;
Description: Get Framebuffer Alpha Mode from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetAlphaMode(var Mode:LongWord):LongWord;
Description: Set Framebuffer Alpha Mode from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestAlphaMode(var Mode:LongWord):LongWord;
Description: Test Framebuffer Alpha Mode from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetPitch:LongWord;
Description: Get Framebuffer Pitch (Bytes per line) from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetOffset(var X,Y:LongWord):LongWord;
Description: Get Framebuffer Virtual Offset from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetOffset(var X,Y:LongWord):LongWord;
Description: Set Framebuffer Virtual Offset from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestOffset(var X,Y:LongWord):LongWord;
Description: Test Framebuffer Virtual Offset from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Description: Get Framebuffer Overscan from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Description: Set Framebuffer Overscan from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Description: Test Framebuffer Overscan from the Mailbox property tags channel
[Expand]
function RPiFramebufferGetPalette(Buffer:Pointer; Length:LongWord):LongWord;
Description: Get Framebuffer Palette from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Description: Set Framebuffer Palette from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Description: Test Framebuffer Palette from the Mailbox property tags channel
[Expand]
function RPiFramebufferTestVsync:LongWord;
Description: Test Framebuffer Vertical Sync from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetVsync:LongWord;
Description: Set Framebuffer Vertical Sync from the Mailbox property tags channel
[Expand]
function RPiFramebufferSetBacklight(Brightness:LongWord):LongWord;
Description: Set Framebuffer Backlight Brightness from the Mailbox property tags channel
[Expand]
function RPiTouchGetBuffer(var Address:LongWord):LongWord;
Description: Get the Touchscreen buffer from the Mailbox property tags channel
[Expand]
function RPiCursorSetDefault:LongWord;
Description: Set Cursor Default (Pixels) from the Mailbox property tags channel
[Expand]
function RPiCursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord;
Description: Set Curson Info (Pixels) from the Mailbox property tags channel
[Expand]
function RPiCursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord;
Description: Set Cursor State (Enable, X, Y) from the Mailbox property tags channel
[Expand]
function RPiDMAGetChannels:LongWord;
Description: Get the available DMA Channels from the Mailbox property tags channel
RPi tthread functions
RPi IRQ functions
[Expand]
function RPiDispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Description: Process any pending IRQ requests
[Expand]
function RPiHandleIRQ(Number,CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Description: Call the handler function for an IRQ that was received, or halt if it doesn't exist
RPi FIQ functions
[Expand]
function RPiDispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Description: Process any pending FIQ requests
[Expand]
function RPiHandleFIQ(Number,CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Description: Call the handler function for an FIQ that was received, or halt if it doesn't exist
RPi SWI functions
[Expand]
function RPiDispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle;
Description: Process an SWI request
RPi clock functions
[Expand]
procedure RPiClockInterrupt(Parameter:Pointer);
Description: Interrupt handler function for the clock interrupt
[Expand]
procedure RPiClockUpdate(Cycles:LongWord; var Last:LongWord);
Description: Setup a clock interrupt to trigger after the specified number of clock cycles
RPi scheduler functions
[Expand]
function RPiSchedulerInterrupt(CPUID:LongWord; Thread:TThreadHandle; Parameter:Pointer):TThreadHandle;
Description: Interrupt handler function for the scheduler interrupt
[Expand]
procedure RPiSchedulerUpdate(Cycles:LongWord; var Last:LongWord);
Description: Setup a scheduler interrupt to trigger after the specified number of clock cycles
[Expand]
procedure RPiSchedulerSystemCall(Request:PSystemCallRequest);
Description: System Call handler for the scheduler
RPi framebuffer functions
[Expand]
function RPiFramebufferDeviceAllocate(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Allocate a framebuffer using the Mailbox Property Tags
[Expand]
function RPiFramebufferDeviceAllocateAlt(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Allocate a framebuffer using a simple Mailbox Call
[Expand]
function RPiFramebufferDeviceRelease(Framebuffer:PFramebufferDevice):LongWord;
Description: To be documented
[Expand]
function RPiFramebufferDeviceBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
Description: To be documented
[Expand]
function RPiFramebufferDeviceCommit(Framebuffer:PFramebufferDevice; Address,Size,Flags:LongWord):LongWord;
Description: To be documented
[Expand]
function RPiFramebufferDeviceSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
Description: To be documented
[Expand]
function RPiFramebufferDeviceSetProperties(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: To be documented
RPi helper functions
[Expand]
procedure RPiBootBlink; assembler; nostackframe;
Description: Blink the Activity LED without dependency on any other RTL setup
[Expand]
function RPiConvertPowerIdRequest(PowerId:LongWord):LongWord;
Description: Convert Ultibo Power Id to BCM2835 Power Id
[Expand]
function RPiConvertPowerStateRequest(PowerState:LongWord):LongWord;
Description: Convert Ultibo Power State to BCM2835 Power State
[Expand]
function RPiConvertPowerStateResponse(PowerState:LongWord):LongWord;
Description: Convert BCM2835 Power State to Ultibo Power State
[Expand]
function RPiConvertClockIdRequest(ClockId:LongWord):LongWord;
Description: Convert Ultibo Clock Id to BCM2835 Clock Id
[Expand]
function RPiConvertClockStateRequest(ClockState:LongWord):LongWord;
Description: Convert Ultibo Clock State to BCM2835 Clock State
[Expand]
function RPiConvertClockStateResponse(ClockState:LongWord):LongWord;
Description: Convert BCM2835 Clock State to Ultibo Clock State
[Expand]
function RPiConvertVoltageIdRequest(VoltageId:LongWord):LongWord;
Description: Convert Ultibo Voltage Id to BCM2835 Voltage Id
[Expand]
function RPiConvertTemperatureIdRequest(TemperatureId:LongWord):LongWord;
Description: Convert Ultibo Temperature Id to BCM2835 Temperature Id
Return to Unit Reference