Function stm32f3xx_hal::pwm::tim1

source ·
pub fn tim1(
    tim: TIM1,
    res: u16,
    freq: Hertz,
    clocks: &Clocks
) -> (PwmChannel<Tim1Ch1, NoPins>, PwmChannel<Tim1Ch2, NoPins>, PwmChannel<Tim1Ch3, NoPins>, PwmChannel<Tim1Ch4, NoPins>)
👎Deprecated since 0.10.0: needs refactoring and might violate safety rules conflicting with the timer API
Expand description

Create one or more output channels from a TIM Peripheral This function requires the maximum resolution of the duty cycle, the period of the PWM signal and the frozen clock configuration.

The resolution should be chosen to offer sufficient steps against your target peripheral. For example, a servo that can turn from 0 degrees (2% duty cycle) to 180 degrees (4% duty cycle) might choose a resolution of 9000. This allows the servo to be set in increments of exactly one degree.