Line 47:
Line 47:
== /dev/usb/oh0 ==
== /dev/usb/oh0 ==
+
The IOS59 version of the OH1 module appears to be able to register itself as /dev/usb/oh0 and implements a similar set of requests. Even under an older version (such as IOS36), the OH0 and OH1 interfaces appear to be very similar.
+
{| class="wikitable"
{| class="wikitable"
|-
|-
−
! Request !! Name !! Input !! Output
+
! Request !! Name !! Input !! Output !! OH0/OH1
! Notes
! Notes
|-
|-
−
| 12 (ioctlv) || USBV0_IOCTL_GETDEVLIST || 2 || 2
+
| 12 (ioctlv) || USBV0_IOCTL_GETDEVLIST || 2 || 2 || Both
|
|
* in 0: u8 - number of descriptors to return
* in 0: u8 - number of descriptors to return
Line 61:
Line 63:
|-
|-
−
| 15 (ioctl) || ? || - || 4 bytes
+
| 15 (ioctl) || ? || - || 4 bytes || Both
| Mentioned by comex in #dolphin-dev.
| Mentioned by comex in #dolphin-dev.
|-
|-
−
| 20 (ioctlv) || ? || 1 || 1
+
| 20 (ioctlv) || ? || 1 || 1 || Both
| Unknown.
| Unknown.
* in 0: u8 - ???
* in 0: u8 - ???
Line 71:
Line 73:
|-
|-
−
| 25 (ioctlv) || ? || 2 || 0
+
| 25 (ioctlv) || ? || 2 || Both
| Unknown. Returns IPC_EINVAL if in_vectors[0] is greater than the least significant byte of (heap + 0x40). Possibly has to do with suspend/resume. {{check}}
| Unknown. Returns IPC_EINVAL if in_vectors[0] is greater than the least significant byte of (heap + 0x40). Possibly has to do with suspend/resume. {{check}}
* in 0: u8 - ???
* in 0: u8 - ???
Line 77:
Line 79:
|-
|-
−
| 27 (ioctlv) || USBV0_IOCTL_DEVINSERTHOOK || 2 || 0
+
| 27 (ioctlv) || USBV0_IOCTL_DEVINSERTHOOK || 2 || 0 || OH0
|
|
Returns when a device with the requested VID/PID is plugged in, or immediately if the device is already inserted.
Returns when a device with the requested VID/PID is plugged in, or immediately if the device is already inserted.
Line 84:
Line 86:
|-
|-
−
| 30 (ioctlv) || USBV0_IOCTL_DEVINSERTHOOKID (RegisterInsertionNotifyWithId) || 3 || 1
+
| 30 (ioctlv) || USBV0_IOCTL_DEVINSERTHOOKID (RegisterInsertionNotifyWithId) || 3 || 1 || OH0
|
|
Returns when a device with the requested VID/PID is plugged in, or immediately if the device is already inserted.
Returns when a device with the requested VID/PID is plugged in, or immediately if the device is already inserted.
Line 96:
Line 98:
|-
|-
−
| 31 (?) || ? (IUSB_CancelInsertionNotify) || ? || ?
+
| 31 (?) || ? (IUSB_CancelInsertionNotify) || ? || ? || OH0
| ?
| ?
|}
|}
Line 105:
Line 107:
{| class="wikitable"
{| class="wikitable"
|-
|-
−
! Request !! Name !! Input !! Output
+
! Request !! Name !! Input !! Output !! OH0/OH1
! Notes
! Notes
|-
|-
−
| 0 (ioctlv) || USBV0_IOCTL_CTRLMSG || 6 || 1
+
| 0 (ioctlv) || USBV0_IOCTL_CTRLMSG || 6 || 1 || Both
|
|
Submits a control transfer.
Submits a control transfer.
Line 121:
Line 123:
|-
|-
−
| 1 (ioctlv) || USBV0_IOCTL_BLKMSG || 2 || 1
+
| 1 (ioctlv) || USBV0_IOCTL_BLKMSG || 2 || 1 || Both
|
|
Submits a bulk transfer.
Submits a bulk transfer.
Line 129:
Line 131:
|-
|-
−
| 2 (ioctlv) || USBV0_IOCTL_INTRMSG || 2 || 1
+
| 2 (ioctlv) || USBV0_IOCTL_INTRMSG || 2 || 1 || Both
|
|
Submits an interrupt transfer.
Submits an interrupt transfer.
Line 137:
Line 139:
|-
|-
−
| 5 (ioctl) || USBV0_IOCTL_SUSPENDDEV || ? || ?
+
| 5 (ioctl) || USBV0_IOCTL_SUSPENDDEV || ? || ? || Both
|
|
−
Unknown. According to libogc, this is used for suspending a device.
+
Unknown. According to libogc, this is used for suspending a device. (Is this a host or device request?) {{check}}
|-
|-
−
| 6 (ioctl) || USBV0_IOCTL_RESUMEDEV || ? || ?
+
| 6 (ioctl) || USBV0_IOCTL_RESUMEDEV || ? || ? || Both
|
|
−
Unknown. According to libogc, this is used for resuming a device.
+
Unknown. According to libogc, this is used for resuming a device. (Is this a host or device request?) {{check}}
|-
|-
−
| 9 (ioctlv) || USBV0_IOCTL_ISOMSG || 3 || 2
+
| 9 (ioctlv) || USBV0_IOCTL_ISOMSG || 3 || 2 || OH0
|
|
Submits an isochronous transfer.
Submits an isochronous transfer.
Line 157:
Line 159:
|-
|-
−
| 26 (ioctlv) || USBV0_IOCTL_DEVREMOVALHOOK || 0 || 0
+
| 26 (ioctlv) || USBV0_IOCTL_DEVREMOVALHOOK || 0 || 0 || Both
|
|
Returns when the device is unplugged.
Returns when the device is unplugged.
|-
|-
−
| 29 (ioctl) || ? || - || -
+
| 29 (ioctl) || ? || - || - || OH0
|
|
Unknown. Used by Wheel of Fortune on shutdown. This probably resets the device.
Unknown. Used by Wheel of Fortune on shutdown. This probably resets the device.