[fpc-pascal] Access GPIO pins on RPi2 without root?
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Oct 7 13:32:08 CEST 2015
Bo Berglund wrote on Wed, 07 Oct 2015:
> I think that it really does because there must be some interface
> between the FPC system and the underlying operating system managing
> the hardware.
On Linux/Unix, every interface to hardware gets exposed as a file
(generally under /dev). Sometimes you have libraries that provide a
higher level interface, but in the end it will always access that
file. If you need root permissions to perform actions on this file
with language X, you will also need them with language Y and also if
you use library Z to access it. The file operations are basic POSIX
operations (open, read, write, ioctl, close), which are available with
an "fp" prefix via the baseunix and unix units, and which are the same
in C or other languages.
If you have a library that you want to use, then you can of course ask
here whether anyone has translated the headers for it (which will
probably be in C) to Pascal or so.
Jonas
More information about the fpc-pascal
mailing list