[][src]Function stm32f3xx_hal_v2::pwm::tim8

pub fn tim8(
    tim: TIM8,
    res: u16,
    freq: Hertz,
    clocks: &Clocks
) -> (PwmChannel<TIM8_CH1, NoPins>, PwmChannel<TIM8_CH2, NoPins>, PwmChannel<TIM8_CH3, NoPins>, PwmChannel<TIM8_CH4, NoPins>)

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.