pub struct IOUSBInterfaceStruct192 {Show 52 fields
pub QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
pub CreateInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>,
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 mach_port_t) -> IOReturn>,
pub GetInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> mach_port_t>,
pub USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
pub GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
pub GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>,
pub GetConfigurationValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
pub GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>,
pub SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>,
pub ControlRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>,
pub ControlRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub GetPipeProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8) -> IOReturn>,
pub GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub ReadPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>,
pub WritePipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>,
pub ReadPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub WritePipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub ReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub WriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub ControlRequestTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>,
pub ControlRequestAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub ReadPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn>,
pub WritePipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn>,
pub ReadPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub WritePipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub USBInterfaceGetStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>,
pub USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
pub ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>,
pub SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>,
pub GetBandwidthAvailable: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
pub GetEndpointProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u8, u8, *mut u8, *mut u16, *mut u8) -> IOReturn>,
pub LowLatencyReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub LowLatencyWriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>,
pub LowLatencyCreateBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn>,
pub LowLatencyDestroyBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>,
/* private fields */
}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 1.9.2 and above.
The functions listed here include all of the functions defined for the IOUSBInterfaceInterface, IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, IOUSBInterfaceInterface190, and some new functions that are available on Mac OS X version 10.2.3 and later. Super: IOUSBInterfaceInterface190
See also Apple’s documentation
Fields§
§QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>§AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>§Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>§CreateInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut CFRunLoopSource) -> IOReturn>§GetInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>§CreateInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut mach_port_t) -> IOReturn>§GetInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> mach_port_t>§USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>§GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>§GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>§GetConfigurationValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>§GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>§SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>§ControlRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>§ControlRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest, IOAsyncCallback1, *mut c_void) -> IOReturn>§GetPipeProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8) -> IOReturn>§GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§ReadPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>§WritePipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>§ReadPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>§WritePipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>§ReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>§WriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>§ControlRequestTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO) -> IOReturn>§ControlRequestAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequestTO, IOAsyncCallback1, *mut c_void) -> IOReturn>§ReadPipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32, u32, u32) -> IOReturn>§WritePipeTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32) -> IOReturn>§ReadPipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>§WritePipeAsyncTO: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, u32, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>§USBInterfaceGetStringIndex: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>§USBInterfaceOpenSeize: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>§ClearPipeStallBothEnds: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>§SetPipePolicy: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u16, u8) -> IOReturn>§GetBandwidthAvailable: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>§GetEndpointProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, u8, u8, *mut u8, *mut u16, *mut u8) -> IOReturn>§LowLatencyReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>Performs an asynchronous read on a isochronous pipe and updates the frame list at primary interrupt time.
The LowLatencyReadIsochPipeAsync() and LowLatencyWriteIsochPipeAsync() calls are analogous to ReadIsochPipeAsync() and WriteIsochPipeAsync(). They differ in that the frame list data is updated at primary interrupt time . This means that the client can inspect the frStatus and frActCount fields as soon as the transaction completes, without having to wait for the callback to happen (depending on the value of updateFrequency). The callback will still happen when all the frames have been received.
The client can specify how often the USB stack should update the frame list data by specifying the updateFrequency: this value can range from 0 - 8. If the value is between 1 and 8, the frame list will be updated every updateFrequency milliseconds. If the value is 0, the frame list will only be updated once all the frames in the transfer have been received. For example, consider a transfer with numFrames equal to 64. If the update frequency is 4, the frame list data will be updated every 4 milliseconds. If the update frequency is 0, the frame list will only be updated at the end of the transfer, after the 64 frames have been sent or received. The difference between using an update frequency of 0 and using the non-low latency isoch calls is that in the former case, the frame list will be updated at primary interrupt time, while in the latter, it will be updated at secondary interrupt time. Regardless of the value of updateFrequency, the frame list will always be updated on the last frame of a transfer.
The rationale for adding this call is that because completion routines run on the USB Workloop, they can be scheduled to run a number of milliseconds after the USB transfer has finished. This latency is variable and depends on what other higher priority threads are running on the system. This latency presents a problem for applications, such as audio processing, that depend on receiving data, processing it, and sending it back out, and need to do this as fast as possible. Since applications that use isochronous data know when the data should be available, they can look at the frame list at the expected time and note the frActCount and frStatus (and frTimeStamp if needed) and determine how many valid bytes are in their data buffer and whether there was an error. They can then access their data buffer and process the actual data.
In order to update the frame list at primary interrupt time and to allow the client to see that update, the frame list buffer needs to be shared between the kernel and user space. The same thing applies to the data buffer. This is a difference between the low latency isoch calls and the regular isoch calls. The LowLatencyCreateBuffer() call is used to pre-allocate the buffers. The client must use that call to allocate the data and the frame list buffers. The client can pass a portion of the buffer that was previously allocated. The USB stack will range-check the data and frame list buffers to make sure they are within the ranges of the buffers previously allocated. This allows the client, if it so desires, to allocate a large data buffer and pass portions of it to the read or write calls. The same applies to the frame list buffers. Of course, the client can also pre-allocate several data buffers and several frame list buffers and use those for each transfer. Once the transfer completes, the buffers can be reused in subsequent calls. When all transfers are finished, the client needs to call LowLatencyDestroyBuffer() for each buffer that was created with LowLatencyCreateBuffer().
The interface must be open for the pipe to exist. The buf pointer and the frameList pointer need to be pre-allocated using LowLatencyCreateBuffer(). After using them, they should be freed using LowLatencyDestroyBuffer(). Availability: This function is only available with IOUSBInterfaceInterface192 and above.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).
Parameter buf: Buffer to hold the data, previously allocated with LowLatencyCreateBuffer()
using a kUSBLowLatencyReadBuffer type.
Parameter frameStart: The bus frame number on which to start the read (obtained from GetBusFrameNumber).
Parameter numFrames: The number of frames for which to transfer data.
Parameter updateFrequency: Specifies how often, in milliseconds, the frame list data should be updated. Valid
range is 0 - 8. If 0, it means that the framelist should be updated at the end of the transfer.
Parameter frameList: A pointer to an array of IOUSBLowLatencyIsocFrame structures describing the frames.
Parameter callback: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the framelist pointer, which can be used to associate the completion with a particular request. 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. Will return kIOUSBLowLatencyBufferNotPreviouslyAllocated or kIOUSBLowLatencyFrameListNotPreviouslyAllocated if the buffer or the frameList were not previously allocated using LowLatencyCreateBuffer().
LowLatencyWriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, u32, *mut IOUSBLowLatencyIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>Performs an asynchronous write on an isochronous pipe and updates the frame list at primary interrupt time.
The LowLatencyReadIsochPipeAsync() and LowLatencyWriteIsochPipeAsync() calls are analogous to ReadIsochPipeAsync() and WriteIsochPipeAsync(). They differ in that the frame list data is updated at primary interrupt time . This means that the client can inspect the frStatus and frActCount fields as soon as the transaction completes, without having to wait for the callback to happen (depending on the value of updateFrequency). The callback will still happen when the all the frames have been received.
The client can specify how often the USB stack should update the frame list data by specifying the updateFrequency: this value can range from 0 - 8. If the value is between 1 and 8, the frame list will be updated every updateFrequency milliseconds. If the value is 0, the frame list will only be updated once all the frames in the transfer have been received. For example, consider a transfer with numFrames equal to 64. If the update frequency is 4, the frame list data will be updated every 4 milliseconds. If the update frequency is 0, the frame list will only be updated at the end of the transfer, after the 64 frames have been sent or received. The difference between using an update frequency of 0 and using the non-low latency isoch calls is that in the former case, the frame list will be updated at primary interrupt time, while in the latter, it will be updated at secondary interrupt time. Regardless of the value of updateFrequency, the frame list will always be updated on the last frame of a transfer.
The rationale for adding this call is that because completion routines run on the USB Workloop, they can be scheduled to run a number of milliseconds after the USB transfer has finished. This latency is variable and depends on what other higher priority threads are running on the system. This latency presents a problem for applications, such as audio processing, that depend on receiving data, processing it, and sending it back out, and need to do this as fast as possible. Since applications that use isochronous data know when the data should be available, they can look at the frame list at the expected time and note the frActCount and frStatus (and frTimeStamp if needed) and determine how many valid bytes are in their data buffer and whether there was an error. They can then access their data buffer and process the actual data.
In order to update the frame list at primary interrupt time and to allow the client to see that update, the frame list buffer needs to be shared between the kernel and user space. The same thing applies to the data buffer. This is a difference between the low latency isoch calls and the regular isoch calls. The LowLatencyCreateBuffer() call is used to pre-allocate the buffers. The client must use that call to allocate the data and the frame list buffers. The client can pass a portion of the buffer that was previously allocated. The USB stack will range-check the data and frame list buffers to make sure they are within the ranges of the buffers previously allocated. This allows the client, if it so desires, to allocate a large data buffer and pass portions of it to the read or write calls. The same applies to the frame list buffers. Of course, the client can also pre-allocate several data buffers and several frame list buffers and use those for each transfer. Once the transfer completes, the buffers can be reused in subsequent calls. When all transfers are finished, the client needs to call LowLatencyDestroyBuffer() for each buffer that was created with LowLatencyCreateBuffer().
The interface must be open for the pipe to exist. The buf pointer and the frameList pointer need to be pre-allocated using LowLatencyCreateBuffer(). After using them, they should be freed using LowLatencyDestroyBuffer(). Availability: This function is only available with IOUSBInterfaceInterface192 and above.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).
Parameter buf: Buffer to hold the data, previously allocated with LowLatencyCreateBuffer()
using a kUSBLowLatencyWriteBuffer type.
Parameter frameStart: The bus frame number on which to start the write (obtained from GetBusFrameNumber).
Parameter numFrames: The number of frames for which to transfer data.
Parameter updateFrequency: Specifies how often, in milliseconds, should the frame list data be updated. Valid
range is 0 - 8. If 0, it means that the framelist should be updated at the end of the transfer.
Parameter frameList: A pointer to an array of IOUSBLowLatencyIsocFrame structures describing the frames.
Parameter callback: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the framelist pointer, which can be used to associate the completion with a particular request. 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. Will return kIOUSBLowLatencyBufferNotPreviouslyAllocated or kIOUSBLowLatencyFrameListNotPreviouslyAllocated if the buffer or the frameList were not previously allocated using LowLatencyCreateBuffer().
LowLatencyCreateBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut c_void, IOByteCount, u32) -> IOReturn>Allocates a buffer of type bufferType.
This function allocates a buffer of type bufferType. The buffer can then be used with the LowLatencyIsochReadPipeAsync() or LowLatencyIsochWritePipeAsync() calls.
The LowLatencyIsochReadPipeAsync() or LowLatencyIsochWritePipeAsync() calls require the clients to pre-allocate the data buffer and the frame list buffer parameters. This call is used to allocate those buffers. After the client is done using the buffers, they need to be released through the LowLatencyDestroyBuffer() call.
If the buffer is to be used for reading data, the type passed in should be kUSBLowLatencyReadBuffer. If the buffer is to be used for writing data, the type should be kUSBLowLatencyWriteBuffer. For frame list data, the type should be kUSBLowLatencyFrameListBuffer.
The client can create multiple data and frame list buffers, or it can allocate a large buffer and then use only a portion of the buffer in calls to LowLatencyReadIsochPipeAsync() or LowLatencyWriteIsochPipeAsync().
The interface must be open for the pipe to exist. Availability: This function is only available with IOUSBInterfaceInterface192 and above.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter buffer: Pointer to a pointer that will receive the pointer to the buffer created by this call.
Parameter size: The size of the buffer to be created in bytes.
Parameter bufferType: Type of buffer: one of kUSBLowLatencyWriteBuffer, kUSBLowLatencyReadBuffer,
or kUSBLowLatencyFrameListBuffer. See the documentation for USB.h.
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. If the buffer can’t be allocated, it will return kIOReturnNoMemory.
LowLatencyDestroyBuffer: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void) -> IOReturn>Releases a buffer that was previously allocated using LowLatencyCreateBuffer().
The interface must be open for the pipe to exist. Availability: This function is only available with IOUSBInterfaceInterface192 and above.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter buffer: Pointer to the buffer previously allocated using LowLatencyCreateBuffer().
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. If the buffer was not previously allocated using LowLatencyCreateBuffer() it will return kIOReturnBadArgument.
Trait Implementations§
Source§impl Clone for IOUSBInterfaceStruct192
Available on crate feature usb only.
impl Clone for IOUSBInterfaceStruct192
usb only.Source§fn clone(&self) -> IOUSBInterfaceStruct192
fn clone(&self) -> IOUSBInterfaceStruct192
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IOUSBInterfaceStruct192
Available on crate feature usb only.
impl Debug for IOUSBInterfaceStruct192
usb only.Source§impl Encode for IOUSBInterfaceStruct192
Available on crate features usb and objc2 only.
impl Encode for IOUSBInterfaceStruct192
usb and objc2 only.Source§impl PartialEq for IOUSBInterfaceStruct192
Available on crate feature usb only.
impl PartialEq for IOUSBInterfaceStruct192
usb only.Source§impl RefEncode for IOUSBInterfaceStruct192
Available on crate features usb and objc2 only.
impl RefEncode for IOUSBInterfaceStruct192
usb and objc2 only.Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
impl Copy for IOUSBInterfaceStruct192
usb only.impl StructuralPartialEq for IOUSBInterfaceStruct192
usb only.