Changes

Jump to navigation Jump to search
152 bytes added ,  15:18, 9 October 2017
no edit summary
Line 48: Line 48:  
The endpoints are configured using [[#GetDsEndpoint]], the total number of endpoints is the number of open [[#IDsEndpoint]] sessions. bInterfaceNumber is {0-based index for the enabled [[#IDsInterface]] session.} Some of the interface fields are configured using [[#GetDsInterface]].
 
The endpoints are configured using [[#GetDsEndpoint]], the total number of endpoints is the number of open [[#IDsEndpoint]] sessions. bInterfaceNumber is {0-based index for the enabled [[#IDsInterface]] session.} Some of the interface fields are configured using [[#GetDsInterface]].
   −
Additional descriptors for use with interfaces/endpoints can't be configured with usbds, even though the former is used for the default HID interface. This seems to be the main(?) restriction with using usbds for Switch-as-arbitrary-devices.
+
Additional descriptors for use with interfaces/endpoints can't be configured with usbds, even though the former is used for the default HID interface. This seems to be the main(?) restriction with using usbds for Switch-as-arbitrary-devices. The device class fields can't be configured, interface class fields are set instead.
    
   Bus 003 Device 006: ID 057e:2000 Nintendo Co., Ltd  
 
   Bus 003 Device 006: ID 057e:2000 Nintendo Co., Ltd  
Line 221: Line 221:  
Each field is an u8, except for offset 0x4-0x5 which is an u16.
 
Each field is an u8, except for offset 0x4-0x5 which is an u16.
   −
This structure matches [http://libusb.sourceforge.net/api-1.0/structlibusb__endpoint__descriptor.html libusb_endpoint_descriptor].
+
This structure matches [http://libusb.sourceforge.net/api-1.0/structlibusb__endpoint__descriptor.html libusb_endpoint_descriptor], with audio-only-devices fields bRefresh and bSynchAddress removed.
    
The buffer size must be >=0x7. Only the first 0x7-bytes from the buffer are used.
 
The buffer size must be >=0x7. Only the first 0x7-bytes from the buffer are used.

Navigation menu