1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 """Default gadget configuration."""
12 class DefaultGadget(gadget
.Gadget
):
15 device_desc
= usb_descriptors
.DeviceDescriptor(
16 idVendor
=usb_constants
.VendorID
.GOOGLE
,
17 idProduct
=usb_constants
.ProductID
.GOOGLE_TEST_GADGET
,
24 fs_config_desc
= usb_descriptors
.ConfigurationDescriptor(
28 hs_config_desc
= usb_descriptors
.ConfigurationDescriptor(
32 interface_desc
= usb_descriptors
.InterfaceDescriptor(
34 fs_config_desc
.AddInterface(interface_desc
)
35 hs_config_desc
.AddInterface(interface_desc
)
37 super(DefaultGadget
, self
).__init
__(
38 device_desc
, fs_config_desc
, hs_config_desc
)
40 self
.AddStringDescriptor(1, "Google Inc.")
41 self
.AddStringDescriptor(2, "Test Gadget (default state)")