Class TCustomPortI2C

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCustomPortI2C = class abstract(TCustomDataPort)

Description

Abstract I2C (Inter-Integrated Circuit) communication manager.

Hierarchy

Overview

Methods

Public function ReadBlockData(const Command: Byte; const Buffer: Pointer; const BufferSize: Cardinal): Cardinal; virtual; abstract;
Public function ReadByte(out Value: Byte): Boolean; virtual;
Public function ReadByteData(const Command: Byte; out Value: Byte): Boolean; virtual;
Public function ReadWordData(const Command: Byte; out Value: Word): Boolean; virtual;
Public function WriteBlockData(const Command: Byte; const Buffer: Pointer; const BufferSize: Cardinal): Cardinal; virtual; abstract;
Public function WriteByte(const Value: Byte): Boolean; virtual;
Public function WriteByteData(const Command, Value: Byte): Boolean; virtual;
Public function WriteBytes(const Values: array of Byte): Boolean;
Public function WriteWordData(const Command: Byte; const Value: Word): Boolean; virtual;
Public procedure SetAddress(const Address: Cardinal); virtual; abstract;

Description

Methods

Public function ReadBlockData(const Command: Byte; const Buffer: Pointer; const BufferSize: Cardinal): Cardinal; virtual; abstract;

Writes command to current address and reads specified block of data from it. Although this varies depending on implementation, but typically stop bit is given at the end of the whole transmission (so there is no stop bit between command and read operation). Returns True when the operation was successful and False otherwise.

Public function ReadByte(out Value: Byte): Boolean; virtual;

Reads a single byte from current address. Returns True when the operation was successful and False otherwise.

Public function ReadByteData(const Command: Byte; out Value: Byte): Boolean; virtual;

Writes command to current address and reads a single byte from it. Although this varies depending on implementation, but typically stop bit is given at the end of the whole transmission (so there is no stop bit between command and read operation). Returns True when the operation was successful and False otherwise.

Public function ReadWordData(const Command: Byte; out Value: Word): Boolean; virtual;

Writes command to current address and reads a word (16-bit unsigned) from it. Although this varies depending on implementation, but typically stop bit is given at the end of the whole transmission (so there is no stop bit between command and read operation). Returns True when the operation was successful and False otherwise.

Public function WriteBlockData(const Command: Byte; const Buffer: Pointer; const BufferSize: Cardinal): Cardinal; virtual; abstract;

Writes command and specified block of data to current address. Returns True when the operation was successful and False otherwise.

Public function WriteByte(const Value: Byte): Boolean; virtual;

Write a single byte to current address. Returns True when the operation was successful and False otherwise.

Public function WriteByteData(const Command, Value: Byte): Boolean; virtual;

Writes command and a single byte of data to current address. Returns True when the operation was successful and False otherwise.

Public function WriteBytes(const Values: array of Byte): Boolean;

Write one or more bytes to current address. Returns True when the operation was successful and False otherwise.

Public function WriteWordData(const Command: Byte; const Value: Word): Boolean; virtual;

Writes command and a word (16-bit unsigned) of data to current address. Returns True when the operation was successful and False otherwise.

Public procedure SetAddress(const Address: Cardinal); virtual; abstract;

Specifies new device address to which the communication will be made.


Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.