summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh/src/sh1/sh1_serial.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-07 16:59:36 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-07 16:59:36 +0000
commit2c9001b17ff62f61be1677ebd789f081324fe326 (patch)
tree9d7a5cc564361a837742534250d3527a06d62081 /nuttx/arch/sh/src/sh1/sh1_serial.c
parenta113aa53d96d039d28e3e54ba79b2aae6a524ca5 (diff)
downloadpx4-nuttx-2c9001b17ff62f61be1677ebd789f081324fe326.tar.gz
px4-nuttx-2c9001b17ff62f61be1677ebd789f081324fe326.tar.bz2
px4-nuttx-2c9001b17ff62f61be1677ebd789f081324fe326.zip
reconcile architectures w/o interrupt controllers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1153 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src/sh1/sh1_serial.c')
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_serial.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/nuttx/arch/sh/src/sh1/sh1_serial.c b/nuttx/arch/sh/src/sh1/sh1_serial.c
index cfdfbe349..7578132b2 100644
--- a/nuttx/arch/sh/src/sh1/sh1_serial.c
+++ b/nuttx/arch/sh/src/sh1/sh1_serial.c
@@ -425,24 +425,16 @@ static int up_attach(struct uart_dev_s *dev)
/* Attach the RDR full IRQ */
- ret = irq_attach(priv->irq + , up_interrupt);
+ ret = irq_attach(priv->irq + SH1_RXI_IRQ_OFFSET, up_interrupt);
if (ret == OK)
{
- /* Enable the interrupt
- */
+ /* Attach the TDR empty IRQ */
- up_enable_irq(priv->irq);
- }
-
- /* Enable the RDR full and TDR empty interrupts at the interupt controller
- * (RX and TX interrupts are still disabled in the SCI)
- */
-
- if (ret == OK)
- {
-
- up_enable_irq(priv->irq);
- up_enable_irq(priv->irq);
+ ret = irq_attach(priv->irq + SH1_TXI_IRQ_OFFSET, up_interrupt);
+ if (ret < 0)
+ {
+ (void)irq_detach(priv->irq + SH1_RXI_IRQ_OFFSET);
+ }
}
return ret;