type TkdPortRange = class(
TkdHWRange
)
TkdHWRange
to deal with the specificity of hardware ports and makes published all concerned properties it inherits.TkdHWRange
> TkdRange
> TkdResource
![]() | procedure CheckRegisterValidity (RngFrom, RngTo: LongWord; ARegister: TkdResource); override; |
![]() | procedure CheckTransferAutoInc(TransferAutoIncValue: Boolean); override; |
![]() | procedure CheckTransferPropsIntegrity (ARangeFrom, ARangeTo: LongWord; AnTransferAutoInc: Boolean; ATransferCount: LongWord; ATransferSize: TkdHWRangeTransferSize; ATransferOffset: LongWord); override; |
![]() | procedure PrepareTransferStruct (ABuffer: Pointer; ABufferSize: LongWord); override; |
![]() | function Transfer (ABuffer: Pointer; BufferSize: LongWord): LongWord; |
![]() | procedure 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.
![]() | procedure 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.
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 .
![]() | procedure 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.
![]() | function 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.
![]() | property ArrangedLike: TkdPortRangeArrangedLike; |
![]() | property RangeFrom; |
![]() | property RangeShared; |
![]() | property RangeTo; |
![]() | property TransferAutoInc; |
![]() | property TransferCount; |
![]() | property TransferDir; |
![]() | property TransferOffset; |
![]() | property TransferSize; |
![]() | property TransferType: TkdPortRangeTransferType; |
![]() | property 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.
![]() | property RangeFrom; |
RangeFrom property is now made published and specifies the low bound of the address range of hardware ports. See for syntax: RangeFrom
![]() | property 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
![]() | property RangeTo; |
RangeTo property is now made published and specifies the upper bound of the address range of hardware ports. See for syntax: RangeTo
![]() | property 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
![]() | property 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
![]() | property 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
![]() | property 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
![]() | property 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
![]() | property 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.