Brandon Fosdick > USB-Descriptor-4 > USB::Descriptor::Endpoint



Annotate this POD

View/Report Bugs
Module Version: 2   Source  


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 );


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.


$endpoint = USB::Descriptor::Endpoint->new(interval=>$interval, ...);

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).

Arrayification ^

$endpoint->bytes (or @{$interface} )

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.


Brandon Fosdick, <bfoz at>


Please report any bugs or feature requests to bug-usb-descriptor-endpoint at, or through the web interface at 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.

    perldoc USB::Descriptor::Endpoint

You can also look for information at:



Copyright 2011 Brandon Fosdick.

This program is released under the terms of the BSD License.

syntax highlighting: