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:
parent
66ae63c9ec
commit
ae7f970c24
|
@ -2312,13 +2312,15 @@
|
||||||
* configs/olimex-lpc1766stk/src/up_leds.c: Add new interfaces so that is
|
* configs/olimex-lpc1766stk/src/up_leds.c: Add new interfaces so that is
|
||||||
CONFIG_ARCH_LEDS are not set, the LEDs may be controlled from application
|
CONFIG_ARCH_LEDS are not set, the LEDs may be controlled from application
|
||||||
logic.
|
logic.
|
||||||
*configs/olimex-lpc1766stk/src/up_buttons.c: Add support form the buttons
|
* configs/olimex-lpc1766stk/src/up_buttons.c: Add support form the buttons
|
||||||
on the Olimex LPC1766-STK board.
|
on the Olimex LPC1766-STK board.
|
||||||
* Makefile: Added 'apps_clean' and 'apps_distclean' target to simplify
|
* Makefile: Added 'apps_clean' and 'apps_distclean' target to simplify
|
||||||
managing the state of the application directory while in the NuttX directory
|
managing the state of the application directory while in the NuttX directory
|
||||||
* Documentation/NuttXGettingStarted.html: Added a "Getting Started" Guide
|
* Documentation/NuttXGettingStarted.html: Added a "Getting Started" Guide
|
||||||
for NuttX. At present, this is just a stub and it refers to the NuttX
|
for NuttX. At present, this is just a stub and it refers to the NuttX
|
||||||
top-level README.txt file which is the only, real "Getting Started" Guide
|
top-level README.txt file which is the only, real "Getting Started" Guide
|
||||||
that exists for the time being.
|
that exists at the time being.
|
||||||
* arch/arm/src/lpc17xx/lpc17_gpioint.c: Correct an value used as the lower
|
* arch/arm/src/lpc17xx/lpc17_gpioint.c: Correct an value used as the lower
|
||||||
end of an IRQ number range test.
|
end of an IRQ number range test.
|
||||||
|
* arch/arm/src/lpc17xx/lpc17_gpio.c: Fix a integer flow problem in shift.
|
||||||
|
This error would prevent pins > 15 from being used as interrupt sources.
|
||||||
|
|
|
@ -301,9 +301,9 @@ static void lpc17_setintedge(unsigned int port, unsigned int pin,
|
||||||
|
|
||||||
/* Set the requested value in the PINSEL register */
|
/* Set the requested value in the PINSEL register */
|
||||||
|
|
||||||
shift = pin << 1;
|
shift = pin << 1;
|
||||||
*intedge &= ~(3 << shift);
|
*intedge &= ~((uint64_t)3 << shift);
|
||||||
*intedge |= (value << shift);
|
*intedge |= ((uint64_t)value << shift);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,7 @@ static bool g_uninitialized = true;
|
||||||
void up_ledinit(void)
|
void up_ledinit(void)
|
||||||
{
|
{
|
||||||
/* Configure all LED GPIO lines */
|
/* Configure all LED GPIO lines */
|
||||||
|
|
||||||
led_dumpgpio("up_ledinit() Entry)");
|
led_dumpgpio("up_ledinit() Entry)");
|
||||||
|
|
||||||
lpc17_configgpio(LPC1766STK_LED1);
|
lpc17_configgpio(LPC1766STK_LED1);
|
||||||
|
|
Loading…
Reference in New Issue