[Overview][Resource strings][Types][Classes][Index] Reference for unit 'fpi2c' (#pascalio)

TI2CLinuxDevice

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Accesing I2C bus using Linux File interface

Declaration

Source position: fpi2c.pas line 218

type TI2CLinuxDevice = class(TI2CDevice)

protected

  fHandle: cint;

  

File handle

  procedure SetAddress(); override;

public

  constructor Create();

  

Create new Linux device

  function ReadBlockData(); override;

  

  function ReadByte; override;

  

  function ReadRegByte(); override;

  

  function ReadRegWord(); override;

  

  procedure WriteByte(); override;

  

  procedure WriteBlockData(); override;

  procedure WriteRegByte(); override;

  

  procedure WriteRegWord(); override;

  

  property Handle: cint; [r]

  

File Handle

end;

Inheritance

TI2CLinuxDevice

  

Accesing I2C bus using Linux File interface

|

TI2CDevice

  

Abstract I2C device class

|

TObject

Description

This class implements the access to a single I2C device using Linux' file system interface.

Please check you have loaded the Kernel module i2c-dev before creating an instance of this class. This module creates the /dev/i2c-* files, which are used by user space programms (like yours). You may need to load another kernel module, for making the I2C busses accessible by the kernel itself.

Board SoC Kernel Module
Raspberry Pi (all revisions) BCM2835 i2c-bcm2708

Documentation generated on: 2020-05-22