Line 4:
Line 4:
==ioctl() interface==
==ioctl() interface==
+
+
===0x00 - UhsQueryInterfaces()===
+
===0x01 - UhsClassDrvReg()===
===0x01 - UhsClassDrvReg()===
This function is used to register a USB class driver with UHS. Its input is a 24-byte buffer containing: a context pointer for a callback, the callback itself, and an [[#Interface Filter|interface filter buffer]] containing a series of parameters to filter the interfaces by, such as class, subclass, vendor ID, and product ID. When an interface matching the filter is added to UHS, it will trigger the callback, passing the context and an interface profile to it. The output is simply a 4-byte status code.
This function is used to register a USB class driver with UHS. Its input is a 24-byte buffer containing: a context pointer for a callback, the callback itself, and an [[#Interface Filter|interface filter buffer]] containing a series of parameters to filter the interfaces by, such as class, subclass, vendor ID, and product ID. When an interface matching the filter is added to UHS, it will trigger the callback, passing the context and an interface profile to it. The output is simply a 4-byte status code.
+
+
===0x02 - UhsClassDrvUnReg()===
===0x04 - UhsAcquireInterface()===
===0x04 - UhsAcquireInterface()===
Line 12:
Line 17:
===0x05 - UhsReleaseInterface()===
===0x05 - UhsReleaseInterface()===
This function is used to release a currently-acquired USB interface once the client is done using it. Its input is a 12-byte buffer containing: a 32-bit interface handle, a 32-bit boolean for whether clients should be barred from re-acquiring the interface later, and 0. No output is produced by IOSU.
This function is used to release a currently-acquired USB interface once the client is done using it. Its input is a 12-byte buffer containing: a 32-bit interface handle, a 32-bit boolean for whether clients should be barred from re-acquiring the interface later, and 0. No output is produced by IOSU.
+
+
===0x06 - UhsSetInterface()===
+
+
===0x07 - UhsGetInterface()===
+
+
===0x08 - UhsGetAlternateInterface()===
+
+
===0x09 - UhsGetDescriptorString()===
+
+
===0x0A - UhsGetFullConfigDescriptor()===
+
+
===0x0B - UhsAdministerEndpoint() / UhsAdministerEndpointOpt===
+
+
===0x0C - UhsAdministerDevice()===
+
+
===0x10 - UhsGetCurrentFrame()===
===0x11 - UhsQueryInterfaces()===
===0x11 - UhsQueryInterfaces()===
Line 22:
Line 43:
===0x0C - UhsSubmitControlRequest()===
===0x0C - UhsSubmitControlRequest()===
This function is used to send a control request to a USB device interface. It takes two buffers through the ioctlv interface: a [[#Request Blocks|control request block]] and the actual data buffer, in that order. If the direction of the request is out to the device, there are 0 inputs and 2 outputs; if the direction is in to the host, there is 1 input and 1 output.
This function is used to send a control request to a USB device interface. It takes two buffers through the ioctlv interface: a [[#Request Blocks|control request block]] and the actual data buffer, in that order. If the direction of the request is out to the device, there are 0 inputs and 2 outputs; if the direction is in to the host, there is 1 input and 1 output.
+
+
===0x0D - UhsSubmitInterruptRequest()===
+
+
===0x0F - UhsSubmitIsocRequest()===
===0x0E - UhsSubmitBulkRequest()===
===0x0E - UhsSubmitBulkRequest()===