forked from len0rd/rockbox
Detect USB charge state in Hxx0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8462 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3325d99154
commit
005c2f8026
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include "logf.h"
|
||||
#include "pcf50605.h"
|
||||
#include "pcf50606.h"
|
||||
#include "usb.h"
|
||||
|
||||
#ifdef HAVE_CHARGE_CTRL
|
||||
bool charger_enabled;
|
||||
|
|
@ -108,7 +109,7 @@ void power_init(void)
|
|||
bool charger_inserted(void)
|
||||
{
|
||||
#if CONFIG_CPU == MCF5249
|
||||
return (GPIO1_READ & 0x00400000)?true:false;
|
||||
return (GPIO1_READ & 0x00400000) || usb_powered();
|
||||
#elif defined(GMINI_ARCH)
|
||||
return (P7 & 0x80) == 0;
|
||||
#elif defined(HAVE_CHARGE_CTRL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue