NAME
Device::Chip::AVR_HVSP::FuseInfo
- information about device fuses
DESCRIPTION
Objects in this class contain information about the configuration fuses of a single AVR HVSP-programmable device. These instances may be useful for encoding and decoding the fuse bytes, for display or other purposes in some user-interactive manner.
CONSTRUCTOR
for_part
$fuseinfo = Device::Chip::AVR_HVSP::FuseInfo->for_part( $part )
Returns a new Device::Chip::AVR_HVSP::FuseInfo
instance containing information about the fuses for the given part name.
METHODS
fuses
@fuses = $fuseinfo->fuses
Returns a list of objects, each one representing a single configuration fuse. Each has the following fields:
$fuse->name
$fuse->offset
$fuse->mask
$fuse->caption
@values = $fuse->values
If the values
method gives a non-empty list of values, then the fuse is an enumeration; otherwise it is a simple boolean true/false flag. For enumeration fuses, each value item has the following fields:
$value->name
$value->value
$value->caption
unpack
%fields = $fuseinfo->unpack( $bytes )
Given a byte string containing all the fuses read from the device, unpacks them and returns a key-value list giving the current value of every fuse.
pack
$bytes = $fuseinfo->pack( %fields )
Given a key-value list containing fuse values, packs them into a byte string suitable to write onto the device and returns it.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>