cancel
Showing results for 
Search instead for 
Did you mean: 

Deinit one pin - is it possible?

Marek Nowak_2
Associate
Posted on July 04, 2018 at 20:38

Hello, I have one question: Is it possible to deinit one pin instead of whole port? I have STM8S00F3 and ST Visual Develop.

2 REPLIES 2
henry.dick
Senior II
Posted on July 05, 2018 at 01:44

'

Is it possible to deinit one pin instead of whole port?'

the answer depends on your or your toolchain's definition of 'deinit'.

Vyacheslav Azarov
Associate III
Posted on July 05, 2018 at 10:34

Yes. It is very simple by using HAL driver. See example how to do it. .../STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/GPIO/GPIO_Toggle/main.c   I'll add. To deinitialize a single port pin, use the function with  GPIO_Init(...) with mode GPIO_MODE_IN_FL_NO_IT. It is equivalent to deinit. I wish you success.