forked from len0rd/rockbox
add usb_allowed_current() function, so powermanagement code can know when it's allowed to charge from usb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17688 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ea840e2036
commit
27ad822a44
2 changed files with 18 additions and 0 deletions
|
|
@ -726,3 +726,16 @@ int usb_core_ack_control(struct usb_ctrlrequest* req)
|
|||
return usb_drv_send(EP_CONTROL, NULL, 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_USB_POWER
|
||||
unsigned short usb_allowed_current()
|
||||
{
|
||||
if (usb_state == CONFIGURED)
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue