stm32f103 (bluepill): add pwm

This commit is contained in:
Kenneth Bell
2021-05-09 17:22:24 -07:00
committed by Ron Evans
parent ac54302301
commit 003c96edc0
6 changed files with 419 additions and 111 deletions
+10
View File
@@ -0,0 +1,10 @@
// +build stm32,!stm32f1
package machine
// Configuration of a GPIO pin for PWM output for STM32 MCUs with MODER
// register (most MCUs except STM32F1 series).
func (t *TIM) configurePin(channel uint8, pf PinFunction) {
pf.Pin.ConfigureAltFunc(PinConfig{Mode: PinModePWMOutput}, pf.AltFunc)
}