[Lazarus] Raspberry Pi Debug Digital I/O

Koenraad Lelong lazarus2 at de-brouwerij.be
Mon Jan 25 09:40:25 CET 2016


Op 25-01-16 om 09:00 schreef Koenraad Lelong:
> Op 25-01-16 om 00:18 schreef Marc Santhoff:
> I'm going to try that patch of Bo.
>
> I'll report back.
>
First : I'm using pascalio, on a Pi2 model B.

Just modified bcm2708.pas :
   GPIO_BASE = (BCM2708_PERI_BASE + $003F0000); // GPIO controller
and
   mem_fd := FpOpen('/dev/gpiomem', O_RDWR OR O_SYNC);

Now I can run my app as user 'pi'.

Thanks.

According to Bo's post 
(http://lists.lazarus.freepascal.org/pipermail/lazarus/2015-October/094438.html) 
GPIO_BASE depends on where the app runs.
I'm going to look for a way to detect which device the application runs 
on so I can automatically switch the GPIO_BASE.
Suggestions ?

Koenraad.




More information about the Lazarus mailing list