Changes

Jump to navigation Jump to search
888 bytes added ,  15:41, 6 May 2019
Line 40: Line 40:  
|-
 
|-
 
| 11 || [5.0.0+] Disable
 
| 11 || [5.0.0+] Disable
 +
|-
 +
| 12 || [8.0.0+]
 
|}
 
|}
   Line 374: Line 376:  
Stops in-progress data-transfer done by [[#PostBufferAsync]].
 
Stops in-progress data-transfer done by [[#PostBufferAsync]].
   −
= usb:hs =
+
= usb:hs, usb:hs:a =
= usb:hs:a =
   
This is "nn::usb::hs::IClientRootSession".
 
This is "nn::usb::hs::IClientRootSession".
   Line 607: Line 608:     
==== GetXferReport ====
 
==== GetXferReport ====
Takes an input u32 and a type-0x6 output buffer, returns an output u32 '''count'''.
+
Takes an input u32 and a type-0x6 ([3.0.0+] type-0x22) output buffer, returns an output u32 '''count'''.
    
The input u32 specifies the total number of entries to read, this must fit within the specified buffer size. The output u32 is the total actual output entries.
 
The input u32 specifies the total number of entries to read, this must fit within the specified buffer size. The output u32 is the total actual output entries.
Line 616: Line 617:  
Unofficial name.
 
Unofficial name.
   −
Takes 3 input u32s ('''urbCount''', '''unk1''', and '''unk2'''), an input u64 '''buffer''' and u64 '''unk''', and a type-0x5 input buffer, returns an output u32 '''xferId'''.
+
Takes 3 input u32s ('''urbCount''', '''unk1''', and '''unk2'''), an input u64 '''buffer''' and u64 '''unk''', and a type-0x5 ([3.0.0+] type-0x21) input buffer, returns an output u32 '''xferId'''.
    
Where '''unk''' is the same as [[#PostBufferAsync_2|#PostBufferAsync]].
 
Where '''unk''' is the same as [[#PostBufferAsync_2|#PostBufferAsync]].
Line 699: Line 700:     
This is used to filter [[#UsbHsInterface]], the query commands will only return the interface when these checks pass. This is also used for events with [[#CreateInterfaceAvailableEvent]]. When a bit in Flags is set, the associated descriptor field and the field in this struct are compared, on mismatch the interface will be filtered out. Passing Flags=0 is equivalent to disabling filtering since none of these checks will run.
 
This is used to filter [[#UsbHsInterface]], the query commands will only return the interface when these checks pass. This is also used for events with [[#CreateInterfaceAvailableEvent]]. When a bit in Flags is set, the associated descriptor field and the field in this struct are compared, on mismatch the interface will be filtered out. Passing Flags=0 is equivalent to disabling filtering since none of these checks will run.
 +
 +
[7.0.0+]: The filter struct has to be unique, it can't match any existing filter structs used by [[#CreateInterfaceAvailableEvent]] (including other processes). Hence, Flags has to be non-zero. When initialized with usb:hs:a and VID and/or PID filtering is enabled, the VID/PID will be checked [[#HidGamepad]], with an error being throw if a matching device is found with quirk "ApplicationBlacklist" ([[#usb:qdb|usb:qdb]] cmd1 is used internally for this with bcdDevice=0).
    
Flags bits 0..6 use usb_device_descriptor, while 7..9 use usb_interface_descriptor. Support for bits 2..6 and the associated fields was added with [6.0.0+].
 
Flags bits 0..6 use usb_device_descriptor, while 7..9 use usb_interface_descriptor. Support for bits 2..6 and the associated fields was added with [6.0.0+].
Line 869: Line 872:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 
|-
 
|-
| 0 || || No input/output, takes a type-0x5 input buffer.
+
| 0 ||  
 
|-
 
|-
| 1 || || Takes 6-bytes of input and a type-0x5 input buffer, returns an output u8 bool indicating success.
+
| 1 ||  
 
|}
 
|}
   −
This service loads data for [[#HidGamepad]] with the input .json.
+
== Cmd0 ==
 +
No input/output, takes a type-0x5 input buffer.
 +
 
 +
This loads data for [[#HidGamepad]] with the input .json.
 +
 
 +
== Cmd1 ==
 +
Takes 6-bytes of input (u16s '''vid''', '''pid''', '''bcdDevice''') and a type-0x5 input buffer, returns an output u8 bool indicating success.
 +
 
 +
Locates an entry in the [[#HidGamepad]] state with the input u16s, and checks for a '''quirks''' array entry where '''name''' matches the input buffer string. Returns 1 when found, 0 otherwise.
 +
 
 +
= usb:obsv =
 +
Added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||
 +
|-
 +
| 1 ||
 +
|}
    
= HidGamepad =
 
= HidGamepad =

Navigation menu