usb_gadget_vbus_draw
Prev | Core Objects and Methods | Next

## Name

usb_gadget_vbus_draw — constrain controller's VBUS power usage

## Synopsis

`int usb_gadget_vbus_draw (` | struct usb_gadget * | gadget,
| unsigned | mA`)`;

## Arguments

`gadget`

  The device whose VBUS usage is being described

`mA`

  How much current to draw, in milliAmperes. This should be twice the value listed in the configuration descriptor bMaxPower field.

## Description

This call is used by gadget drivers during SET_CONFIGURATION calls, reporting how much power the device may consume. For example, this could affect how quickly batteries are recharged.

Returns zero on success, else negative errno.

Prev | Up | Next
usb_gadget_vbus_connect | Home | usb_gadget_vbus_disconnect