Subversion Repositories freemyipod

Rev

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

Rev 282 Rev 387
Line 130... Line 130...
130
    INTPND = INTPND;
130
    INTPND = INTPND;
131
}
131
}
132
 
132
 
133
void interrupt_enable(int irq, bool state)
133
void interrupt_enable(int irq, bool state)
134
{
134
{
-
 
135
    uint32_t mode = enter_critical_section();
135
    if (state) INTMSK |= 1 << irq;
136
    if (state) INTMSK |= 1 << irq;
136
    else INTMSK &= ~(1 << irq);
137
    else INTMSK &= ~(1 << irq);
-
 
138
    leave_critical_section(mode);
137
}
139
}
138
 
140
 
139
void interrupt_set_handler(int irq, void* handler)
141
void interrupt_set_handler(int irq, void* handler)
140
{
142
{
141
    if (handler) irqvector[irq] = handler;
143
    if (handler) irqvector[irq] = handler;