支持usb3.0的电脑,SDP的最大充电电流如何修改。
具体路径kernel/drivers/usb/gadget/Composite.c里面的函数
You can check if the computer PC have SS flag or not to see if it support to USB 3.0--900mA. static int set_config(struct usb_composite_dev *cdev, const struct usb_ctrlrequest *ctrl, unsigned number) { ...... /* when we return, be sure our power usage is valid */ power = c->MaxPower ? c->MaxPower : CONFIG_USB_GADGET_VBUS_DRAW; done: usb_gadget_vbus_draw(gadget, power); if (result >= 0 && cdev->delayed_status) result = USB_GADGET_DELAYED_STATUS; return result; } you can change power to 900ma. but the actual current need host SDP support. |
---|
版权声明:本文为u012296694原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。