mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user