In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

/dev/uhs

From WiiUBrew
< /dev
Revision as of 04:59, 7 April 2015 by Marionumber1 (talk | contribs) (Start documenting UHS (USB Host Stack))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

/dev/uhs is the IOSU device node for USB. It provides an interface for low-level USB device access, which nsysuhs.rpl exposes to the Cafe OS userspace. The interface is opened through /dev/uhs/%d, where %d is an integer representing something (controller number?). Only 0 can be opened, as 1 returns access denied and further values do not exist as device nodes. Once opened, ioctl() requests can be issued to the interface, which are documented below.

ioctl() interface

0x11 - UhsQueryInterfaces()

This function appears to be used to determine which USB device interfaces are plugged in and available. IOS_Ioctl() with this code returns the number of USB devices plugged in.