From 5d366235ac0b75eecfe6107a5375829534b0e3f1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 1 Jan 2012 15:57:03 +0000 Subject: [PATCH] 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 --- arch/arm/src/lpc17xx/lpc17_gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_gpio.c b/arch/arm/src/lpc17xx/lpc17_gpio.c index 9dd594c31e..4cc73a3fc6 100755 --- a/arch/arm/src/lpc17xx/lpc17_gpio.c +++ b/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