Class TkdHWRangeRegister
Unit
kdregister
Declaration
type TkdHWRangeRegister = class(TkdResource
)
Description
Final resource class TkdHWRangeRegister models hardware register related to some address range of hardware, either memory or port concerned, i.e. a descendant of TkdHWRange
class. It includes properties for specifying the targeted address range for the register, the offset of the register within the range, the size of the register and the access mode to it. Use Value
property to actually read from or write to the register.Hierarchy
TkdResource
Methods
Overview
Description
CheckResourceDataReadiness method is overridden to make sure its targeted address range is specified through HWRange
property and message if not.
GetRegisterPriority method is overridden to result dependent1l_registration_priority
constant, so that to allow the targeted address range specified via HWRange
property to be registered ahead. The method does not result a lower priority constant because the register can be referenced by any resource of TkdInterrupt
class in its hardware interrupt handler script hosted at InterruptHandler
property.
GetRegisterSize class method determines the integer size(width) of a register whose size(width) is known as the value of TkdHWRangeRegisterSize
enumeration type.
Notification method is overridden to respond to notification that the targeted address range is about to be destroyed. It updates properties so that HWRange
property points to nothing, Offset
and Size
properties are set to their default 0 and rsByte values correspondingly.
RaiseOnRemoveItem method is overridden to prevent from detaching the register from the resources list of the hardware device if the register is currently referenced by at least one resource of TkdInterrupt
class in its hardware interrupt handler script hosted at InterruptHandler
property.
SetName method is overridden to update all references to the register. This is because the register can be referenced by name by any resource of TkdInterrupt
class in its hardware interrupt handler script hosted at InterruptHandler
property.
Properties
Overview
Description
AutoRead property specifies whether the register has to be automatically read-in right away as any of the remaining registers on the targeted address range is being also accessed.
HWRange property specifies the targeted address range the register is located on. The register is in every respect illegal if this property is not specified.
Offset property specifies the offset of the register within the targeted address range.
Size property specifies the size of the register.
UseMode property specifies the access mode to the register. If an application tries to write to a read-only register or read from a write-only register, be sure the GDD checks it and refuses to complete.
Value property is an accessor for reading from and writing to the register.