Partially hard-coded VENDOR descriptor has been added. First build to be accessed via WebUSB. NOTE - had to disable HID (EndPoint shortage?)
This commit is contained in:
parent
1b031508e1
commit
63f9b12fe6
@ -30,6 +30,7 @@ CIRCUITPY_ROTARYIO = 1
|
||||
CIRCUITPY_NVM = 1
|
||||
# We don't have enough endpoints to include MIDI.
|
||||
CIRCUITPY_USB_MIDI = 0
|
||||
CIRCUITPY_USB_HID = 0
|
||||
# We have borrowed the VENDOR nomenclature from tinyusb. VENDOR AKA WEBUSB
|
||||
CIRCUITPY_USB_VENDOR = 1
|
||||
CIRCUITPY_WIFI = 1
|
||||
|
@ -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_interfaces = [] # TODO Fix this!
|
||||
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 = [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
|
||||
|
Loading…
Reference in New Issue
Block a user