IOUSBInterfaceInterface550

Type Alias IOUSBInterfaceInterface550 

Source
pub type IOUSBInterfaceInterface550 = IOUSBInterfaceStruct550;
Available on crate features AppleUSBDefinitions and IOUSBLib and USB and libc only.
Expand description

The object you use to access a USB device interface from user space, returned by the IOUSBFamily version 5.5.0 and above.

The functions listed here include all of the functions defined for IOUSBInterfaceInterface500, as well as some new functions that are available on Mac OS X version 10.8.2 and later. Super: IOUSBInterfaceInterface500

See also Apple’s documentation

Aliased Type§

pub struct IOUSBInterfaceInterface550 {
Show 69 fields pub QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, CFUUIDBytes, *mut *mut c_void) -> i32>, pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> u32>, pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> u32>, pub CreateInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> i32>, pub GetInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>, pub CreateInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>, pub GetInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> u32>, pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> i32>, pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> i32>, pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> i32>, pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> i32>, pub GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> i32>, pub GetConfigurationValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>, pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>, pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>, pub GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> i32>, pub ControlRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> i32>, pub ControlRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub GetPipeProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8) -> i32>, pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>, pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>, pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>, pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>, pub ReadPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> i32>, pub WritePipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> i32>, pub ReadPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub WritePipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub ReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub WriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub ControlRequestTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> i32>, pub ControlRequestAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub ReadPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> i32>, pub WritePipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> i32>, pub ReadPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub WritePipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub USBInterfaceGetStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>, pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> i32>, pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>, pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> i32>, pub GetBandwidthAvailable: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>, pub GetEndpointProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u8, u8, *mut u8, *mut u16, *mut u8) -> i32>, pub LowLatencyReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub LowLatencyWriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub LowLatencyCreateBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, u64, u32) -> i32>, pub LowLatencyDestroyBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> i32>, pub GetBusMicroFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> i32>, pub GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>, pub GetIOUSBLibVersion: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32, *mut u32) -> i32>, pub FindNextAssociatedDescriptor: Option<unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader>, pub FindNextAltInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, *const c_void, *mut IOUSBFindInterfaceRequest) -> *mut IOUSBDescriptorHeader>, pub GetBusFrameNumberWithTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> i32>, pub GetPipePropertiesV2: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8, *mut u8, *mut u8, *mut u16) -> i32>, pub GetPipePropertiesV3: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> i32>, pub GetEndpointPropertiesV3: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> i32>, pub SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> i32>, pub CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> i32>, pub GetConfiguredStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> i32>, pub ReadStreamsPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, *mut u32, u32, u32) -> i32>, pub WriteStreamsPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> i32>, pub ReadStreamsPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub WriteStreamsPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>, pub AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> i32>, /* private fields */
}

Fields§

§QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, CFUUIDBytes, *mut *mut c_void) -> i32>§AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> u32>§Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> u32>§CreateInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> i32>§GetInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>§CreateInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>§GetInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> u32>§USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> i32>§USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> i32>§GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> i32>§GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> i32>§GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> i32>§GetConfigurationValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>§GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>§SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>§GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> i32>§ControlRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> i32>§ControlRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§GetPipeProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8) -> i32>§GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>§AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>§ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>§ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>§ReadPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> i32>§WritePipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> i32>§ReadPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§WritePipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§ReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§WriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§ControlRequestTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> i32>§ControlRequestAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§ReadPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> i32>§WritePipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> i32>§ReadPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§WritePipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§USBInterfaceGetStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> i32>§USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> i32>§ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> i32>§SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> i32>§GetBandwidthAvailable: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>§GetEndpointProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u8, u8, *mut u8, *mut u16, *mut u8) -> i32>§LowLatencyReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§LowLatencyWriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>§LowLatencyCreateBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, u64, u32) -> i32>§LowLatencyDestroyBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> i32>§GetBusMicroFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> i32>§GetFrameListTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> i32>§GetIOUSBLibVersion: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32, *mut u32) -> i32>§FindNextAssociatedDescriptor: Option<unsafe extern "C-unwind" fn(*mut c_void, *const c_void, u8) -> *mut IOUSBDescriptorHeader>§FindNextAltInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, *const c_void, *mut IOUSBFindInterfaceRequest) -> *mut IOUSBDescriptorHeader>§GetBusFrameNumberWithTime: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> i32>§GetPipePropertiesV2: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8, *mut u8, *mut u8, *mut u16) -> i32>§GetPipePropertiesV3: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBEndpointProperties) -> i32>

Gets the different properties for a pipe. This API uses a pointer to IOUSBEndpointProperties to return all the different properties.

Once an interface is opened, all of the pipes in that interface get created by the kernel. The number of pipes can be retrieved by GetNumEndpoints. The client can then get the properties of any pipe using an index of 1 to GetNumEndpoints. Pipe 0 is the default control pipe in the device.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter properties: pointer to a IOUSBEndpointProperties that will contain all the endpoint parameters. Initialize the bVersion field with the appropriate version. (See USBGetEndpointVersion in USB.h). The bMaxStreams field, if valid, is the actual number of streams that are supported for this pipe (e.g. it takes into account what the USB controller supports, as well as what the endpoint supports). The wMaxPacketSize is the current FULL maxPacketSize for this pipe, which includes both the mult and the burst. It may have been changed by SetPipePolicy, or it could be 0 as a result of a lack of bandwidth.

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access.

§GetEndpointPropertiesV3: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOUSBEndpointProperties) -> i32>

Returns the properties of an endpoint, possibly in an alternate interface, including any information from the SuperSpeed Companion Descriptor

Parameter properties: pointer to a IOUSBEndpointProperties that will contain all the endpoint parameters. Initialize the bVersion field with the appropriate version. (See USBGetEndpointVersion in USB.h). Initialize the bAlternateSetting, bEndpointNumber, and bDirection fields of the structure with the desired values for the endpoint.

Parameter properties: pointer to a IOUSBEndpointProperties that will contain all the endpoint parameters. Initialize the bVersion field with the appropriate version. (See USBGetEndpointVersion in USB.h). You also NEED to initialize the bAlternateSetting, the bDirection (kUSBIn or kUSBOut), and the bEndPointNumber with the desired values for the endpoint. The bMaxStreams field, if valid, is the number of streams found in the Super Speed Companion Descriptor. The wMaxPacketSize is the BASE maxPacketSize as found in the endpoint descriptor, and has not been multiplied to take into account burst and mult.

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access.

§SupportsStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> i32>

Returns non zero if the pipe supports streams, nonZero for the maximum supported streams

The interface does not have to be open to use this function.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter supportsStreams: 0 if streams not supported, non-zero value indicates maximum stream number

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.

§CreateStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> i32>

Creates the streams for the pipe

The interface does not have to be open to use this function.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter streamID: pass 0 if you want to destroy all streams, non-zero value indicates streamID of the highest stream to create

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.

§GetConfiguredStreams: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u32) -> i32>

Get the number of streams which have been configured for the endpoint with CreateStreams

The interface does not have to be open to use this function.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter configuredStreams: Number of streams that have been configured with CreateStreams

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.

§ReadStreamsPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, *mut u32, u32, u32) -> i32>

Performs a read on a stream in a BULK IN pipe, specifying timeout values.

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

 //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall

or

 //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds

.

Timeouts do not apply to interrupt pipes, so you should use the ReadPipe API to perform a read from an interrupt pipe. Availability: This function is only available with IOUSBInterfaceInterface182 and above.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter streamID: ID of the stream to read from

Parameter buf: Buffer to hold the data.

Parameter size: Pointer to the size of the buffer pointed to by buf.

Parameter 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.

Parameter 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: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnAborted if the thread is interrupted before the call completes, or kIOReturnNotOpen if the interface is not open for exclusive access. Returns kIOReturnBadArgument if timeout values are specified for an interrupt pipe. If an error is returned, the size parameter is not updated and the buffer will NOT contain any valid data.

§WriteStreamsPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32) -> i32>

Performs an write on a stream on a BULK OUT pipe, with specified timeout values.

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

 //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall

or

 //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds

. Availability: This function is only available with IOUSBInterfaceInterface182 and above.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter streamID: ID of the stream to write to

Parameter buf: Buffer to hold the data.

Parameter size: The size of the buffer pointed to by buf.

Parameter 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.

Parameter 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: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnAborted if the thread is interrupted before the call completes, or kIOReturnNotOpen if the interface is not open for exclusive access.

§ReadStreamsPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>

Performs an asynchronous read on a stream on a BULK IN pipe, with specified timeout values.

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

 //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall

or

 //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds

.

Timeouts do not apply to interrupt pipes, so you should use the ReadPipeAsync API to perform an asynchronous read from an interrupt pipe. Availability: This function is only available with IOUSBInterfaceInterface182 and above.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter streamID: ID of the stream to read from

Parameter buf: Buffer to hold the data.

Parameter size: The size of the buffer pointed to by buf.

Parameter 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.

Parameter 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.

Parameter callback: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually read. A message addressed to this callback is posted to the Async port upon completion.

Parameter refcon: Arbitrary pointer which is passed as a parameter to the callback routine.

Returns: 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. If an error is returned, the size parameter is not updated and the buffer will NOT contain any valid data.

§WriteStreamsPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32, *mut c_void, u32, u32, u32, Option<unsafe extern "C-unwind" fn(*mut c_void, i32, *mut c_void)>, *mut c_void) -> i32>

Performs an asynchronous write on a stream on a BULK OUT pipe, with specified timeout values.

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

 //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall

or

 //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds

. Availability: This function is only available with IOUSBInterfaceInterface182 and above.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter streamID: ID of the stream to write to

Parameter buf: Buffer to hold the data.

Parameter size: The size of the buffer pointed to by buf.

Parameter 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.

Parameter 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.

Parameter callback: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually written. A message addressed to this callback is posted to the Async port upon completion.

Parameter refcon: Arbitrary pointer which is passed as a parameter to the callback routine.

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access.

§AbortStreamsPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u32) -> i32>

This method causes all outstanding I/O on a stream of a pipe to complete with return code kIOReturnAborted.

If there are outstanding asynchronous transactions on the pipe, the callbacks will happen. Note that this command will also clear the halted bit on the endpoint in the controller, but will NOT clear the data toggle bit. If you want to clear the data toggle bit as well, see

 //apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStall

or

 //apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds

for more information. The interface must be open for the pipe to exist.

Parameter self: Pointer to the IOUSBInterfaceInterface.

Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).

Parameter streamID: ID of the stream to abort

Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access.