[riot-notifications] [RIOT-OS/RIOT] cpu/stm32/gpio: do not change pin state when switching to output (#8557)

Wojciech NiziƄski notifications at github.com
Wed May 22 14:16:06 CEST 2019

niziak commented on this pull request.

> @@ -87,6 +87,8 @@ int gpio_init(gpio_t pin, gpio_mode_t mode)
     periph_clk_en(AHB1, (RCC_AHB1ENR_GPIOAEN << _port_num(pin)));
+    /* do not touch actual line state */
+    _port(pin)->ODR = _port(pin)->IDR;

> I'm really not sure about it but shouldn't the initial state be dependent on the `mode`? In that case you would only set `ODR=IDR` for the open drain case.

I think you are right. I'll prepare change.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190522/ece5ee27/attachment.html>

More information about the notifications mailing list