NAME
USB::HID::Descriptor::Interface - USB HID Interface Descriptor
SYNOPSIS
An object representation of a USB HID interface descriptor. Subclass of USB::Descriptor::Interface.
use USB::HID::Descriptor::Interface;
my $interface = USB::HID::Descriptor::Interface->new( description => 'My First Interface' );
$interface->protocol(0);
$interface->subclass(0);
$interface->endpoints( [ USB::Descriptor::Endpoint->new() ] );
...
DESCRIPTION
USB::HID::Descriptor::Interface represents a USB interface descriptor for a HID class device. 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.
CONSTRUCTOR
- $interface = USB::HID::Descriptor::Interface->new(description=>$description, ...);
-
Constructs and returns a new USB::HID::Descriptor::Interface object using the passed options. Each option key is the name of an accessor method. The
class
option is overriden. - $interface = USB::HID::Descriptor::Interface->convert($another_interface)
-
Converts a USB::Descriptor::Interface object into a USB::HID::Descriptor::Interface object and returns it.
ATTRIBUTES
- $interface->class
-
Returns the interface's class (bInterfaceClass). No setting allowed.
- $interface->class_descriptor
-
Returns the current class descriptor object. No setting allowed.
- $interface->country
-
Get/Set the country code for localized hardware (bCountryCode). Defaults to 0.
- $class->report_bytes
-
Returns an array of bytes containing the report descriptor.
- $interface->report
-
A convenience method that wraps a single hash reference in an array and passes it to
reports()
. - $interface->reports
-
Get/Set the array of
USB::HID::Descriptor::Report
objects. - $interface->version
-
Get/Set the HID specification release number (bcdHID). Defaults to '1.1.0'.
REPORT DESCRIPTOR ATTRIBUTES
- $interface->page
-
Get/Set the Usage Page of the interface's report descriptor.
- $interface->usage
-
Get/Set the Usage of the interface's report descriptor.
AUTHOR
Brandon Fosdick, <bfoz at bfoz.net>
BUGS
Please report any bugs or feature requests to bug-usb-hid-descriptor-interface at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=USB-HID-Descriptor-Interface. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc USB::HID::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-HID-Descriptor-Interface
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2011 Brandon Fosdick.
This program is released under the terms of the BSD License.