/dev/usb/ven
From WiiBrew
Description
This device is used to communicate with the USB camera provided with the game "Your Shape". Not much information is known at this time.
It is implemented by a module (USB_VEN) in IOS58. It appears to be able to generically address devices via OHC1 or EHCI, by way of ioctl calls to /dev/usb/usb. It is accessed via several ioctl/ioctlvs. This information is incomplete, please fill it in when possible.
All buffers must be in MEM2 (addr > 0x10000000) and aligned to a 32-byte boundary. For all of the ioctlvs, the first buffer must be 64 bytes long.
Ioctls
| Ioctlv | Parameters | Function | Notes |
|---|---|---|---|
| 0 | 0 / 0x20 (ioctl) | ven_open | |
| 1 | 0 / 0x180 (ioctl) | ven_attach_complete_callback | |
| 2 | 0 / 0 (ioctl) | ven_close | |
| 3 | 0x20 / 0xC0 (ioctl) | ? | calls /dev/usb/usb ioctl 2 |
| 4 | 0x20 / 0 (ioctl) | ? | |
| 5 | 0x20 / 0 (ioctl) | ? | indirectly calls /dev/usb/usb ioctl 1 |
| 6 | 0 / 0 (ioctl) | ? | calls /dev/usb/usb ioctl 1 |
| 7 | 0x20 / 0 (ioctl) | ven_set_alt_setting | calls /dev/usb/usb ioctl 5 and/or 0x11 |
| 8 | 0x20 / ? (ioctl) | ? | calls /dev/usb/usb ioctl 3 |
| 0x10 | 0x20 / 0 (ioctl) | ven_suspend_resume, ven_attach_suspend_callback, ven_attach_get_device_params_callback | calls /dev/usb/usb ioctl 4 |
| 0x11 | 0x20 / 0 (ioctl) | ven_cancel_endpoint | calls /dev/usb/usb ioctl 0x10 |
| 0x12 | 1 in / 1 io, or 2 in / 0 io? (ioctlv) | ven_ctrl | calls /dev/usb/usb ioctl 0x11 |
| 0x13 | 1/1 or 2/0? (ioctlv) | ven_intr | calls /dev/usb/usb ioctl 0x12 |
| 0x14 | 2/2 or 3/1 (ioctlv) | ven_isoc | calls /dev/usb/usb ioctl 0x13 |
| 0x15 | ? (ioctlv) | ven_? | calls /dev/usb/usb ioctl 0x14 |