IOUSBHostControllerInterfaceCommandHandler

Type Alias IOUSBHostControllerInterfaceCommandHandler 

Source
pub type IOUSBHostControllerInterfaceCommandHandler = *mut DynBlock<dyn Fn(NonNull<IOUSBHostControllerInterface>, IOUSBHostCIMessage)>;
Available on crate features IOUSBHostControllerInterface and IOUSBHostControllerInterfaceDefinitions and block2 only.
Expand description

Client-supplied block to handle IOUSBHostCIMessage structures representing controller, port, device, or endpoint commands

The kernel driver controls the state of the client’s USB services via commands that target the controller, port, device, or endpoint. The command response must be received by the kernel driver before a new command will be sent.

Commands with a type targeting the controller (IOUSBHostCIMessageTypeController*) should be processed by the IOUSBHostCIControllerStateMachine available via the IOUSBHostControllerInterface’s controllerStateMachine property.

Commands with a type targeting the root ports (IOUSBHostCIMessageTypePort*) should be processed by the IOUSBHostCIPortStateMachines available via the getPortStateMachineForCommand interface.

Commands with a type targeting a device (IOUSBHostCIMessageTypeDevice*) should be processed by a client-created IOUSBHostCIDeviceStateMachine.

Commands with a type targeting an endpoint (IOUSBHostCIMessageTypeEndpoint*) should be processed by a client-created IOUSBHostCIEndpointStateMachine.

See also Apple’s documentation