summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc17xx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-23 12:16:38 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-23 12:16:38 +0000
commitfe55a3d3121630eda2b910bac6b051a38e3b5f60 (patch)
tree1401f1cec633f386d1e74abd117e53556017babb /nuttx/arch/arm/src/lpc17xx
parentdf827b7a96c8c5b2c62912bbfe2f2dc27b673ee0 (diff)
downloadpx4-nuttx-fe55a3d3121630eda2b910bac6b051a38e3b5f60.tar.gz
px4-nuttx-fe55a3d3121630eda2b910bac6b051a38e3b5f60.tar.bz2
px4-nuttx-fe55a3d3121630eda2b910bac6b051a38e3b5f60.zip
Fix lpc17xx GPIO interrupt handling errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3411 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx')
-rwxr-xr-xnuttx/arch/arm/src/lpc17xx/lpc17_gpio.c4
-rwxr-xr-xnuttx/arch/arm/src/lpc17xx/lpc17_gpioint.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
index 0b526bd20..aa658d3e8 100755
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_gpio.c
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -280,7 +280,7 @@ static int lpc17_pullup(uint16_t cfgset, unsigned int port, unsigned int pin)
#ifdef CONFIG_GPIO_IRQ
static int lpc17_setintedge(unsigned int port, unsigned int pin, unsigned int value)
{
- const uint64_t *intedge;
+ uint64_t *intedge;
unsigned int shift;
/* Which word to we use? */
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpioint.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpioint.c
index 679a44c7b..5b7672d91 100755
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpioint.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpioint.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_gpioint.c
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -103,7 +103,7 @@ static unsigned int lpc17_getintedge(unsigned int port, unsigned int pin)
/* Return the value for the PINSEL */
- return (unsigned int)((*intedge & (3 << (pin << 1))) >> shift);
+ return (unsigned int)(((*intedge) >> (pin << 1)) & 3);
}
/****************************************************************************