ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOUSBDeviceInterface182 |
Inherits from: | IOUSBDeviceInterface |
Declared In: |
The object you use to access USB devices from user space, returned by the IOUSBFamily version 1.8.2 and above.
The functions listed here include all of the functions defined for the IOUSBDeviceInterface and some new functions that are available on Mac OS X version 10.0.4 and later.
Sends an asynchronous USB request on the default control pipe.
Sends a USB request on the default control pipe.
Aborts a transaction on the default control pipe.
Opens the IOUSBDevice for exclusive access.
Tells the USB Family to either suspend or resume the port to which a device is attached.
Returns the manufacturer string index in the device descriptor.
Returns the product string index in the device descriptor.
Returns the serial number string index in the device descriptor.
DeviceRequestAsyncTO |
Sends an asynchronous USB request on the default control pipe.
IOReturn ( *DeviceRequestAsyncTO)( void *self, IOUSBDevRequestTO *req, IOAsyncCallback1 callback, void *refCon);
self
Pointer to the IOUSBDeviceInterface.
req
Pointer to an IOUSBDevRequestTO containing the request.
callback
An IOAsyncCallback1 method. A message addressed to this callback is posted to the Async port upon completion.
refCon
Arbitrary pointer which is passed as a parameter to the callback routine.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNotOpen if the device is not open for exclusive access, or kIOUSBNoAsyncPortErr if no Async port has been created for this interface.
This function sends an asynchronous USB request on the default control pipe. The IOUSBDevRequestTO structure allows the client to specify timeout values for this request. The device must be open to issue this command. Care should be taken when issuing a device request which changes the state of the device. Use the API, for example, to change the configuration of the device or to select an alternate setting on an interface.
DeviceRequestTO |
Sends a USB request on the default control pipe.
IOReturn ( *DeviceRequestTO)( void *self, IOUSBDevRequestTO *req);
self
Pointer to the IOUSBDeviceInterface.
req
Pointer to an IOUSBDevRequestTO containing the request.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the device is not open for exclusive access.
This function sends a USB request on the default control pipe. The IOUSBDevRequestTO structure allows the client to specify timeout values for this request. The device must be open to issue this command. Care should be taken when issuing a device request which changes the state of the device. Use the API, for example, to change the configuration of the device or to select an alternate setting on an interface.
USBDeviceAbortPipeZero |
Aborts a transaction on the default control pipe.
IOReturn ( *USBDeviceAbortPipeZero)( void *self);
self
Pointer to the IOUSBDeviceInterface.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the device is not open for exclusive access.
The device must be open to use this function.
USBDeviceOpenSeize |
Opens the IOUSBDevice for exclusive access.
IOReturn ( *USBDeviceOpenSeize)( void *self);
self
Pointer to the IOUSBDeviceInterface.
Returns kIOReturnExclusiveAccess if some other task has the device opened already and refuses to close it, kIOReturnError if the connection with the kernel can not be established or kIOReturnSuccess if successful.
This function opens the IOUSBDevice for exclusive access. If another client has the device opened, an attempt is made to get that client to close it before returning. Before the client can issue commands that change the state of the device, it must have succeeded in opening the device. This establishes an exclusive link between the client's task and the actual device.
USBDeviceSuspend |
Tells the USB Family to either suspend or resume the port to which a device is attached.
IOReturn ( *USBDeviceSuspend)( void *self, Boolean suspend);
self
Pointer to the IOUSBDeviceInterface.
suspend
TRUE to cause the port to be suspended, FALSE to cause it to be resumed.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the device is not open for exclusive access.
The device must be open to use this function.
USBGetManufacturerStringIndex |
Returns the manufacturer string index in the device descriptor.
IOReturn ( *USBGetManufacturerStringIndex)( void *self, UInt8 *msi);
self
Pointer to the IOUSBDeviceInterface.
msi
Pointer to UInt8 to hold the string index.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
The device does not have to be open to use this function.
USBGetProductStringIndex |
Returns the product string index in the device descriptor.
IOReturn ( *USBGetProductStringIndex)( void *self, UInt8 *psi);
self
Pointer to the IOUSBDeviceInterface.
psi
Pointer to UInt8 to hold the string index.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
The device does not have to be open to use this function.
USBGetSerialNumberStringIndex |
Returns the serial number string index in the device descriptor.
IOReturn ( *USBGetSerialNumberStringIndex)( void *self, UInt8 *snsi);
self
Pointer to the IOUSBDeviceInterface.
snsi
Pointer to UInt8 to hold the string index.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
The device does not have to be open to use this function.
|
Last Updated: 2009-02-23