Skip to content

Commit

Permalink
vdp: python bindings, gadget api stuff...
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheph committed Mar 12, 2017
1 parent fc09ccd commit 890145e
Show file tree
Hide file tree
Showing 2 changed files with 455 additions and 4 deletions.
19 changes: 17 additions & 2 deletions apps/vdpusb-pytest2/vdpusb-pytest2.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,22 @@ def __init__(self):
description = 0,
interfaces = [TestInterface()]));

class TestGadget(vdp.usb.gadget.Gadget):
def __init__(self):
vdp.usb.gadget.Gadget.__init__(self, dict(
bcd_usb = 0x0200,
bcd_device = 0x3000,
klass = 0,
subklass = 0,
protocol = 0,
vendor_id = 0x046d,
product_id = 0xc051,
manufacturer = 1,
product = 2,
serial_number = 0,
configs = [TestConfig()],
endpoint0 = TestEndpoint0()));

if __name__ == "__main__":
ep0 = TestEndpoint0();
cfg = TestConfig();
gadget = TestGadget();
print("Test");
Loading

0 comments on commit 890145e

Please sign in to comment.