From 0bb20d36f4f1c8457416167b399d976d26660611 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 17 Dec 2007 14:57:44 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@142 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARM7-LPC214x/GCC/lpc214x_serial.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) (limited to 'ports') diff --git a/ports/ARM7-LPC214x/GCC/lpc214x_serial.c b/ports/ARM7-LPC214x/GCC/lpc214x_serial.c index cfd4f696e..43adab3b5 100644 --- a/ports/ARM7-LPC214x/GCC/lpc214x_serial.c +++ b/ports/ARM7-LPC214x/GCC/lpc214x_serial.c @@ -55,7 +55,6 @@ static void ServeInterrupt(UART *u, FullDuplexDriver *com) { switch (u->UART_IIR & IIR_SRC_MASK) { case IIR_SRC_NONE: - VICVectAddr = 0; return; case IIR_SRC_ERROR: SetError(u->UART_LSR, com); @@ -98,37 +97,21 @@ static void ServeInterrupt(UART *u, FullDuplexDriver *com) { __attribute__((naked, weak)) void UART0IrqHandler(void) { - asm(".code 32 \n\t" \ - "stmfd sp!, {r0-r3, r12, lr} \n\t"); -#ifdef THUMB - asm("add r0, pc, #1 \n\t" \ - "bx r0 \n\t" \ - ".code 16 \n\t"); - ServeInterrupt(U0Base, &COM1); - asm("ldr r0, =IrqCommon \n\t" \ - "bx r0 \n\t"); -#else + chSysIRQEnterI(); + ServeInterrupt(U0Base, &COM1); - asm("b IrqCommon \n\t"); -#endif + + chSysIRQExitI(); } __attribute__((naked, weak)) void UART1IrqHandler(void) { - asm(".code 32 \n\t" \ - "stmfd sp!, {r0-r3, r12, lr} \n\t"); -#ifdef THUMB - asm("add r0, pc, #1 \n\t" \ - "bx r0 \n\t" \ - ".code 16 \n\t"); - ServeInterrupt(U1Base, &COM2); - asm("ldr r0, =IrqCommon \n\t" \ - "bx r0 \n\t"); -#else + chSysIRQEnterI(); + ServeInterrupt(U1Base, &COM2); - asm("b IrqCommon \n\t"); -#endif + + chSysIRQExitI(); } #ifdef FIFO_PRELOAD -- cgit v1.2.3