Subversion Repositories freemyipod

Rev

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

Rev 88 Rev 387
Line 25... Line 25...
25
#include "s5l8701.h"
25
#include "s5l8701.h"
26
 
26
 
27
 
27
 
28
void clockgate_enable(int gate, bool enable)
28
void clockgate_enable(int gate, bool enable)
29
{
29
{
-
 
30
    uint32_t mode = enter_critical_section();
30
    if (enable) PWRCON(gate >> 5) &= ~(1 << (gate & 0x1f));
31
    if (enable) PWRCON(gate >> 5) &= ~(1 << (gate & 0x1f));
31
    else PWRCON(gate >> 5) |= 1 << (gate & 0x1f);
32
    else PWRCON(gate >> 5) |= 1 << (gate & 0x1f);
-
 
33
    leave_critical_section(mode);
32
}
34
}