diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-01 15:57:03 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-01 15:57:03 +0000 |
commit | 57f580ed6a97361104785bc4a3fccdc4c64f7d2c (patch) | |
tree | 0921622cbfdcb5d46fb3e7fcdd6169decdf9c13b /nuttx/arch | |
parent | 03db221a3d9a6678cd8fef66ca6a35b988503b57 (diff) | |
download | px4-nuttx-57f580ed6a97361104785bc4a3fccdc4c64f7d2c.tar.gz px4-nuttx-57f580ed6a97361104785bc4a3fccdc4c64f7d2c.tar.bz2 px4-nuttx-57f580ed6a97361104785bc4a3fccdc4c64f7d2c.zip |
Fix an integer overflow bug in LPC17xx GPIO interrupt configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4247 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c index 9dd594c31..4cc73a3fc 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c @@ -301,9 +301,9 @@ static void lpc17_setintedge(unsigned int port, unsigned int pin, /* Set the requested value in the PINSEL register */ - shift = pin << 1; - *intedge &= ~(3 << shift); - *intedge |= (value << shift); + shift = pin << 1; + *intedge &= ~((uint64_t)3 << shift); + *intedge |= ((uint64_t)value << shift); } #endif |