USB::Descriptor::Interface - USB Interface Descriptor
An object representation of a USB interface descriptor.
use USB::Descriptor::Interface; my $interface = USB::Descriptor::Interface->new( description => 'My First Interface' ); $interface->class(0); $interface->subclass(0); $interface->endpoints( [ USB::Descriptor::Endpoint->new() ] ); ...
USB::Descriptor::Interface represents a USB interface descriptor. When added to the descriptor tree of a USB::Descriptor::Device object it can be used to generate the data structures needed to compile the firmware for a USB device.
Constructs and returns a new USB::Descriptor::Interface object using the passed options. Each option key is the name of an accessor method.
Returns an array of bytes containing all of the fields in the interface descriptor as well as all of the child endpoint descriptors.
Get/Set the alternate setting value (bAlternateSetting).
Get/Set the interface class (bInterfaceClass).
Get/Set the interface class descriptor object reference.
Get/Set the interface's description string. A string descriptor index (iInterface) will be automatically assigned when arrayified by USB::Descriptor::Configuration.
A convenience method that wraps a single hash reference in an array and passes it to endpoints().
endpoints()
Get/Set the array of USB::Descriptor::Endpoint objects. All of the endpoints in the passed array will be arrayified when the interface object is arrayified by USB::Descriptor::Configuration.
Get/Set the interface's number (bInterfaceNumber).
Get/Set the interface's protocol (bInterfaceProtocol).
Get/Set the interface's SubClass (bInterfaceSubClass).
Brandon Fosdick, <bfoz at bfoz.net>
<bfoz at bfoz.net>
Please report any bugs or feature requests to bug-usb-descriptor-interface at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=USB-Descriptor-Interface. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-usb-descriptor-interface at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc USB::Descriptor::Interface
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=USB-Descriptor-Interface
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/USB-Descriptor-Interface
CPAN Ratings
http://cpanratings.perl.org/d/USB-Descriptor-Interface
Search CPAN
http://search.cpan.org/dist/USB-Descriptor-Interface/
Copyright 2011 Brandon Fosdick.
This program is released under the terms of the BSD License.
To install USB::Descriptor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm USB::Descriptor
CPAN shell
perl -MCPAN -e shell install USB::Descriptor
For more information on module installation, please visit the detailed CPAN module installation guide.