enqueueIORequest(with:frameList:frameListCount:firstFrameNumber:completionHandler:)
Enqueues a request on an isochronous endpoint.
Declaration
func enqueueIORequest(with data: NSMutableData, frameList: UnsafeMutablePointer<IOUSBHostIsochronousFrame>, frameListCount: Int, firstFrameNumber: UInt64, completionHandler: (@Sendable (IOReturn, UnsafeMutablePointer<IOUSBHostIsochronousFrame>) -> Void)? = nil) throwsfunc enqueueIORequest(with data: NSMutableData, frameList: UnsafeMutablePointer<IOUSBHostIsochronousFrame>, frameListCount: Int, firstFrameNumber: UInt64) async throws -> (IOReturn, UnsafeMutablePointer<IOUSBHostIsochronousFrame>)Parameters
- data:
An Nsmutabledata object defining the memory to use for the transfer.
- frameList:
A pointer to the first element in an Iousbhostisochronousframe array. The array must contain at least
frameListCountelements. - frameListCount:
The number of elements in
frameList. - firstFrameNumber:
The frame number the request should begin on. Query the current frame number with Framenumberwithtime:. If
0, the transfer starts on the next available frame (XHCI only). - completionHandler:
An Iousbhostisochronouscompletionhandler that runs when the request completes, or times out if the call returns successfully. The
completionHandlerdoesn’t run if the method returns with an error.
Discussion
This method issues asynchronous isochronous requests. The caller allocates and initializes an array of IOUSBHostIsochronousFrame structures to describe the transferred frames.