Hardware Access

From Free Pascal wiki
Revision as of 02:05, 16 October 2005 by Sekelsenmat (talk | contribs)
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
{$IFDEF WIN32}
  Windows;
{$ENDIF}
{$IFDEF Linux}
  ports;
{$ENDIF}

Using inpout32.dll for Windows

Using ioperm to access ports on Linux