AnsweredAssumed Answered

Change GPIO direction dynamically

Question asked by dumas.jerome on Jul 10, 2014
Latest reply on Jul 14, 2014 by schreiter.egmont
Hi All
I'm using an STM32L151 in my project.
I have one GPIO configured as an input, and I need to change the direction dynamically. What is the most efficient way to do this ?

Each time I want to change direction, should I:
Call GPIO_Deinit()
Re-populate the structure GPIO_InitStructure according to the new direction
Call GPIO_Init()

Is there a most efficient way to do ?
Thanks
Jerome

Outcomes