1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/msp430-common/irq.c
Kévin Roussel 6428daf9c7 Removed all references to a specific MCU in "generic" files
Inclusion of generic <msp430.h> file is done in cpu.h
2013-12-18 10:49:23 +01:00

37 lines
463 B
C

#include "irq.h"
#include "cpu.h"
unsigned int disableIRQ()
{
unsigned int state;
__asm__("mov.w r2,%0" : "=r"(state));
state &= GIE;
if (state) {
dINT();
}
return state;
}
unsigned int enableIRQ()
{
unsigned int state;
__asm__("mov.w r2,%0" : "=r"(state));
state &= GIE;
if (!state) {
eINT();
}
return state;
}
void restoreIRQ(unsigned int state)
{
if (state) {
eINT();
}
}