tools/usb_gadget/gadget.py
def GetBosDescriptor(self, length):
    """Handle a GET_DESCRIPTOR(BOS) request from the host.

    Device capability descriptors can be added to the Binary Device Object Store
    returned by this method by calling AddDeviceCapabilityDescriptor.

    See Universal Serial Bus 3.1 Specification, Revision 1.0 section 9.6.2.

    Args:
      length: Maximum amount of data the host expects the device to return.

    Returns:
      The device's binary object store descriptor or None to stall the pipe if
      no device capability descriptors have been configured.
    """
    if self._bos_descriptor is None:
      return None

    return self._bos_descriptor.Encode()[:length]
Handle a GET_DESCRIPTOR(BOS) request from the host.

    Device capability descriptors can be added to the Binary Device Object Store
    returned by this method by calling AddDeviceCapabilityDescriptor.

    See Universal Serial Bus 3.1 Specification, Revision 1.0 section 9.6.2.

    Args:
      length: Maximum amount of data the host expects the device to return.

    Returns:
      The device's binary object store descriptor or None to stall the pipe if
      no device capability descriptors have been configured.
    
Handle a GET_DESCRIPTOR(BOS) request from the host.
Device capability descriptors can be added to the Binary Device Object Store
returned by this method by calling AddDeviceCapabilityDescriptor.


Handle a GET_DESCRIPTOR ( BOS ) request from the host . Device capability descriptors can be added to the Binary Device Object Store returned by this method by calling AddDeviceCapabilityDescriptor .
def GetBosDescriptor(self, length):
    if self._bos_descriptor is None:
      return None
    return self._bos_descriptor.Encode()[:length]
def GetBosDescriptor ( self , length ) : if self . _bos_descriptor is None : return None return self . _bos_descriptor . Encode ( ) [ : length ]
Handle a GET_DESCRIPTOR(BOS) request from the host.
Handle a GET_DESCRIPTOR ( BOS ) request from the host .
"""Handle a GET_DESCRIPTOR(BOS) request from the host.

    Device capability descriptors can be added to the Binary Device Object Store
    returned by this method by calling AddDeviceCapabilityDescriptor.

    See Universal Serial Bus 3.1 Specification, Revision 1.0 section 9.6.2.

    Args:
      length: Maximum amount of data the host expects the device to return.

    Returns:
      The device's binary object store descriptor or None to stall the pipe if
      no device capability descriptors have been configured.
    """
The device's binary object store descriptor or None to stall the pipe if
no device capability descriptors have been configured.
The device ' s binary object store descriptor or None to stall the pipe if no device capability descriptors have been configured .
self
length
Maximum amount of data the host expects the device to return.
Maximum amount of data the host expects the device to return .