Class TCustomPortI2C
Unit
PXL.Boards.Types
Declaration
type TCustomPortI2C = class abstract(TCustomDataPort)
Description
Abstract I2C (Inter-Integrated Circuit) communication manager.
Hierarchy
Overview
Methods
 |
function ReadBlockData(const Command: Byte; const Buffer: Pointer; const BufferSize: Cardinal): Cardinal; virtual; abstract; |
 |
function ReadByte(out Value: Byte): Boolean; virtual; |
 |
function ReadByteData(const Command: Byte; out Value: Byte): Boolean; virtual; |
 |
function ReadWordData(const Command: Byte; out Value: Word): Boolean; virtual; |
 |
function WriteBlockData(const Command: Byte; const Buffer: Pointer; const BufferSize: Cardinal): Cardinal; virtual; abstract; |
 |
function WriteByte(const Value: Byte): Boolean; virtual; |
 |
function WriteByteData(const Command, Value: Byte): Boolean; virtual; |
 |
function WriteBytes(const Values: array of Byte): Boolean; |
 |
function WriteWordData(const Command: Byte; const Value: Word): Boolean; virtual; |
 |
procedure SetAddress(const Address: Cardinal); virtual; abstract; |
Description
Methods
 |
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.
|
 |
function ReadByte(out Value: Byte): Boolean; virtual; |
|
Reads a single byte from current address. Returns True when the operation was successful and False otherwise.
|
 |
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.
|
 |
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.
|
 |
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.
|
 |
function WriteByte(const Value: Byte): Boolean; virtual; |
|
Write a single byte to current address. Returns True when the operation was successful and False otherwise.
|
 |
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.
|
 |
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.
|
 |
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.
|
 |
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.
|