USB::Descriptor::Endpoint - USB Endpoint Descriptor
An object representation of a USB endpoint descriptor.
use USB::Descriptor::Endpoint; my $endpoint = USB::Descriptor::Endpoint->new( address => 1 ); $endpoint->type('interrupt'); $endpoint->direction('in'); ...
USB::Descriptor::Endpoint 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::Endpoint object using the passed options. Each option key is the name of an accessor method.
When constructing endpoint objects, the endpoint direction and endpoint number can be specified with a single key/value pair. For example, you can use
new('in' => 3) instead of
new('direction' => 'in', 'number' => 3).
Returns an array of bytes containing all of the fields in the endpoint descriptor.
Direct access to the bEndpointAddress value. Don't use this unless you know what you're doing.
Direct access to the bmAttributes value. Don't use this unless you know what you're doing.
Get/Set the endpoint's direction (bEndpointAddress). Pass 'in' for an IN endpoint or 'out' for an OUT endpoint.
Get/Set the endpoint's polling interval in frame counts (bInterval). Forced to 1 for isochronous endpoints as required by the USB specification.
Get/Set the endpoint's maximum packet size (wMaxPacketSize).
Get/Set the endpoint number (bEndpointAddress).
Get/Set the endpoint's synchronization type (bmAttributes). Only used by isochronous endpoints.
Get/Set the endpoint's type (bmAttributes). Valid values are 'control', 'isochronous', 'bulk', and 'interrupt'.
Get/Set the endpoint's usage type (bmAttributes). Only used by isochronous endpoints.
<bfoz at bfoz.net>
Please report any bugs or feature requests to
bug-usb-descriptor-endpoint at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=USB-Descriptor-Endpoint. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2011 Brandon Fosdick.
This program is released under the terms of the BSD License.