From 046efdd93a343fbf3070e597e1d35e03300821be Mon Sep 17 00:00:00 2001 From: Ron Evans Date: Sat, 21 Mar 2020 11:01:58 +0100 Subject: [PATCH] machine/stm32f103xx: enable clock on configure of GPIO pin Signed-off-by: Ron Evans --- src/machine/machine_stm32f103xx.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/machine/machine_stm32f103xx.go b/src/machine/machine_stm32f103xx.go index 332900da..27b65009 100644 --- a/src/machine/machine_stm32f103xx.go +++ b/src/machine/machine_stm32f103xx.go @@ -37,6 +37,7 @@ const ( // stm32f1xx uses different technique for setting the GPIO pins than the stm32f407 func (p Pin) Configure(config PinConfig) { // Configure the GPIO pin. + p.enableClock() port := p.getPort() pin := uint8(p) % 16 pos := (pin % 8) * 4