mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 02:33:34 +08:00
STM32 GPIO fix; Fixes for PIC32 USB term example
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4241 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -563,9 +563,17 @@ int stm32_configgpio(uint32_t cfgset)
|
||||
|
||||
putreg32(regval, base + STM32_GPIO_OTYPER_OFFSET);
|
||||
|
||||
/* If it is an input pin, hould it configured as an EXTI interrupt? */
|
||||
/* If it is an output... set the pin to the correct initial state. */
|
||||
|
||||
if ((cfgset & GPIO_EXTI) != 0)
|
||||
if (pinmode == GPIO_MODER_OUTPUT)
|
||||
{
|
||||
bool value = ((cfgset & GPIO_OUTPUT_SET) != 0);
|
||||
stm32_gpiowrite(cfgset, value);
|
||||
}
|
||||
|
||||
/* Otherwise, it is an input pin. Should it configured as an EXTI interrupt? */
|
||||
|
||||
else if ((cfgset & GPIO_EXTI) != 0)
|
||||
{
|
||||
/* "In STM32 F1 the selection of the EXTI line source is performed through
|
||||
* the EXTIx bits in the AFIO_EXTICRx registers, while in F2 series this
|
||||
@@ -590,14 +598,6 @@ int stm32_configgpio(uint32_t cfgset)
|
||||
|
||||
putreg32(regval, regaddr);
|
||||
}
|
||||
|
||||
/* If it is an output... set the pin to the correct initial state. */
|
||||
|
||||
else if (pinmode == GPIO_MODER_OUTPUT)
|
||||
{
|
||||
bool value = ((cfgset & GPIO_OUTPUT_SET) != 0);
|
||||
stm32_gpiowrite(cfgset, value);
|
||||
}
|
||||
|
||||
irqrestore(flags);
|
||||
return OK;
|
||||
|
||||
@@ -78,9 +78,6 @@
|
||||
* Configure the FPU. The the MCU has an FPU, then enable full access
|
||||
* to coprocessors CP10 and CP11.
|
||||
*
|
||||
* This is implemented as a macro because the stack has not yet been
|
||||
* initialized.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_FPU
|
||||
|
||||
Reference in New Issue
Block a user