Subversion Repositories freemyipod

Rev

Rev 54 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 54 Rev 221
Line 48... Line 48...
48
 
48
 
49
void power_init(void)
49
void power_init(void)
50
{
50
{
51
    pmu_init();
51
    pmu_init();
52
    pmu_write(0x1e, 15);  /* Vcore = 1.000V */
52
    pmu_write(0x1e, 15);  /* Vcore = 1.000V */
53
}
-
 
-
 
53
}                          
54
 
54
 
55
bool charging_state(void)
55
bool charging_state(void)
56
{
56
{
57
    return (PDAT11 & 0x10) ? false : true;
57
    return (PDAT11 & 0x10) ? false : true;
58
}
58
}
-
 
59
 
-
 
60
bool external_power_state(void)
-
 
61
{
-
 
62
    return (PDAT14 & 8) ? false : true;
-
 
63
}
-
 
64
 
-
 
65
bool vbus_state(void)
-
 
66
{
-
 
67
    return (PDAT14 & 8) ? false : true;
-
 
68
}