|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access I/O Kit Framework Reference
|
IOUSBDeviceInterface320 |
| Inherits from: | |
| Declared In: |
The object you use to access USB devices from user space, returned by the IOUSBFamily version 3.2.0 and above.
The functions listed here include all of the functions defined for the IOUSBDeviceInterface, IOUSBDeviceInterface182, IOUSBDeviceInterface187, IOUSBDeviceInterface197, IOUSBDeviceInterface245, or IOUSBDeviceInterface300 and some new functions that are available on Mac OS X version 10.5.4 and later.
Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA).
Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state.
Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA).
Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API.
GetExtraPowerAllocated |
Clients can use this API to ask how much extra power has already been reserved by this device. Units are milliAmps (mA).
IOReturn ( *GetExtraPowerAllocated)( void *self, UInt32 type, UInt32 *powerAllocated);
selfPointer to the IOUSBDeviceInterface.
typeIndicates whether the allocated power was to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
powerAllocatedAmount of power to be returned, in mA.
Value returned can be 0 if no power has been allocated. Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
The device has to be open to use this function.
GetUSBDeviceInformation |
Returns status information about the USB device, such as whether the device is captive or whether it is in the suspended state.
IOReturn ( *GetUSBDeviceInformation)( void *self, UInt32 *info);
selfPointer to the IOUSBDeviceInterface.
requestedPowerThe desired amount of power that the client wishes to reserve
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
The device does not have to be open to use this function.
RequestExtraPower |
Clients can use this API to reserve extra power for use by this device while the machine is asleep or while it is awake. Units are milliAmps (mA).
IOReturn ( *RequestExtraPower)( void *self, UInt32 type, UInt32 requestedPower, UInt32 *powerAvailable);
selfPointer to the IOUSBDeviceInterface.
typeIndicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
requestedPowerAmount of power desired, in mA
powerAvailableAmount of power that was reserved, in mA
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnUnsupported is the bus doesn't support this function.
The device has to be open to use this function.
ReturnExtraPower |
Clients can use this API to tell the system that they will not use power that was previously reserved by using the RequestExtraPower API.
IOReturn ( *ReturnExtraPower)( void *self, UInt32 type, UInt32 powerReturned);
selfPointer to the IOUSBDeviceInterface.
typeIndicates whether the power is to be used during wake or sleep (One of kUSBPowerDuringSleep or kUSBPowerDuringWake)
powerReturnedAmount of power to be returned, in mA.
If the returnedPower was not previously allocated, an error will be returned. This will include the case for power that was requested for sleep but was returned for wake. Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
The device has to be open to use this function.
Last Updated: 2009-10-15