diff options
| author | Kevin Banks <kevin@firia.com> | 2021-01-28 20:22:31 -0600 |
|---|---|---|
| committer | Kevin Banks <kevin@firia.com> | 2021-01-28 20:22:31 -0600 |
| commit | 63f9b12fe61c9df6e993f92d7cfef1038523d930 (patch) | |
| tree | b11b28380ceb3309a168d70b0ded5fd5b40b51ab /tools | |
| parent | 1b031508e14a3cdfa2ba9c5cf158126d3f002cba (diff) | |
Partially hard-coded VENDOR descriptor has been added. First build to be accessed via WebUSB. NOTE - had to disable HID (EndPoint shortage?)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gen_usb_descriptor.py | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py index 210ca1923..36c6f45a6 100644 --- a/tools/gen_usb_descriptor.py +++ b/tools/gen_usb_descriptor.py @@ -390,8 +390,32 @@ audio_control_interface = standard.InterfaceDescriptor( audio_interfaces = [audio_control_interface] + cs_ac_interface.audio_streaming_interfaces + cs_ac_interface.midi_streaming_interfaces # TODO New code goes here to create vendor objects +# Starting out with a clone-and-modify of the HID descriptors +vendor_endpoint_in_descriptor = standard.EndpointDescriptor( + description="VENDOR in", + bEndpointAddress=args.vendor_ep_num_in | standard.EndpointDescriptor.DIRECTION_IN, + bmAttributes=standard.EndpointDescriptor.TYPE_BULK, + bInterval=16) + +vendor_endpoint_out_descriptor = standard.EndpointDescriptor( + description="VENDOR out", + bEndpointAddress=args.vendor_ep_num_out | standard.EndpointDescriptor.DIRECTION_OUT, + bmAttributes=standard.EndpointDescriptor.TYPE_BULK, + bInterval=16) + +vendor_interface = standard.InterfaceDescriptor( + description="VENDOR", + bInterfaceClass=0xff, # vendor.VENDOR_CLASS, + bInterfaceSubClass=0x00, #vendor.VENDOR_SUBCLASS_???,, + bInterfaceProtocol=0x00, #vendor.VENDOR_PROTOCOL_NONE, + iInterface=StringIndex.index("{} VENDOR".format(args.interface_name)), + subdescriptors=[ + vendor_endpoint_in_descriptor, + vendor_endpoint_out_descriptor, + ] +) -vendor_interfaces = [] # TODO Fix this! +vendor_interfaces = [vendor_interface] interfaces_to_join = [] @@ -737,7 +761,7 @@ const tusb_desc_webusb_url_t desc_webusb_url = // #define.. // SWAG for now. Will have to be manually corrected until generated by gen_usb_descriptor.py -#define ITF_NUM_VENDOR 6i +#define ITF_NUM_VENDOR 3 //--------------------------------------------------------------------+ // BOS Descriptor |
