diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-06-23 01:56:31 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-06-23 01:56:31 +0000 |
commit | eff92131b7e16a38840e0f0aa5cfca2c5b84a5fc (patch) | |
tree | 6015253062882a788550425c0d83818d0b03d640 /nuttx/arch/arm/src/lpc17xx/lpc17_irq.c | |
parent | e34ab9ce39ced0e659c16b50f2267ffd97814ab9 (diff) | |
download | px4-nuttx-eff92131b7e16a38840e0f0aa5cfca2c5b84a5fc.tar.gz px4-nuttx-eff92131b7e16a38840e0f0aa5cfca2c5b84a5fc.tar.bz2 px4-nuttx-eff92131b7e16a38840e0f0aa5cfca2c5b84a5fc.zip |
Correct IRQ handling, calibrate delay loops
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2759 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_irq.c')
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_irq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_irq.c b/nuttx/arch/arm/src/lpc17xx/lpc17_irq.c index 2c23d6949..886bb7480 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_irq.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_irq.c @@ -212,19 +212,19 @@ static int lpc17_irqinfo(int irq, uint32_t *regaddr, uint32_t *bit) if (irq >= LPC17_IRQ_EXTINT) { - if (irq < LPC17_IRQ_NIRQS) + if (irq < (LPC17_IRQ_EXTINT+32)) { *regaddr = NVIC_IRQ0_31_ENABLE; *bit = 1 << (irq - LPC17_IRQ_EXTINT); } - if (irq < LPC17_IRQ_NIRQS) + else if (irq < LPC17_IRQ_NIRQS) { *regaddr = NVIC_IRQ32_63_ENABLE; *bit = 1 << (irq - LPC17_IRQ_EXTINT - 32); } else { - return ERROR; /* Invalid interrupt */ + return ERROR; /* Invalid irq */ } } |