Changes

Jump to navigation Jump to search
443 bytes added ,  11:16, 2 February 2021
no edit summary
Line 38: Line 38:  
11-12: Number of alternate settings<br>
 
11-12: Number of alternate settings<br>
   −
| Set up a device insertion/removal callback. Returns the number of entries.
+
| Set up a device insertion/removal callback. Returns the number of entries.
 +
 
 +
When a callback is triggered, the manager is locked to the caller handle and will not trigger other callbacks until AttachFinish is called. Other handlers will receive an IOS_EINVAL when attempting to modify device information.
    
Note that this ioctl immediately returns on the first call.
 
Note that this ioctl immediately returns on the first call.
Line 69: Line 71:  
The descriptor structures match the ones used by libusb (with padding).  
 
The descriptor structures match the ones used by libusb (with padding).  
 
|-
 
|-
| 4 || ?
+
| 4 || Attach
 
| 0x20 bytes
 
| 0x20 bytes
   Line 75: Line 77:  
2-4: Device number
 
2-4: Device number
 
| None
 
| None
| ? (related to callbacks) {{check}}
+
| Attaches the provided device to the current handle.
 
|-
 
|-
| 5 || ?
+
| 5 || Release
 
| 0x20 bytes
 
| 0x20 bytes
   Line 83: Line 85:  
2-4: Device number
 
2-4: Device number
 
| None
 
| None
| ? (related to callbacks) {{check}}
+
| Releases the provided device from the current handle. IPC_EINVAL is returned if a device does not belong to the caller handle.
 
  −
The caller handle must match a stored ID (?)
      
May trigger change callbacks and reissue /dev/usb/usb ioctl 1 in some conditions.
 
May trigger change callbacks and reissue /dev/usb/usb ioctl 1 in some conditions.
 
|-
 
|-
 
| 6 || AttachFinish || None || None
 
| 6 || AttachFinish || None || None
| The caller handle must match a stored ID (?)
+
| Unlocks the manager from the current handle, triggers change callbacks for the other active handles and issues /dev/usb/usb ioctl 1 in some cases.
   −
If it does, IPC_SUCCESS is returned, change callbacks are triggered and /dev/usb/usb ioctl 1 is issued.
+
If the caller handle does not match the one that locked the manager, IOS_EINVAL is returned.
 
|-
 
|-
 
| 7 || SetAlternateSetting
 
| 7 || SetAlternateSetting
Line 122: Line 122:  
| Suspend or resume a device.
 
| Suspend or resume a device.
   −
Calls /dev/usb/usb ioctl 4. If the call was successful, updates the internal device struct to reflect the state change. The new state must not be the same as the current one; otherwise IPC_EINVAL will be returned.
+
Calls /dev/usb/usb ioctl 4. If the call was successful, updates the internal device struct to reflect the state change. The device must belong to the caller handle and the new state must not be the same as the current one; otherwise IPC_EINVAL will be returned.
 
|-
 
|-
 
| 0x11 || CancelEndpoint
 
| 0x11 || CancelEndpoint
2

edits

Navigation menu