tools/usb_gadget/gadget.py
def GetMicrosoftOSDescriptorV1(self, recipient, value, index, length):
    """Handle a the Microsoft OS 1.0 Descriptor request from the host.

    See https://msdn.microsoft.com/en-us/windows/hardware/gg463179 for the
    format of these descriptors.

    Args:
      recipient: Request recipient (device or interface)
      value: wValue field of the setup packet.
      index: wIndex field of the setup packet.
      length: Maximum amount of data the host expects the device to return.

    Returns:
      The descriptor or None to stall the pipe if the descriptor is not
      supported.
    """
    _ = recipient, value
    if index == 0x0004:
      return self.GetMicrosoftCompatIds(length)
Handle a the Microsoft OS 1.0 Descriptor request from the host.

    See https://msdn.microsoft.com/en-us/windows/hardware/gg463179 for the
    format of these descriptors.

    Args:
      recipient: Request recipient (device or interface)
      value: wValue field of the setup packet.
      index: wIndex field of the setup packet.
      length: Maximum amount of data the host expects the device to return.

    Returns:
      The descriptor or None to stall the pipe if the descriptor is not
      supported.
    
Handle a the Microsoft OS 1.0 Descriptor request from the host.
Handle a the Microsoft OS 1 . 0 Descriptor request from the host .
def GetMicrosoftOSDescriptorV1(self, recipient, value, index, length):
    _ = recipient, value
    if index == 0x0004:
      return self.GetMicrosoftCompatIds(length)
def GetMicrosoftOSDescriptorV1 ( self , recipient , value , index , length ) : _ = recipient , value if index == 0x0004 : return self . GetMicrosoftCompatIds ( length )
Handle a the Microsoft OS 1.0 Descriptor request from the host.
Handle a the Microsoft OS 1 . 0 Descriptor request from the host .
"""Handle a the Microsoft OS 1.0 Descriptor request from the host.

    See https://msdn.microsoft.com/en-us/windows/hardware/gg463179 for the
    format of these descriptors.

    Args:
      recipient: Request recipient (device or interface)
      value: wValue field of the setup packet.
      index: wIndex field of the setup packet.
      length: Maximum amount of data the host expects the device to return.

    Returns:
      The descriptor or None to stall the pipe if the descriptor is not
      supported.
    """
The descriptor or None to stall the pipe if the descriptor is not
supported.
The descriptor or None to stall the pipe if the descriptor is not supported .
self
recipient
Request recipient (device or interface)
Request recipient ( device or interface )
value
wValue field of the setup packet.
wValue field of the setup packet .
index
wIndex field of the setup packet.
wIndex field of the setup packet .
length
Maximum amount of data the host expects the device to return.
Maximum amount of data the host expects the device to return .