USB2

Important

Most of this module has been deprecated and moved to torii-usb, please see the migration guide.

Gateware for creating USB2 devices.

class sol_usb.gateware.usb.usb2.USBSpeed(value)

Enumeration representing USB speeds. Matches UTMI xcvr_select constants.

class sol_usb.gateware.usb.usb2.USBPacketID(value)

Enumeration specifying all of the valid USB PIDs we can handle.

classmethod from_byte(byte, skip_checks=False)

Creates a PID object from a byte.

classmethod from_int(value, skip_checks=True)

Create a PID object from an integer.

classmethod from_name(name)

Create a PID object from a string representation of its name.

classmethod parse(value)

Attempt to create a PID object from a number, byte, or string.

category()

Returns the USBPIDCategory that each given PID belongs to.

is_data()

Returns true iff the given PID represents a DATA packet.

is_token()

Returns true iff the given PID represents a token packet.

is_handshake()

Returns true iff the given PID represents a handshake packet.

is_invalid()

Returns true if this object is an attempt to encapsulate an invalid PID.

direction()

Get a USB direction from a PacketID.

summarize()

Return a summary of the given packet.

byte()

Return the value with its upper nibble.