machine/stm32f103xx: enable clock on configure of GPIO pin

Signed-off-by: Ron Evans <ron@hybridgroup.com>
Этот коммит содержится в:
Ron Evans 2020-03-21 11:01:58 +01:00 коммит произвёл Ayke
родитель 9d3de55229
коммит 046efdd93a

Просмотреть файл

@ -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