github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/machine_stm32_tim_moder.go (about)

     1  //go:build stm32 && !stm32f1
     2  
     3  package machine
     4  
     5  // Configuration of a GPIO pin for PWM output for STM32 MCUs with MODER
     6  // register (most MCUs except STM32F1 series).
     7  
     8  func (t *TIM) configurePin(channel uint8, pf PinFunction) {
     9  	pf.Pin.ConfigureAltFunc(PinConfig{Mode: PinModePWMOutput}, pf.AltFunc)
    10  }