[Lazarus] conditionals for detecting hardware platforms?
Chavoux Luyt
chavoux at gmail.com
Mon Feb 29 15:55:04 CET 2016
Hi Bo,
From: Bo Berglund <bo.berglund at gmail.com>
> <snip>
I am programming with FreePascal and Lazarus towards a Raspberry Pi2
> target platform. Doing so on the RPi2 itself is possible and basically
> works fine, except that the system is a bit sluggish at times and
> there are other inconveniences as well.
> So I moved to a Linux Mint 17.3 Mate system in a virtual computer
> (VMWare) on my Windows7 PC instead.
> <snip>
> So I need to put some kind of conditional into my code to redirect the
> GPIO calls to some simulator I will have to build. (I am assuming that
> there is no such thing available already of course).
>
Another way (which might be easier?) is to look at the GPIO driver code
(API) on the Raspberry and write a "fake driver" (.so file?) on the Linux
system with the same name, API etc. of the Raspberry GPIO driver (I assume
that there is a driver, so forgive me if I am wrong). Since you want to
build a simulator in any case, this might be a better option that will not
require you to do anything funny in your actual application code?
Regards,
Chavoux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160229/26d1c104/attachment-0003.html>
More information about the Lazarus
mailing list