parameters: (self, report_desc, features, vendor_id, product_id,
                 packet_size=64, interval_ms=10, out_endpoint=True,
                 device_version=0x0100)
docstring: Create a HID gadget.
  
      Args:
        report_desc: HID report descriptor.
        features: Map between Report IDs and HidFeature objects to handle them.
        vendor_id: Device Vendor ID.
        product_id: Device Product ID.
        packet_size: Maximum interrupt packet size.
        interval_ms: Interrupt transfer interval in milliseconds.
        out_endpoint: Should this device have an interrupt OUT endpoint?
        device_version: Device version number.
  
      Raises:
        ValueError: If any of the parameters are out of range.
docstring_summary: Create a HID gadget.
docstring_tokens: Create a HID gadget .
function: def __init__(self, report_desc, features, vendor_id, product_id,
                 packet_size=64, interval_ms=10, out_endpoint=True,
                 device_version=0x0100):
      """Create a HID gadget.
  
      Args:
        report_desc: HID report descriptor.
        features: Map between Report IDs and HidFeature objects to handle them.
        vendor_id: Device Vendor ID.
        product_id: Device Product ID.
        packet_size: Maximum interrupt packet size.
        interval_ms: Interrupt transfer interval in milliseconds.
        out_endpoint: Should this device have an interrupt OUT endpoint?
        device_version: Device version number.
  
      Raises:
        ValueError: If any of the parameters are out of range.
      """
      device_desc = usb_descriptors.DeviceDescriptor(
          idVendor=vendor_id,
          idProduct=product_id,
          bcdUSB=0x0200,
          iManufacturer=1,
          iProduct=2,
          iSerialNumber=3,
          bcdDevice=device_version)
  
      if out_endpoint:
        out_endpoint = 0x01
      else:
        out_endpoint = None
  
      self._hid_feature = HidCompositeFeature(
          report_desc=report_desc,
          features=features,
          packet_size=packet_size,
          interval_ms=interval_ms,
          out_endpoint=out_endpoint)
  
      super(HidGadget, self).__init__(device_desc, [self._hid_feature])
      self.AddStringDescriptor(3, '{:06X}'.format(uuid.getnode()))
function_tokens: def __init__ ( self , report_desc , features , vendor_id , product_id , packet_size = 64 , interval_ms = 10 , out_endpoint = True , device_version = 0x0100 ) : device_desc = usb_descriptors . DeviceDescriptor ( idVendor = vendor_id , idProduct = product_id , bcdUSB = 0x0200 , iManufacturer = 1 , iProduct = 2 , iSerialNumber = 3 , bcdDevice = device_version ) if out_endpoint : out_endpoint = 0x01 else : out_endpoint = None self . _hid_feature = HidCompositeFeature ( report_desc = report_desc , features = features , packet_size = packet_size , interval_ms = interval_ms , out_endpoint = out_endpoint ) super ( HidGadget , self ) . __init__ ( device_desc , [ self . _hid_feature ] ) self . AddStringDescriptor ( 3 , '{:06X}' . format ( uuid . getnode ( ) ) )