Endpoint (Class)¶
- class usbx.Endpoint(address: int, attributes: int, max_packet_size: int)¶
USB endpoint information.
The information originates from the configuration descriptor provided by the USB device.
- direction: TransferDirection¶
Transfer direction.
- classmethod get_address(number: int, direction: TransferDirection) int¶
Get the endpoint address from an endpoint number and direction.
- Parameters:
number – Endpoint number (between 0 and 127).
direction – Endpoint direction.
- Returns:
Endpoint address.
- classmethod get_direction(address: int) TransferDirection¶
Get the endpoint direction from an endpoint address.
In the USB specification and in the interface descriptor, the endpoint address is usually named
bEndpointAddress.- Parameters:
address – Endpoint address (between 0 and 255).
- Returns:
Transfer direction.
- classmethod get_number(address: int) int¶
Get the endpoint number from an endpoint address.
In the USB specification and in the interface descriptor, the endpoint address is usually named
bEndpointAddress.- Parameters:
address – Endpoint address (between 0 and 255).
- Returns:
Endpoint number (between 0 and 127).
- max_packet_size: int¶
Maximum packet size (in bytes).
- number: int¶
Endpoint number (without direction bit).
The endpoint number is between 0 and 127. Endpoint 0 is the control endpoint.
- transfer_type: TransferType¶
Transfer type.