On Mon, 07 Mar 2016 19:11:54 +0000, Mark Morgan Lloyd
<[email protected]> wrote:
>Two things: first, Bo on 8th Oct mentioned that he'd had to modify
>pigpio.pas to make it compatible with the RPi2. Second, how are you
>physically driving the system, my experience is that remote access can
In PiGpio I added the following (roundabout line #20:
{$DEFINE RPi2}
const
REG_GPIO = {$IFDEF RPi2} $3F000 {$ELSE} $20000
{$ENDIF};//bcm2835/bcm2836 gpio register 0x2000 0000. new fpMap uses
page offset, one page is 4096bytes
then later down in the file (around line #150):
function TIoDriver.MapIo: boolean;
begin
Result := True;
{$IFDEF RPi2}
fd := fpopen('/dev/gpiomem', O_RdWr or O_Sync); // Open the master
/dev/memory device
{$ELSE}
fd := fpopen('/dev/mem', O_RdWr or O_Sync); // Open the master
/dev/memory device
{$ENDIF}
I do not know for a fact tha the second change is because of the RPi2
hardware, it was probably put there in order to make my program run as
a normal user rather than su.
--
Bo Berglund
Developer in Sweden
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus