comparison gsm-fw/gpf/osl/os_isr.c @ 347:c9dfa0e20640

OSL reconstruction: os_isr.c: interrupt control functions done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 07 May 2014 20:18:11 +0000
parents fdeea3d6582d
children e63ab4a97e24
comparison
equal deleted inserted replaced
346:fdeea3d6582d 347:c9dfa0e20640
22 22
23 for (i = 1; i <= MaxOSISRs; i++) 23 for (i = 1; i <= MaxOSISRs; i++)
24 OSISRTable[i].name[0] = 0; 24 OSISRTable[i].name[0] = 0;
25 return(OS_OK); 25 return(OS_OK);
26 } 26 }
27
28 GLOBAL LONG
29 os_SetInterruptState(OS_INT_STATE new_state, OS_INT_STATE *old_state)
30 {
31 INT state;
32
33 if (new_state)
34 state = NU_ENABLE_INTERRUPTS;
35 else
36 state = NU_DISABLE_INTERRUPTS;
37 state = NU_Control_Interrupts(state);
38 if (state & 0xFF)
39 *old_state = 0;
40 else
41 *old_state = 1;
42 return(OS_OK);
43 }
44
45 GLOBAL LONG
46 os_EnableInterrupts(OS_INT_STATE *old_state)
47 {
48 INT state;
49
50 state = NU_Control_Interrupts(NU_ENABLE_INTERRUPTS);
51 if (state & 0xFF)
52 *old_state = 0;
53 else
54 *old_state = 1;
55 return(OS_OK);
56 }
57
58 GLOBAL LONG
59 os_DisableInterrupts(OS_INT_STATE *old_state)
60 {
61 INT state;
62
63 state = NU_Control_Interrupts(NU_DISABLE_INTERRUPTS);
64 if (state & 0xFF)
65 *old_state = 0;
66 else
67 *old_state = 1;
68 return(OS_OK);
69 }