Apply same STM32 patch to STM32 L4

This commit is contained in:
Sebastien Lorquet 2016-06-17 07:32:33 -06:00 committed by Gregory Nutt
parent dbd70a5864
commit dd8d212c26

View File

@ -176,6 +176,7 @@ int stm32l4_configgpio(uint32_t cfgset)
break;
case GPIO_OUTPUT: /* General purpose output mode */
stm32l4_gpiowrite(cfgset, (cfgset & GPIO_OUTPUT_SET) != 0); /* Set the initial output value */
pinmode = GPIO_MODER_OUTPUT;
break;
@ -305,14 +306,6 @@ int stm32l4_configgpio(uint32_t cfgset)
putreg32(regval, base + STM32L4_GPIO_OTYPER_OFFSET);
/* If it is an output... set the pin to the correct initial state. */
if (pinmode == GPIO_MODER_OUTPUT)
{
bool value = ((cfgset & GPIO_OUTPUT_SET) != 0);
stm32l4_gpiowrite(cfgset, value);
}
/* Otherwise, it is an input pin. Should it configured as an EXTI interrupt? */
else if ((cfgset & GPIO_EXTI) != 0)