On Sat, 16 Nov 2019 11:50:45 +0100 (CET), Michael Van Canneyt via
lazarus wrote:
>> I guess that the reason is that fpIoCtrl expects a pointer type
>> variable so the typecast is done... Is there no alternative?
>
>The warning seems correct. I suspect Pointer(iDevAddr) is probably wrong.
>Maybe
On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote:
function InitI2cDevice(devpath: String; iDevAddr: Cint; var hInst:
Integer): Integer;
var
iio : integer;
begin
try
hInst := fpopen(devpath, O_RDWR); //Open the
I2C bus in Read/Write mode
iio := FpIOCtl(hInst, I2C
On Sat, 16 Nov 2019 09:20:28 +0100 (CET), Michael Van Canneyt via
lazarus wrote:
>
>
>On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote:
>
>> I am trying to write a simple I2C interface program for Raspberry Pi
>> but I am getting an error I don't understand...
>>
>> function TRaspiI2C.ReadI2CBy
On Sat, 16 Nov 2019, Bo Berglund via lazarus wrote:
I am trying to write a simple I2C interface program for Raspberry Pi
but I am getting an error I don't understand...
function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf:
array of byte): integer;
var
i: integer;
begin
try
I am trying to write a simple I2C interface program for Raspberry Pi
but I am getting an error I don't understand...
function TRaspiI2C.ReadI2CBytes(addr: integer; count: integer; buf:
array of byte): integer;
var
i: integer;
begin
try
if count <> length(buf) then
SetLength (buf, cou