set(period:pulse:)

Sets the period and pulse width of PWM output signal.

PWMOut.swift:195
func set(period: Int, pulse: Int)

Parameters

period

The period of the PWM ouput signal in microsecond.

pulse

The pulse width in the PWM period, that is, the duration of high voltage in microsecond. This time can’t be longer than the period.