DASM
|
Hardware execution adapter. More...
Public Member Functions | |
Public Functions | |
retval | new (scalar proto, scalar object) |
Construct a new hardware adapter object. | |
retval | describe (scalar self) |
Describe this object. | |
retval | symbol (scalar self) |
Retrieve a symbol name for this object. | |
retval | read (scalar self) |
'Read' function; intended to be used to read data from a hardware register, supplying an offset. | |
retval | write (scalar self) |
'Write' function; intended to be used to write data to a hardware register, supplying an offset. |
Hardware execution adapter.
This class provides a simple interface to hardware implementations. Instances of the class can be created which associate a hardware offset with the object instance. The instance will dispatch 'read' and 'write' functions with the offset.
Example use:
my $exec; # Execution object my @core; for my $offset (0..15) { $core[$offset] = new DExecHW($hw, $offset); } $core[4]->write($number, $exec); # will call $hw->write(4, $number, $exec); my $value = $core[4]->read($exec); # will call $hw->read(4, $exec);
Definition at line 51 of file DExecHWAdapter.pm.
retval DExecHWAdapter::describe | ( | scalar | self | ) |
Describe this object.
[in] | $self | This Adapter object |
retval DExecHWAdapter::new | ( | scalar | proto, |
scalar | object | ||
) |
Construct a new hardware adapter object.
[in] | $proto | This class object, or prototype to add to |
[in] | $object | The object to proxy for |
[in] | $offset | The offset this object is created for |
retval DExecHWAdapter::read | ( | scalar | self | ) |
'Read' function; intended to be used to read data from a hardware register, supplying an offset.
[in] | $self | DExecHW object |
[in] | @args | Arguments to pass to the object's read function, usually the execution environment object. |
retval DExecHWAdapter::symbol | ( | scalar | self | ) |
Retrieve a symbol name for this object.
[in] | $self | This Adapter object |
undef | if no symbol name should be assigned |
retval DExecHWAdapter::write | ( | scalar | self | ) |
'Write' function; intended to be used to write data to a hardware register, supplying an offset.
[in] | $self | DExecHW object |
[in] | @args | Arguments to pass to the object's write function, usually the value to write and the execution environment object |