Difference between revisions of "Unit Platform"
Line 1,622: | Line 1,622: | ||
|- | |- | ||
! '''Note''' | ! '''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 | + | | 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. |
|- | |- | ||
|} | |} | ||
Line 1,634: | Line 1,634: | ||
|- | |- | ||
! '''Note''' | ! '''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 | + | | 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. |
|- | |- | ||
|} | |} |
Revision as of 01:02, 14 November 2016
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
procedure PlatformInit;
Note | None documented |
---|
procedure CPUInit;
Note | None documented |
---|
procedure FPUInit;
Note | None documented |
---|
procedure GPUInit;
Note | None documented |
---|
procedure MMUInit;
Note | None documented |
---|
procedure SMPInit;
Note | Secondary CPU boot is performed by SecondaryInit in Threads |
---|
procedure CacheInit;
Note | None documented |
---|
procedure BoardInit;
Note | None documented |
---|
procedure MemoryInit;
Note | None documented |
---|
procedure ClockInit;
Note | None documented |
---|
procedure PowerInit;
Note | None documented |
---|
procedure MailboxInit;
Note | None documented |
---|
procedure InterruptInit;
Note | None documented |
---|
procedure PeripheralInit;
Note | None documented |
---|
procedure ParseBootTags;
Note | None documented |
---|
procedure ParseCommandLine;
Note | None documented |
---|
procedure ParseEnvironment;
Note | None documented |
---|
Boot functions
procedure BootBlink; inline;
Note | Intended for startup diagnostics when bootstrapping a new board |
---|
LED functions
procedure PowerLEDEnable; inline;
Note | None documented |
---|
procedure PowerLEDOn; inline;
Note | None documented |
---|
procedure PowerLEDOff; inline;
Note | None documented |
---|
procedure ActivityLEDEnable; inline;
Note | None documented |
---|
procedure ActivityLEDOn; inline;
Note | None documented |
---|
procedure ActivityLEDOff; inline;
Note | None documented |
---|
Counter functions (Timer device)
function CounterAvailable:Boolean; inline;
Note | None documented |
---|
function CounterRead:LongWord; inline;
Return | The 32 bit current value of the counter or 0 on failure |
---|
function CounterRead64:Int64; inline;
Return | The 64 bit current value of the counter or 0 on failure |
---|
function CounterWait:LongWord; inline;
Return | ERROR_SUCCESS if the interval expired or another error code on failure |
---|
function CounterEvent(Callback:TCounterCallback; Data:Pointer):LongWord; inline;
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 |
function CounterCancel:LongWord; inline;
Return | ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure |
---|
function CounterGetRate:LongWord; inline;
Return | The current clock rate in Hz or 0 on failure |
---|
function CounterSetRate(Rate:LongWord):LongWord; inline;
Rate | The clock rate in Hz to set |
---|---|
Return | ERROR_SUCCESS if the clock rate was set or another error code on failure |
function CounterGetInterval:LongWord; inline;
Return | The current interval in ticks or 0 on failure (or not set) |
---|---|
Note | The tick rate is determined by the clock rate |
function CounterSetInterval(Interval:LongWord):LongWord; inline;
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
function MailboxReceive(Mailbox,Channel:LongWord):LongWord; inline;
Note | None documented |
---|
procedure MailboxSend(Mailbox,Channel,Data:LongWord); inline;
Note | None documented |
---|
function MailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord; inline;
Note | None documented |
---|
function MailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord; inline;
Note | None documented |
---|
function MailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord; inline;
Note | None documented |
---|
function MailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord; inline;
Note | None documented |
---|
Random number functions
function RandomAvailable:Boolean; inline;
Note | The software random number generator from the RTL is always available |
---|
procedure RandomSeed(Seed:LongWord); inline;
Note | None documented |
---|
function RandomReadLongInt(Limit:LongInt):LongInt; inline;
Note | None documented |
---|
function RandomReadInt64(Limit:Int64):Int64; inline;
Note | None documented |
---|
function RandomReadExtended:Extended; inline;
Note | None documented |
---|
Watchdog Timer Functions
function WatchdogAvailable:Boolean; inline;
Note | None documented |
---|
function WatchdogStart(Milliseconds:LongWord):LongWord; inline;
Note | None documented |
---|
function WatchdogStop:LongWord; inline;
Note | None documented |
---|
function WatchdogRefresh(Milliseconds:LongWord):LongWord; inline;
Note | None documented |
---|
Interrupt request (IRQ) functions
function RequestIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Note | If the IRQ number is already registered then the request will fail |
---|
function ReleaseIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Note | If the IRQ number is not currently registered then the request will fail |
---|
function RequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Note | If the IRQ number is already registered then the request will fail |
---|
function ReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Note | If the IRQ number is not currently registered then the request will fail |
---|
Fast interrupt request (FIQ) functions
function RequestFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Note | If the FIQ number is already registered then the request will fail |
---|
function ReleaseFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; Parameter:Pointer):LongWord; inline;
Note | If the FIQ number is not currently registered then the request will fail |
---|
function RequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Note | If the FIQ number is already registered then the request will fail |
---|
function ReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord; inline;
Note | If the FIQ number is not currently registered then the request will fail |
---|
System call (Software Interrupt or SWI) functions
procedure SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); inline;
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) |
function RegisterSystemCall(Number:LongWord; Handler:TSystemCallHandler):LongWord; inline;
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 |
function DeregisterSystemCall(Number:LongWord; Handler:TSystemCallHandler):LongWord; inline;
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 |
function RegisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord; inline;
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 |
function DeregisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord; inline;
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
function GetInterruptCount:LongWord; inline;
Note | None documented |
---|
function GetInterruptStart:LongWord; inline;
Note | None documented |
---|
function GetInterruptEntry(Number:LongWord):TInterruptEntry; inline;
Note | None documented |
---|
Local interrupt entry functions
function GetLocalInterruptCount:LongWord; inline;
Note | None documented |
---|
function GetLocalInterruptStart:LongWord; inline;
Note | None documented |
---|
function GetLocalInterruptEntry(CPUID,Number:LongWord):TInterruptEntry; inline;
Note | None documented |
---|
System call entry functions
function GetSystemCallCount:LongWord; inline;
Note | None documented |
---|
function GetSystemCallEntry(Number:LongWord):TSystemCallEntry; inline;
Note | None documented |
---|
System functions
function SystemRestart(Delay:LongWord):LongWord; inline;
Note | None documented |
---|
function SystemShutdown(Delay:LongWord):LongWord; inline;
Note | None documented |
---|
function SystemGetUptime:Int64; inline;
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 |
function SystemGetCommandLine:String; inline;
Note | None documented |
---|
function SystemGetEnvironment:Pointer; inline;
Note | None documented |
---|
CPU Functions
function CPUGetArch:LongWord; inline;
Note | None documented |
---|
function CPUGetType:LongWord; inline;
Note | None documented |
---|
function CPUGetBoot:LongWord; inline;
Note | None documented |
---|
function CPUGetMask:LongWord; inline;
Note | None documented |
---|
function CPUGetCount:LongWord; inline;
Note | None documented |
---|
function CPUGetMode:LongWord; inline;
Note | The return value is specific to the CPU type |
---|
function CPUGetState:LongWord; inline;
Note | None documented |
---|
function CPUGetCurrent:LongWord; inline;
Note | None documented |
---|
function CPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord; inline;
Note | None documented |
---|
function CPUGetPercentage(CPUID:LongWord):Double; inline;
CPUID | The CPU to get utilization from or CPU_ID_ALL for average of all CPUs |
---|
function CPUGetUtilization(CPUID:LongWord):LongWord; inline;
CPUID | The CPU to get utilization from or CPU_ID_ALL for average of all CPUs |
---|
function CPUGetModel:LongWord; inline;
Note | None documented |
---|
function CPUGetRevision:LongWord; inline;
Note | The return value is specific to the CPU type and model |
---|
function CPUGetDescription:String; inline;
Note | None documented |
---|
FPU functions
function FPUGetType:LongWord; inline;
Note | None documented |
---|
function FPUGetState:LongWord; inline;
Note | None documented |
---|
GPU functions
function GPUGetType:LongWord; inline;
Note | None documented |
---|
function GPUGetState:LongWord; inline;
Note | None documented |
---|
function GPUGetMemory(var Address:PtrUInt; var Length:LongWord):LongWord; inline;
Note | None documented |
---|
Cache functions
function L1CacheGetType:LongWord; inline;
Note | None documented |
---|
function L1DataCacheGetSize:LongWord; inline;
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. |
---|
function L1DataCacheGetLineSize:LongWord; inline;
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. |
---|
function L1InstructionCacheGetSize:LongWord; inline;
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. |
---|
function L1InstructionCacheGetLineSize:LongWord; inline;
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. |
---|
function L2CacheGetType:LongWord; inline;
Note | None documented |
---|
function L2CacheGetSize:LongWord; inline;
Note | If L2 cache is not supported, the size returned is zero |
---|
function L2CacheGetLineSize:LongWord; inline;
Note | If L2 cache is not supported, the size returned is zero |
---|
Board functions
function BoardGetType:LongWord; inline;
Note | None documented |
---|
function BoardGetModel:LongWord; inline;
Note | None documented |
---|
function BoardGetSerial:Int64; inline;
Note | None documented |
---|
function BoardGetRevision:LongWord; inline;
Note | None documented |
---|
function BoardGetMACAddress:String; inline;
Note | None documented |
---|
Firmware functions
function FirmwareGetRevision:LongWord; inline;
Note | None documented |
---|
Machine functions
function MachineGetType:LongWord; inline;
Note | None documented |
---|
Memory functions
function MemoryGetBase:PtrUInt; inline;
Note | None documented |
---|
function MemoryGetSize:LongWord; inline;
Note | None documented |
---|
function MemoryGetPageSize:LongWord; inline;
Note | None documented |
---|
function MemoryGetLargePageSize:LongWord; inline;
Note | None documented |
---|
Power functions
function PowerOn(PowerId:LongWord):LongWord;
Note | None documented |
---|
function PowerOff(PowerId:LongWord):LongWord;
Note | None documented |
---|
function PowerGetWait(PowerId:LongWord):LongWord; inline;
Note | None documented |
---|
function PowerGetState(PowerId:LongWord):LongWord; inline;
Note | None documented |
---|
function PowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord; inline;
Note | None documented |
---|
Clock functions
function ClockGetTime:Int64;
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. |
function ClockSetTime(const Time:Int64; RTC:Boolean):Int64;
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. |
function ClockGetCount:LongWord; inline;
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. |
---|
function ClockGetTotal:Int64; inline;
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. |
---|
function Clock?pdateOffset:LongWord; inline;
Note | None documented |
---|
function ClockGetRate(ClockId:LongWord):LongWord; inline;
Note | None documented |
---|
function ClockSetRate(ClockId,Rate:LongWord; Turbo:Boolean):LongWord; inline;
Note | None documented |
---|
function ClockGetState(ClockId:LongWord):LongWord; inline;
Note | None documented |
---|
function ClockSetState(ClockId,State:LongWord):LongWord; inline;
Note | None documented |
---|
function ClockGetMinRate(ClockId:LongWord):LongWord; inline;
Note | None documented |
---|
function ClockGetMaxRate(ClockId:LongWord):LongWord; inline;
Note | None documented |
---|
Turbo functions
function TurboGetState(TurboId:LongWord):LongWord; inline;
Note | None documented |
---|
function TurboSetState(TurboId,State:LongWord):LongWord; inline;
Note | None documented |
---|
Voltage functions
function VoltageGetValue(VoltageId:LongWord):LongWord; inline;
Note | None documented |
---|
function VoltageSetValue(VoltageId,Value:LongWord):LongWord; inline;
Note | None documented |
---|
function VoltageGetMinValue(VoltageId:LongWord):LongWord; inline;
Note | None documented |
---|
function VoltageGetMaxValue(VoltageId:LongWord):LongWord; inline;
Note | None documented |
---|
Temperature functions
function TemperatureGetCurrent(TemperatureId:LongWord):LongWord; inline;
Note | None documented |
---|
function TemperatureGetMaximum(TemperatureId:LongWord):LongWord; inline;
Note | None documented |
---|
GPU memory functions
function GPUMemoryAllocate(Length,Alignment,Flags:LongWord):THandle; inline;
Note | None documented |
---|
function GPUMemoryRelease(Handle:THandle):LongWord; inline;
Note | None documented |
---|
function GPUMemoryLock(Handle:THandle):LongWord; inline;
Note | None documented |
---|
function GPUMemoryUnlock(Handle:THandle):LongWord; inline;
Note | None documented |
---|
GPU misc functions
function GPUExecuteCode(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord; inline;
Note | None documented |
---|
function DispmanxHandleGet(Resource:THandle):THandle; inline;
Note | None documented |
---|
function EDIDBlockGet(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord; inline;
Note | None documented |
---|
Framebuffer functions
function FramebufferAvailable:Boolean; inline;
Note | None documented |
---|
function FramebufferAllocate(Alignment:LongWord; var Address,Length:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferRelease:LongWord; inline;
Note | None documented |
---|
function FramebufferSetState(State:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetDimensions(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetPhysical(var Width,Height:LongWord):LongWord; inline;
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 |
---|
function FramebufferSetPhysical(var Width,Height:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestPhysical(var Width,Height:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetVirtual(var Width,Height:LongWord):LongWord; inline;
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 |
---|
function FramebufferSetVirtual(var Width,Height:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestVirtual(var Width,Height:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetDepth(var Depth:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetDepth(var Depth:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestDepth(var Depth:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetPixelOrder(var Order:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetPixelOrder(var Order:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestPixelOrder(var Order:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetAlphaMode(var Mode:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetAlphaMode(var Mode:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestAlphaMode(var Mode:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetPitch:LongWord; inline;
Note | None documented |
---|
function FramebufferGetOffset(var X,Y:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetOffset(var X,Y:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestOffset(var X,Y:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestOverscan(var Top,Bottom,Left,Right:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferGetPalette(Buffer:Pointer; Length:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord; inline;
Note | None documented |
---|
function FramebufferSetBacklight(Brightness:LongWord):LongWord; inline;
Note | None documented |
---|
Touch functions
function TouchGetBuffer(var Address:LongWord):LongWord; inline;
Note | None documented |
---|
Cursor functions
function CursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord; inline;
Note | None documented |
---|
function CursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord; inline;
Relative | X, Y is relative to Display (Virtual) not Framebuffer (Physical) |
---|
DMA functions
function DMAAvailable:Boolean; inline;
Note | None documented |
---|
function DMATransfer(Data:PDMAData; Direction,Peripheral:LongWord):LongWord; inline;
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) |
function DMAFillMemory(Dest:Pointer; Size:LongWord; Value:Byte):LongWord; inline;
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 |
function DMACopyMemory(Source,Dest:Pointer; Size:LongWord):LongWord; inline;
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 |
function DMAReadPeripheral(Address,Dest:Pointer; Size,Peripheral:LongWord):LongWord; inline;
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) |
function DMAWritePeripheral(Source,Address:Pointer; Size,Peripheral:LongWord):LongWord; inline;
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) |
function DMAAllocateBuffer(Size:LongWord):Pointer; inline;
Size | The size of the buffer to allocate |
---|
function DMAAllocateBufferEx(var Size:LongWord):Pointer; inline;
Size | The size of the buffer to allocate (Updated on return to actual size) |
---|
function DMAReleaseBuffer(Buffer:Pointer):LongWord; inline;
Buffer | The buffer to be released |
---|
function DMAGetChannels:LongWord; inline;
Note | None documented |
---|
GPIO functions
function GPIOAvailable:Boolean; inline;
Reg | The memory register to read from |
---|---|
Value | The value of the memory register |
function GPIORead(Reg:LongWord):LongWord; inline;
Reg | The memory register to read from |
---|---|
Value | The value of the memory register |
procedure GPIOWrite(Reg,Value:LongWord); inline;
Reg | The memory register to write to |
---|---|
Value | The value to write to the register |
function GPIOInputGet(Pin:LongWord):LongWord; inline;
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 |
function GPIOInputWait(Pin,Trigger,Timeout:LongWord):LongWord; inline;
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 |
function GPIOInputEvent(Pin,Trigger,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord; inline;
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 |
function GPIOOutput?et(Pin,Level:LongWord):LongWord; inline;
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 |
function GPIOPullGet(Pin:LongWord):LongWord; inline;
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 |
function GPIOPullSelect(Pin,Mode:LongWord):LongWord; inline;
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