FreeCalypso > hg > freecalypso-citrine
comparison bsp/irq_twiddle.S @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 /* | |
2 * TI's L1 code (and possibly other parts of the software suite) calls | |
3 * functions named INT_DisableIRQ() and INT_EnableIRQ(); in the Leonardo | |
4 * fw they are implemented (in a very ugly manner, as usual) in the | |
5 * int.s entry point assembly module. Here we implement the same | |
6 * functions in a cleaner way. | |
7 */ | |
8 | |
9 #include "../nucleus/asm_defs.h" | |
10 | |
11 .code 32 | |
12 .text | |
13 | |
14 .globl INT_DisableIRQ | |
15 INT_DisableIRQ: | |
16 mrs r0, CPSR | |
17 orr r0, r0, #LOCKOUT | |
18 msr CPSR, r0 | |
19 bx lr | |
20 | |
21 .globl INT_EnableIRQ | |
22 INT_EnableIRQ: | |
23 mrs r0, CPSR | |
24 bic r0, r0, #LOCKOUT | |
25 msr CPSR, r0 | |
26 bx lr |