mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 13:29:01 +00:00
machine/stm32f103xx: enable clock on configure of GPIO pin
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
@@ -37,6 +37,7 @@ const (
|
|||||||
// stm32f1xx uses different technique for setting the GPIO pins than the stm32f407
|
// stm32f1xx uses different technique for setting the GPIO pins than the stm32f407
|
||||||
func (p Pin) Configure(config PinConfig) {
|
func (p Pin) Configure(config PinConfig) {
|
||||||
// Configure the GPIO pin.
|
// Configure the GPIO pin.
|
||||||
|
p.enableClock()
|
||||||
port := p.getPort()
|
port := p.getPort()
|
||||||
pin := uint8(p) % 16
|
pin := uint8(p) % 16
|
||||||
pos := (pin % 8) * 4
|
pos := (pin % 8) * 4
|
||||||
|
|||||||
Reference in New Issue
Block a user