mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 13:51:36 +08:00
Fix an integer overflow bug in LPC17xx GPIO interrupt configuration
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4247 7fd9a85b-ad96-42d3-883c-3090e2eb8679
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