ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOUSBInterfaceInterface182 |
Inherits from: | IOUSBInterfaceInterface |
Declared In: |
The object you use to access a USB device interface 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 IOUSBInterfaceInterface and some new functions that are available on Mac OS X version 10.0.4 and later.
Sends an asynchronous USB request on a control pipe.
Sends a USB request on a control pipe.
Performs an asynchronous read on a BULK IN pipe, with specified timeout values.
Performs a read on a BULK IN pipe, specifying timeout values.
Returns the string index in the interface descriptor.
Performs an asynchronous write on a BULK OUT pipe, with specified timeout values.
Performs an asynchronous write on a BULK OUT pipe, with specified timeout values.
ControlRequestAsyncTO |
Sends an asynchronous USB request on a control pipe.
IOReturn ( *ControlRequestAsyncTO)( void *self, UInt8 pipeRef, IOUSBDevRequestTO *req, IOAsyncCallback1 callback, void *refCon);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index of the control pipe to use. Use zero for the default control pipe on the device.
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, or kIOReturnNotOpen if the interface is not open for exclusive access.
The IOUSBDevRequestTO structure allows the client to specify timeout values for this request. Use pipeRef=0 for the default device control pipe. If the request is a standard request which will change the state of the device, the device must be open, which means you should be using the IOUSBDeviceInterface for this command.
ControlRequestTO |
Sends a USB request on a control pipe.
IOReturn ( *ControlRequestTO)( void *self, UInt8 pipeRef, IOUSBDevRequestTO *req);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index of the control pipe to use. Use zero for the default control pipe on the device.
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 interface is not open for exclusive access.
The IOUSBDevRequestTO structure allows the client to specify timeout values for this request. If the request is a standard request which will change the state of the device, the device must be open, which means you should be using the IOUSBDeviceInterface for this command.
ReadPipeAsyncTO |
Performs an asynchronous read on a BULK IN pipe, with specified timeout values.
IOReturn ( *ReadPipeAsyncTO)( void *self, UInt8 pipeRef, void *buf, UInt32 size, UInt32 noDataTimeout, UInt32 completionTimeout, IOAsyncCallback1 callback, void *refcon);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index for the desired pipe (1 - GetNumEndpoints ).
buf
Buffer to hold the data.
size
The size of the buffer pointed to by buf.
noDataTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned.
completionTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned.
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, or kIOReturnNotOpen if the interface is not open for exclusive access. Returns kIOReturnBadArgument if timeout values are specified for an interrupt pipe.
The interface must be open for the pipe to exist.
If a timeout is specified and the request times out, the driver may need to resynchronize the data toggle. See ClearPipeStall or ClearPipeStallBothEnds .
Timeouts do not apply to interrupt pipes, so you should use the ReadPipeAsync call to perform an asynchronous read from an interrupt pipe.
ReadPipeTO |
Performs a read on a BULK IN pipe, specifying timeout values.
IOReturn ( *ReadPipeTO)( void *self, UInt8 pipeRef, void *buf, UInt32 *size, UInt32 noDataTimeout, UInt32 completionTimeout);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index for the desired pipe (1 - GetNumEndpoints ).
buf
Buffer to hold the data.
size
Pointer to the size of the buffer pointed to by buf.
noDataTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned.
completionTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access. Returns kIOReturnBadArgument if timeout values are specified for an interrupt pipe.
The interface must be open for the pipe to exist.
If a timeout is specified and the request times out, the driver may need to resynchronize the data toggle. See ClearPipeStall or ClearPipeStallBothEnds .
Timeouts do not apply to interrupt pipes, so you should use the ReadPipe call to perform a read from an interrupt pipe.
USBInterfaceGetStringIndex |
Returns the string index in the interface descriptor.
IOReturn ( *USBInterfaceGetStringIndex)( void *self, UInt8 *si);
self
Pointer to the IOUSBInterfaceInterface.
si
Pointer to UInt8 to hold the string index.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
The interface does not have to be open to use this function.
WritePipeAsyncTO |
Performs an asynchronous write on a BULK OUT pipe, with specified timeout values.
IOReturn ( *WritePipeAsyncTO)( void *self, UInt8 pipeRef, void *buf, UInt32 size, UInt32 noDataTimeout, UInt32 completionTimeout, IOAsyncCallback1 callback, void *refcon);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index for the desired pipe (1 - GetNumEndpoints ).
buf
Buffer to hold the data.
size
The size of the buffer pointed to by buf.
noDataTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned.
completionTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned.
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, or kIOReturnNotOpen if the interface is not open for exclusive access.
The interface must be open for the pipe to exist.
If a timeout is specified and the request times out, the driver may need to resynchronize the data toggle. See ClearPipeStall or ClearPipeStallBothEnds.
WritePipeTO |
Performs an asynchronous write on a BULK OUT pipe, with specified timeout values.
IOReturn ( *WritePipeTO)( void *self, UInt8 pipeRef, void *buf, UInt32 size, UInt32 noDataTimeout, UInt32 completionTimeout);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index for the desired pipe (1 - GetNumEndpoints ).
buf
Buffer to hold the data.
size
The size of the buffer pointed to by buf.
noDataTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if no data is transferred in this amount of time, the request will be aborted and returned.
completionTimeout
Specifies a time value in milliseconds. Once the request is queued on the bus, if the entire request is not completed in this amount of time, the request will be aborted and returned.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access.
The interface must be open for the pipe to exist.
If a timeout is specified and the request times out, the driver may need to resynchronize the data toggle. See ClearPipeStall or ClearPipeStallBothEnds.
|
Last Updated: 2009-02-23