Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Enumerations
Variables
Constants
Functions and Procedures
Identifiers

Class TkdPortRange

Unit

kdranges

Declaration

type TkdPortRange = class(TkdHWRange)

Description

Final resource class TkdPortRange models address ranges of hardware ports and is used to access I/O port regions regardless of if a device is mapping its registers to a separate address space for I/O ports the periferal bus has or into a memory address region. Whatever the case, all address regions lent into the Linux concept of I/O ports on your PC are completely accessible. The class redefines necessary methods of its parental class TkdHWRange to deal with the specificity of hardware ports and makes published all concerned properties it inherits.

Hierarchy

TkdHWRange > TkdRange > TkdResource

Methods

Overview

Publicprocedure CheckRegisterValidity (RngFrom, RngTo: LongWord; ARegister: TkdResource); override;
Protectedprocedure CheckTransferAutoInc(TransferAutoIncValue: Boolean); override;
Protectedprocedure CheckTransferPropsIntegrity (ARangeFrom, ARangeTo: LongWord; AnTransferAutoInc: Boolean; ATransferCount: LongWord; ATransferSize: TkdHWRangeTransferSize; ATransferOffset: LongWord); override;
Protectedprocedure PrepareTransferStruct (ABuffer: Pointer; ABufferSize: LongWord); override;
Publicfunction Transfer (ABuffer: Pointer; BufferSize: LongWord): LongWord;

Description

Publicprocedure CheckRegisterValidity (RngFrom, RngTo: LongWord; ARegister: TkdResource); override;

CheckRegisterValidity method is overridden to check, with regard to ArrangedLike property value, if the register given as an argument is located on the address range of hardware ports whose bounds are given as well. If the register is illegal, the corresponding exception register_out_of_range is still raised.

Protectedprocedure CheckTransferAutoInc(TransferAutoIncValue: Boolean); override;

CheckTransferAutoInc method is overridden to raise the corresponding exception invalid_transfer_type if True is attempted to be set, whereas TransferType property is already specified to ttString.

Protectedprocedure CheckTransferPropsIntegrity (ARangeFrom, ARangeTo: LongWord; AnTransferAutoInc: Boolean; ATransferCount: LongWord; ATransferSize: TkdHWRangeTransferSize; ATransferOffset: LongWord); override;

CheckTransferPropsIntegrity method is overridden to check, with regard to ArrangedLike property value, if all the properties responsible for transfer operations are set semantically consistent with the remaining ones .

Protectedprocedure PrepareTransferStruct (ABuffer: Pointer; ABufferSize: LongWord); override;

PrepareTransferStruct method is overridden to provide for transfer operations the set of properties specific for this class, exactly ArrangedLike and TransferType properties added.

Publicfunction Transfer (ABuffer: Pointer; BufferSize: LongWord): LongWord;

Transfer method is now made public and accomplishes data transfer operations on the address range of hardware ports as provided by corresponding properties.

Properties

Overview

Publishedproperty ArrangedLike: TkdPortRangeArrangedLike;
Publishedproperty RangeFrom;
Publishedproperty RangeShared;
Publishedproperty RangeTo;
Publishedproperty TransferAutoInc;
Publishedproperty TransferCount;
Publishedproperty TransferDir;
Publishedproperty TransferOffset;
Publishedproperty TransferSize;
Publishedproperty TransferType: TkdPortRangeTransferType;

Description

Publishedproperty ArrangedLike: TkdPortRangeArrangedLike;

ArrangedLike property specifies how the address range of hardware ports is physically organized. Sometimes I/O ports are arranged like memory, and you can, for example, bind two 8-bit writes (or reads) into a single 16-bit operation. This applies, for instance, to PC video boards, but in general you can't count on this feature. If the property is specified to alPort, writing to (or reading from) a specified address touches no adjacent addresses regardless of the size of data item transferred.

Publishedproperty RangeFrom;

RangeFrom property is now made published and specifies the low bound of the address range of hardware ports. See for syntax: RangeFrom

Publishedproperty RangeShared;

RangeShared property is now made published and specifies if the address range of hardware ports can be shared between other kernel processes in the system or must be registered exclusively with the GDD. See for syntax: RangeShared

Publishedproperty RangeTo;

RangeTo property is now made published and specifies the upper bound of the address range of hardware ports. See for syntax: RangeTo

Publishedproperty TransferAutoInc;

TransferAutoInc property is now made published and specifies if the auto-incrementation of addresses must be put in place during transfer. If False, then all data is transferred to/from the same address of the address range of hardware ports. See for syntax: TransferAutoInc

Publishedproperty TransferCount;

TransferCount property is now made published and specifies the number of data items to transfer to/from the address range of hardware ports. See for syntax: TransferCount

Publishedproperty TransferDir;

TransferDir property is now made published and specifies the direction for transfer. If tdRead, then data is read from, otherwise data is written to the address range of hardware ports. See for syntax: TransferDir

Publishedproperty TransferOffset;

TransferOffset property is now made published and specifies the offset within the address range of hardware ports to begin transfer from. See for syntax: TransferOffset

Publishedproperty TransferSize;

TransferSize property is now made published and specifies the size of data item to transfer to/from the address range of hardware ports. See for syntax: TransferSize

Publishedproperty TransferType: TkdPortRangeTransferType;

TransferType property specifies one of three possible methods to transfer data to/from the address range of hardware ports. There can be 'default' transfer type for most cases, 'string' transfer type for faster transfers of data sequences to/from the same address, and 'pausing' transfer type to conform especially with a slow hardware.