pub struct IOUSBInterfaceStruct100 {Show 36 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>,
/* 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 all versions of the IOUSBFamily currently shipping.
The functions listed here will work with any version of the IOUSBInterfaceInterface, including the one shipped with Mac OS X version 10.0.
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>Creates a run loop source for delivery of all asynchronous notifications on this device.
The Mac OS X kernel does not spawn a thread to callback to the client. Instead it delivers completion notifications on a Mach port (see {
CreateInterfaceAsyncPort}). This
routine wraps that port with the appropriate routing code so that
the completion notifications can be automatically routed through the client's
CFRunLoop.
@param self Pointer to the IOUSBInterfaceInterface.
@param source Pointer to a CFRunLoopSourceRef to return the newly created run loop event source.
@result Returns kIOReturnSuccess if successful or a kern_return_t if failed.
GetInterfaceAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void) -> *mut CFRunLoopSource>Returns the CFRunLoopSourceRef for this IOService instance.
(description)
Parameter self: Pointer to the IOUSBInterfaceInterface.
Returns: Returns the run loop source if one has been created, 0 otherwise.
CreateInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut mach_port_t) -> IOReturn>Creates and registers a mach_port_t for asynchronous communications.
The Mac OS X kernel does not spawn a thread to callback to the client. Instead it delivers completion notifications on this Mach port. After receiving a message on this port the client is obliged to call the IOKitLib.h: IODispatchCalloutFromMessage() function for decoding the notification message.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if failed.
GetInterfaceAsyncPort: Option<unsafe extern "C-unwind" fn(*mut c_void) -> mach_port_t>Returns the mach_port_t port for this IOService instance.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Returns: Returns the port if one exists, 0 otherwise.
USBInterfaceOpen: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>Opensthe IOUSBInterface for exclusive access.
Before the client can transfer data to and from the interface, it must have succeeded in opening the interface. This establishes an exclusive link between the client’s task and the actual interface device. Opening the interface causes pipes to be created on each endpoint contained in the interface. If the interface contains isochronous endpoints, an attempt is made to allocate bandwidth on the bus for each of those pipes. If there is not enough bandwidth available, an isochronous pipe may be created with a bandwidth of zero. The software must then call SetPipePolicy to change the size of that pipe before it can be used for I/O.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Returns: Returns kIOReturnExclusiveAccess if some other task has the device opened already, kIOReturnError if the connection with the kernel cannot be established or kIOReturnSuccess if successful.
USBInterfaceClose: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>Closes the task’s connection to the IOUSBInterface.
Releases the client’s exclusive access to the IOUSBInterface.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetInterfaceClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the USB Class of the interface (bInterfaceClass).
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter intfClass: Pointer to UInt8 to hold the interface Class.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetInterfaceSubClass: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the USB Subclass of the interface (bInterfaceSubClass).
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter intfSubClass: Pointer to UInt8 to hold the interface Subclass.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetInterfaceProtocol: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the USB Protocol of the interface (bInterfaceProtocol).
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter intfProtocol: Pointer to UInt8 to hold the interface Protocol.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetDeviceVendor: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>Returns the USB Vendor ID (idVendor) of the device of which this interface is a part.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter devVendor: Pointer to UInt16 to hold the vendorID.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetDeviceProduct: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>Returns the USB Product ID (idProduct) of the device of which this interface is a part.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter devProduct: Pointer to UInt16 to hold the ProductID.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetDeviceReleaseNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u16) -> IOReturn>Returns the Device Release Number (bcdDevice) of the device of which this interface is a part.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter devRelNum: Pointer to UInt16 to hold the Release Number.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetConfigurationValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the current configuration value set in the device (the interface will be part of that configuration.)
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter configVal: Pointer to UInt8 to hold the configuration value.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetInterfaceNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the interface number (zero-based index) of this interface within the current configuration of the device.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter intfNumber: Pointer to UInt8 to hold the interface number.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetAlternateSetting: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the alternate setting currently selected in this interface.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter intfAltSetting: Pointer to UInt8 to hold the alternate setting value.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetNumEndpoints: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u8) -> IOReturn>Returns the number of endpoints in this interface.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter intfNumEndpoints: Pointer to UInt8 to hold the number of endpoints.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetLocationID: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>Returns the location ID.
The location ID is a 32 bit number which is unique among all USB devices in the system, and which will not change on a system reboot unless the topology of the bus itself changes. The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter locationID: Pointer to UInt32 to hold the location ID.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
GetDevice: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut io_service_t) -> IOReturn>Returns the device of which this interface is part.
The interface does not have to be open to use this function. The returned device can be used to create a CFPlugin to talk to the device.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter device: Pointer to io_service_t to hold the result.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
SetAlternateInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>Changes the AltInterface setting.
The interface must be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter alternateSetting: The new alternate setting for the interface.
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.
GetBusFrameNumber: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u64, *mut i32) -> IOReturn>Gets the current frame number of the bus to which the interface and its device are attached.
The interface does not have to be open to use this function.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter frame: Pointer to UInt64 to hold the frame number.
Parameter atTime: Pointer to an AbsoluteTime, which should be within 1ms of the time when the bus frame
number was attained.
Returns: Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
ControlRequest: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest) -> IOReturn>Sends a USB request on a 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.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter pipeRef: Index of the control pipe to use. Use zero for the default control pipe on the device.
Parameter req: Pointer to an IOUSBDevRequest containing the request.
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.
ControlRequestAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut IOUSBDevRequest, IOAsyncCallback1, *mut c_void) -> IOReturn>Sends an asynchronous USB request on a control pipe.
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.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter pipeRef: Index of the control pipe to use. Use zero for the default control pipe on the device.
Parameter req: Pointer to an IOUSBDevRequest containing the request.
Parameter callback: An IOAsyncCallback1 method. Upon completion, the arg0 argument of the AsyncCallback1 will contain the number of bytes that were actually transferred. 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, kIOReturnNotOpen if the interface is not open for exclusive access, or kIOUSBNoAsyncPortErr if no Async port has been created for this interface.
GetPipeProperties: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut u8, *mut u8, *mut u8, *mut u16, *mut u8) -> IOReturn>Gets the properties for a pipe.
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 self: Pointer to the IOUSBInterfaceInterface.
Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).
Parameter direction: Pointer to an UInt8 to get the direction of the pipe.
Parameter number: Pointer to an UInt8 to get the pipe number.
Parameter transferType: Pointer to an UInt8 to get the transfer type of the pipe.
Parameter maxPacketSize: Pointer to an UInt16 to get the maxPacketSize of the pipe. This maxPacketSize is the FULL maxPacketSize, which takes into account the multipler for HS Isoc pipes
and the burst and the multiplier for SS Isoc pipes. It could also have been adjusted by SetPipePolicy.
Parameter interval: Pointer to an UInt8 to get the interval for polling the pipe for data (in milliseconds).
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.
GetPipeStatus: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>Gets the current status of a pipe.
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).
Returns: Returns kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access. Otherwise, the status of the pipe is returned. Returns kIOUSBPipeStalled if the pipe is stalled. See
//apple_ref/C/instm/IOUSBInterfaceInterface/ClearPipeStall/ ClearPipeStallor
//apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEndsfor more information.
AbortPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>Aborts any outstanding transactions on the pipe with status 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/ ClearPipeStallor
//apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEndsfor 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).
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.
ResetPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>Equivalent to ClearPipeStall.
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).
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.
ClearPipeStall: Option<unsafe extern "C-unwind" fn(*mut c_void, u8) -> IOReturn>Clears the halted bit and the data toggle bit on the pipe’s endpoint in the controller.
This function also returns any outstanding transactions on the pipe with status kIOUSBTransactionReturned. If there are outstanding asynchronous transactions on the pipe, the callbacks will happen. The data toggle may need to be resynchronized. The driver may handle this by sending a ClearFeature(ENDPOINT_HALT) to the default control pipe, specifying the device’s endpoint for this pipe. See also
//apple_ref/C/instm/IOUSBInterfaceInterface190/ClearPipeStallBothEnds/ ClearPipeStallBothEnds.
Parameter self: Pointer to the IOUSBInterfaceInterface.
Parameter pipeRef: Index for the desired pipe (1 - GetNumEndpoints).
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.
ReadPipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, *mut u32) -> IOReturn>Reads data on a BULK IN or an INTERRUPT pipe.
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 buf: Buffer to hold the data.
Parameter size: On entry: a pointer to the size of the buffer pointed to by buf.
On exit: a pointer to the number of bytes actually read from the device.
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.
WritePipe: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32) -> IOReturn>Writes data on a BULK OUT or INTERRUPT OUT pipe.
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 buf: Buffer to hold the data.
Parameter size: The size of the data buffer.
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.
ReadPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>Performs an asynchronous read on a BULK IN or an INTERRUPT pipe.
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 buf: Buffer to hold the data.
Parameter size: The size of the buffer pointed to by buf.
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, kIOReturnAborted if the thread is interrupted before the call completes, or kIOReturnNotOpen if the interface is not open for exclusive access.
WritePipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u32, IOAsyncCallback1, *mut c_void) -> IOReturn>Performs an asynchronous write on a BULK OUT or INTERRUPT OUT pipe.
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 buf: Buffer to hold the data.
Parameter size: The size of the buffer pointed to by buf.
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.
ReadIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>Performs a read on an ISOCHRONOUS pipe.
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 buf: Buffer to hold the data.
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 frameList: A pointer to an array of IOUSBIsocFrame 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.
WriteIsochPipeAsync: Option<unsafe extern "C-unwind" fn(*mut c_void, u8, *mut c_void, u64, u32, *mut IOUSBIsocFrame, IOAsyncCallback1, *mut c_void) -> IOReturn>Performs an asynchronous write on an ISOCHRONOUS pipe.
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 buf: Buffer to hold the data.
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 frameList: A pointer to an array of IOUSBIsocFrame 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.
Trait Implementations§
Source§impl Clone for IOUSBInterfaceStruct100
Available on crate feature usb only.
impl Clone for IOUSBInterfaceStruct100
usb only.Source§fn clone(&self) -> IOUSBInterfaceStruct100
fn clone(&self) -> IOUSBInterfaceStruct100
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IOUSBInterfaceStruct100
Available on crate feature usb only.
impl Debug for IOUSBInterfaceStruct100
usb only.Source§impl Encode for IOUSBInterfaceStruct100
Available on crate features usb and objc2 only.
impl Encode for IOUSBInterfaceStruct100
usb and objc2 only.Source§impl PartialEq for IOUSBInterfaceStruct100
Available on crate feature usb only.
impl PartialEq for IOUSBInterfaceStruct100
usb only.Source§impl RefEncode for IOUSBInterfaceStruct100
Available on crate features usb and objc2 only.
impl RefEncode for IOUSBInterfaceStruct100
usb and objc2 only.Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
impl Copy for IOUSBInterfaceStruct100
usb only.impl StructuralPartialEq for IOUSBInterfaceStruct100
usb only.