From 04671810935d18a62f5aa6e94bc3913a805100a2 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Sat, 15 Feb 2014 17:28:19 +0100 Subject: [PATCH] replaced tabs with spaces --- cpu/lpc1768/cpu.c | 64 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/cpu/lpc1768/cpu.c b/cpu/lpc1768/cpu.c index fd41453130..f5d6630195 100644 --- a/cpu/lpc1768/cpu.c +++ b/cpu/lpc1768/cpu.c @@ -21,22 +21,22 @@ int inISR(void) { - return (__get_IPSR() & 0xFF); + return (__get_IPSR() & 0xFF); } unsigned int disableIRQ(void) { - // FIXME PRIMASK is the old CPSR (FAULTMASK ??? BASEPRI ???) - //PRIMASK lesen - unsigned int uiPriMask = __get_PRIMASK(); - __disable_irq(); - return uiPriMask; + // FIXME PRIMASK is the old CPSR (FAULTMASK ??? BASEPRI ???) + //PRIMASK lesen + unsigned int uiPriMask = __get_PRIMASK(); + __disable_irq(); + return uiPriMask; } void restoreIRQ(unsigned oldPRIMASK) { - //PRIMASK lesen setzen - __set_PRIMASK(oldPRIMASK); + //PRIMASK lesen setzen + __set_PRIMASK(oldPRIMASK); } @@ -76,36 +76,36 @@ void eINT(void) void save_context(void) { - /* {r0-r3,r12,LR,PC,xPSR} are saved automatically on exception entry */ - asm("push {r4-r11}"); - /* save unsaved registers */ - asm("push {LR}"); - /* save exception return value */ + /* {r0-r3,r12,LR,PC,xPSR} are saved automatically on exception entry */ + asm("push {r4-r11}"); + /* save unsaved registers */ + asm("push {LR}"); + /* save exception return value */ - asm("ldr r1, =active_thread"); - /* load address of currend pdc */ - asm("ldr r1, [r1]"); - /* deref pdc */ - asm("str sp, [r1]"); - /* write sp to pdc->sp means current threads stack pointer */ + asm("ldr r1, =active_thread"); + /* load address of currend pdc */ + asm("ldr r1, [r1]"); + /* deref pdc */ + asm("str sp, [r1]"); + /* write sp to pdc->sp means current threads stack pointer */ } void restore_context(void) { - asm("ldr r0, =active_thread"); - /* load address of currend pdc */ - asm("ldr r0, [r0]"); - /* deref pdc */ - asm("ldr sp, [r0]"); - /* load pdc->sp to sp register */ + asm("ldr r0, =active_thread"); + /* load address of currend pdc */ + asm("ldr r0, [r0]"); + /* deref pdc */ + asm("ldr sp, [r0]"); + /* load pdc->sp to sp register */ - asm("pop {r0}"); - /* restore exception retrun value from stack */ - asm("pop {r4-r11}"); - /* load unloaded register */ -// asm("pop {r4}"); /*foo*/ - asm("bx r0"); /* load exception return value to pc causes end of exception*/ - /* {r0-r3,r12,LR,PC,xPSR} are restored automatically on exception return */ + asm("pop {r0}"); + /* restore exception retrun value from stack */ + asm("pop {r4-r11}"); + /* load unloaded register */ +// asm("pop {r4}"); /*foo*/ + asm("bx r0"); /* load exception return value to pc causes end of exception*/ + /* {r0-r3,r12,LR,PC,xPSR} are restored automatically on exception return */ } #define USR_RESET (0x102)