Hardware Access
From Free Pascal wiki
Jump to navigationJump to search
Overview
This page is the start of a tutorial about accessing hardware devices on Lazarus. These devices include, but are not limited to: ISA, PCI, USB, parallel port, serial port.
Access to hardware devices in a multi-platform way is not implemented by Free Pascal Runtime Library or by the LCL, so this will basically cover hardware access methods on different platforms. The code can be compiled on different environments using conditional compiles, like this:
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
{$IFDEF WIN32}
Windows,
{$ENDIF}
{$IFDEF Linux}
ports,
{$ENDIF}
ComCtrls, StdCtrls, Buttons, ActnList, Spin, controles, Geral, hardware;