Package: android.hardware.usb.gadget@1.0

IUsbGadget

interface IUsbGadget

Methods

setCurrentUsbFunctions

oneway setCurrentUsbFunctions (bitfield<GadgetFunction> functions, IUsbGadgetCallback callback, uint64_t timeout)

This function is used to set the current USB gadget configuration.Usb gadget needs to teared down if an USB configuration is already active.

Details
RPC mode
oneway
Parameters
functions
list of functions defined by GadgetFunction to be included in the gadget composition.
callback
IUsbGadgetCallback::setCurrentUsbFunctionsCb used to propagate back the status.
timeout
The maximum time(in milliseconds)within which the IUsbGadgetCallback needs to be returned.

getCurrentUsbFunctions

oneway getCurrentUsbFunctions (IUsbGadgetCallback callback)

This function is used to query the USB functions included in the current USB configuration.

Details
RPC mode
oneway
Parameters
callback
IUsbGadgetCallback::getCurrentUsbFunctionsCb used to propagate the current functions list.