Difference between revisions of "Unit GPIO"
Line 134: | Line 134: | ||
---- | ---- | ||
− | '' | + | |
+ | '''GPIO properties''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGPIOProperties = ^TGPIOProperties;</code> | ||
+ | |||
+ | <code>TGPIOProperties = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | Device flags (eg GPIO_FLAG_TRIGGER_HIGH) | ||
+ | |- | ||
+ | | <code>PinMin:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PinMax:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PinCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FunctionMin:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FunctionMax:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FunctionCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GPIO event''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGPIOEvent = ^TGPIOEvent;</code> | ||
+ | |||
+ | <code>TGPIOEvent = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Pin:PGPIOPin;</code> | ||
+ | | GPIO Pin this event belongs to | ||
+ | |- | ||
+ | | <code>Callback:TGPIOCallback;</code> | ||
+ | | Callback function to call when trigger occurs | ||
+ | |- | ||
+ | | <code>Data:Pointer;</code> | ||
+ | | Pointer to pass to the callback function when trigger occurs | ||
+ | |- | ||
+ | | <code>Timeout:LongWord;</code> | ||
+ | | Timeout in milliseconds for this callback (or INFINITE for no timeout) | ||
+ | |- | ||
+ | | <code>Prev:PGPIOEvent;</code> | ||
+ | | Previous event in the list | ||
+ | |- | ||
+ | | <code>Next:PGPIOEvent;</code> | ||
+ | | Next event in the list | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GPIO pin''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGPIOPin = ^TGPIOPin;</code> | ||
+ | |||
+ | <code>TGPIOPin = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: Forward declared for GPIOEvent | ||
+ | |- | ||
+ | | <code>GPIO:PGPIODevice;</code> | ||
+ | | GPIO device this pin belongs to | ||
+ | |- | ||
+ | | <code>Pin:LongWord;</code> | ||
+ | | Pin number of this pin on the device (May be used by drivers for internal numbering) | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | Current flags for this pin (eg GPIO_EVENT_FLAG_REPEAT) | ||
+ | |- | ||
+ | | <code>Trigger:LongWord;</code> | ||
+ | | Current trigger value for this pin (or GPIO_TRIGGER_NONE if no triggers current) | ||
+ | |- | ||
+ | | <code>Count:LongWord;</code> | ||
+ | | Count of threads and events waiting for the trigger | ||
+ | |- | ||
+ | | <code>Event:TEventHandle;</code> | ||
+ | | Event for threads waiting for the trigger | ||
+ | |- | ||
+ | | <code>Events:PGPIOEvent;</code> | ||
+ | | List of events waiting for the trigger | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GPIO enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIOEnumerate = function(GPIO:PGPIODevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIONotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceStart = function(GPIO:PGPIODevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceStop = function(GPIO:PGPIODevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device read''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceRead = function(GPIO:PGPIODevice; Reg:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device write''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceWrite = procedure(GPIO:PGPIODevice; Reg,Value:LongWord);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device input get''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceInputGet = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device input wait''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceInputWait = function(GPIO:PGPIODevice; Pin,Trigger,Timeout:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device input event''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceInputEvent = function(GPIO:PGPIODevice; Pin,Trigger,Flags,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device input cancel''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceInputCancel = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device output set''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceOutputSet = function(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device pull get''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODevicePullGet = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device pull select''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODevicePullSelect = function(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device function get''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceFunctionGet = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device function select''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceFunctionSelect = function(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device properties''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TGPIODeviceProperties = function(GPIO:PGPIODevice; Properties:PGPIOProperties):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''GPIO device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGPIODevice = ^TGPIODevice;</code> | ||
+ | |||
+ | <code>TGPIODevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: Forward declared for GPIOPin | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this GPIO | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Properties'' | ||
+ | |- | ||
+ | | <code>GPIOId:LongWord;</code> | ||
+ | | Unique Id of this GPIO in the GPIO table | ||
+ | |- | ||
+ | | <code>GPIOState:LongWord;</code> | ||
+ | | GPIO state (eg GPIO_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>DeviceStart:TGPIODeviceStart;</code> | ||
+ | | A Device specific DeviceStart method implementing the standard GPIO device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceStop:TGPIODeviceStop;</code> | ||
+ | | A Device specific DeviceStop method implementing the standard GPIO device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceRead:TGPIODeviceRead;</code> | ||
+ | | A Device specific DeviceRead method implementing the standard GPIO device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceWrite:TGPIODeviceWrite;</code> | ||
+ | | A Device specific DeviceWrite method implementing the standard GPIO device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceInputGet:TGPIODeviceInputGet;</code> | ||
+ | | A Device specific DeviceInputGet method implementing the standard GPIO device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DeviceInputWait:TGPIODeviceInputWait;</code> | ||
+ | | A Device specific DeviceInputWait method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceInputEvent:TGPIODeviceInputEvent;</code> | ||
+ | | A Device specific DeviceInputEvent method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceInputCancel:TGPIODeviceInputCancel;</code> | ||
+ | | A Device specific DeviceInputCancel method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceOutputSet:TGPIODeviceOutputSet;</code> | ||
+ | | A Device specific DeviceOutputSet method implementing the standard GPIO device interface (Mandatory) | ||
+ | |- | ||
+ | | <code>DevicePullGet:TGPIODevicePullGet;</code> | ||
+ | | A Device specific DevicePullGet method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DevicePullSelect:TGPIODevicePullSelect;</code> | ||
+ | | A Device specific DevicePullSelect method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceFunctionGet:TGPIODeviceFunctionGet;</code> | ||
+ | | A Device specific DeviceFunctionGet method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceFunctionSelect:TGPIODeviceFunctionSelect;</code> | ||
+ | | A Device specific DeviceFunctionSelect method implementing the standard GPIO device interface (Or nil if the operation is not supported) | ||
+ | |- | ||
+ | | <code>DeviceProperties:TGPIODeviceProperties;</code> | ||
+ | | A Device specific DeviceProperties method implementing the standard GPIO device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Device register base address | ||
+ | |- | ||
+ | | <code>Pins:array of TGPIOPin;</code> | ||
+ | | Device pins | ||
+ | |- | ||
+ | | <code>Properties:TGPIOProperties;</code> | ||
+ | | Device properties | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>GetCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SetCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>WaitCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EventCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PGPIODevice;</code> | ||
+ | | Previous entry in GPIO table | ||
+ | |- | ||
+ | | <code>Next:PGPIODevice;</code> | ||
+ | | Next entry in GPIO table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''GPIO pin information''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PGPIOInfo = ^TGPIOInfo;</code> | ||
+ | |||
+ | <code>TGPIOInfo = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: Used by other units to pass complete details of a GPIO pin | ||
+ | |- | ||
+ | | <code>GPIO:PGPIODevice;</code> | ||
+ | | Device for this GPIO pin | ||
+ | |- | ||
+ | | <code>Pin:LongWord;</code> | ||
+ | | Pin number (eg GPIO_PIN_59) | ||
+ | |- | ||
+ | | <code>Func:LongWord;</code> | ||
+ | | Function value (or GPIO_FUNCTION_UNKNOWN) | ||
+ | |- | ||
+ | | <code>Pull:LongWord;</code> | ||
+ | | Pull Up/Down value (or GPIO_PULL_UNKNOWN) | ||
+ | |- | ||
+ | | <code>Trigger:LongWord;</code> | ||
+ | | Trigger value (or GPIO_TRIGGER_UNKNOWN) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Revision as of 03:55, 19 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo GPIO interface unit
GPIO devices represent the external or internal pins available on most system on chip (SoC) devices to provide control and interfacing capabilities for both hardware and software.
This unit maintains pin numbering exactly as per the SoC documentation but abstracts other features such as alternate function selects to avoid exposing chip specific values via the API.
Not all GPIO devices support the same feature set so the GPIODeviceProperties function returns a structure which describes the number of pins as well as minimum and maximum pin numbers along with a set of flags that indicate what functionality is supported by the device.
Multiple GPIO devices can be accomodated, each one is registered with this unit when the driver for the device is loaded and initialized. This unit includes functions for enumerating the devices that are available and each function takes a GPIODevice parameter to allow specifying the exact device to control.
Simplified versions of many of the functions in this unit are provided in the Platform unit to allow control of the default GPIO device and in cases where there is only one device registered these functions will provide most of the capability required.
Constants
GPIO_*
GPIO_TYPE_*
GPIO_STATE_*
GPIO_FLAG_*
GPIO_EVENT_FLAG_*
GPIO_LOG_*
Type definitions
GPIO properties
GPIO event
GPIO pin
GPIO enumeration callback
TGPIOEnumerate = function(GPIO:PGPIODevice; Data:Pointer):LongWord;
|
GPIO notification callback
TGPIONotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
GPIO device start
TGPIODeviceStart = function(GPIO:PGPIODevice):LongWord;
|
GPIO device stop
TGPIODeviceStop = function(GPIO:PGPIODevice):LongWord;
|
GPIO device read
TGPIODeviceRead = function(GPIO:PGPIODevice; Reg:LongWord):LongWord;
|
GPIO device write
TGPIODeviceWrite = procedure(GPIO:PGPIODevice; Reg,Value:LongWord);
|
GPIO device input get
TGPIODeviceInputGet = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;
|
GPIO device input wait
TGPIODeviceInputWait = function(GPIO:PGPIODevice; Pin,Trigger,Timeout:LongWord):LongWord;
|
GPIO device input event
TGPIODeviceInputEvent = function(GPIO:PGPIODevice; Pin,Trigger,Flags,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord;
|
GPIO device input cancel
TGPIODeviceInputCancel = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;
|
GPIO device output set
TGPIODeviceOutputSet = function(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;
|
GPIO device pull get
TGPIODevicePullGet = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;
|
GPIO device pull select
TGPIODevicePullSelect = function(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
|
GPIO device function get
TGPIODeviceFunctionGet = function(GPIO:PGPIODevice; Pin:LongWord):LongWord;
|
GPIO device function select
TGPIODeviceFunctionSelect = function(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
|
GPIO device properties
TGPIODeviceProperties = function(GPIO:PGPIODevice; Properties:PGPIOProperties):LongWord;
|
GPIO device types
GPIO pin information
Public variables
GPIO logging
GPIO_DEFAULT_LOG_LEVEL:LongWord = GPIO_LOG_LEVEL_DEBUG;
|
Minimum level for GPIO messages. Only messages with level greater than or equal to this will be printed. |
GPIO_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
GPIO functions
function GPIODeviceStart(GPIO:PGPIODevice):LongWord;
function GPIODeviceStop(GPIO:PGPIODevice):LongWord;
function GPIODeviceRead(GPIO:PGPIODevice; Reg:LongWord):LongWord;
procedure GPIODeviceWrite(GPIO:PGPIODevice; Reg,Value:LongWord);
function GPIODeviceInputGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
function GPIODeviceInputWait(GPIO:PGPIODevice; Pin,Trigger,Timeout:LongWord):LongWord;
function GPIODeviceInputEvent(GPIO:PGPIODevice; Pin,Trigger,Flags,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord;
function GPIODeviceInputCancel(GPIO:PGPIODevice; Pin:LongWord):LongWord;
function GPIODeviceOutputSet(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;
function GPIODevicePullGet(GPIO:PGPIODevice;Pin:LongWord):LongWord;
function GPIODevicePullSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
function GPIODeviceFunctionGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
function GPIODeviceProperties(GPIO:PGPIODevice; Properties:PGPIOProperties):LongWord;
function GPIODeviceCreateEx(Size:LongWord):PGPIODevice;
function GPIODeviceDestroy(GPIO:PGPIODevice):LongWord;
function GPIODeviceRegister(GPIO:PGPIODevice):LongWord;
function GPIODeviceDeregister(GPIO:PGPIODevice):LongWord;
function GPIODeviceFind(GPIOId:LongWord):PGPIODevice;
function GPIODeviceFindByName(const Name:String):PGPIODevice; inline;
function GPIODeviceFindByDescription(const Description:String):PGPIODevice; inline;
function GPIODeviceEnumerate(Callback:TGPIOEnumerate; Data:Pointer):LongWord;
function GPIODeviceNotification(GPIO:PGPIODevice; Callback:TGPIONotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
RTL GPIO functions
function SysGPIOInputGet(Pin:LongWord):LongWord;
function SysGPIOInputWait(Pin,Trigger,Timeout:LongWord):LongWord;
function SysGPIOInputEvent(Pin,Trigger,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord;
function SysGPIOOutputSet(Pin,Level:LongWord):LongWord;
function SysGPIOPullGet(Pin:LongWord):LongWord;
function SysGPIOPullSelect(Pin,Mode:LongWord):LongWord;
function SysGPIOFunctionGet(Pin:LongWord):LongWord;
function SysGPIOFunctionSelect(Pin,Mode:LongWord):LongWord;
GPIO helper functions
function GPIODeviceGetDefault:PGPIODevice; inline;
function GPIODeviceSetDefault(GPIO:PGPIODevice):LongWord;
function GPIODeviceCheck(GPIO:PGPIODevice):PGPIODevice;
function GPIODeviceCreateEvent(GPIO:PGPIODevice; Pin:PGPIOPin; Callback:TGPIOCallback; Data:Pointer; Timeout:LongWord):PGPIOEvent;
function GPIODeviceDestroyEvent(GPIO:PGPIODevice; Event:PGPIOEvent):LongWord;
function GPIODeviceRegisterEvent(GPIO:PGPIODevice; Pin:PGPIOPin; Event:PGPIOEvent):LongWord;
function GPIODeviceDeregisterEvent(GPIO:PGPIODevice;Pin:PGPIOPin;Event:PGPIOEvent):LongWord;
procedure GPIOLog(Level:LongWord; GPIO:PGPIODevice; const AText:String);
procedure GPIOLogError(GPIO:PGPIODevice; const AText:String);
procedure GPIOLogDebug(GPIO:PGPIODevice; const AText:String);
Return to Unit Reference