In the following program the testing condition on GPIO's direction is never executed.
program Project1;
{$mode objfpc}{$H+}
uses
pascalio, fpgpio
{ you can add units after this };
var
RAIO_RST: TGpioPin;
begin
RAIO_RST := TGpioLinuxPin.Create(22);
RAIO_RST.direction := gdin;
if RAIO_RST.direction = gdIn then begin
writeln('PIN 22 direction: in');
Writeln('This is never executed');
end;
writeln('ENDE');
RAIO_RST.Destroy;
end.
In the following program the testing condition on GPIO's direction is never executed.