[Overview][Resource strings][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implementation using the Linux Kernel Driver
Source position: fpgpio.pas.bak line 195
type TGpioLinuxPin = class(TGpioPin) |
||
protected |
||
function GetActiveLow; override; |
||
class function ReadFromFile(); |
||
procedure SetActiveLow(); override; |
||
class procedure WriteToFile(); |
||
class procedure SetExport(); |
||
class function GetEdgeString(); |
||
class function EdgeStringToInterruptMode(); |
||
function GetDirection; override; |
||
function GetInterruptMode; override; |
||
function GetValue; override; |
||
procedure SetDirection(); override; |
||
procedure SetInterruptMode(); override; |
||
procedure SetValue(); override; |
||
public |
||
Const |
||
INTERRUPT_WAIT_INFINITE = - 1 |
||
constructor Create(); |
|
Creates a new instance |
destructor Destroy; override; |
||
function WaitForInterrupt(); override; |
||
property PinID: LongWord; [r] |
|
The GPIO's ID in the Linux Kernel driver |
end; |
|
Implementation using the Linux Kernel Driver |
|
| | ||
|
Abstract GPIO class |
|
| | ||
TObject |
The Linux Kernel exposes GPIO pins to user mode applications through the filesystem interface located at /sys/class/gpio/. This is used by this class. This class should be threadsafe (not tested!). You should be able to read values in one thread while another thread is waiting for an interrupt.