diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-12-17 14:57:44 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-12-17 14:57:44 +0000 |
commit | 0bb20d36f4f1c8457416167b399d976d26660611 (patch) | |
tree | 9c7419af17e2c81944eaeb7aa230681c0936c707 /ports | |
parent | 430010715e7a9af17185412273165674f3b58f20 (diff) | |
download | ChibiOS-0bb20d36f4f1c8457416167b399d976d26660611.tar.gz ChibiOS-0bb20d36f4f1c8457416167b399d976d26660611.tar.bz2 ChibiOS-0bb20d36f4f1c8457416167b399d976d26660611.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@142 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARM7-LPC214x/GCC/lpc214x_serial.c | 33 |
1 files changed, 8 insertions, 25 deletions
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
|