code/WPILib/DigitalOutput.cpp
/**
 * Enable a PWM Output on this line.
 * 
 * Allocate one of the 4 DO PWM generator resources from this module.
 * 
 * Supply the initial duty-cycle to output so as to avoid a glitch when first starting.
 * 
 * The resolution of the duty cycle is 8-bit for low frequencies (1kHz or less)
 * but is reduced the higher the frequency of the PWM signal is.
 * 
 * @param initialDutyCycle The duty-cycle to start generating. [0..1]
 */
Enable a PWM Output on this line.

Allocate one of the 4 DO PWM generator resources from this module.

Supply the initial duty-cycle to output so as to avoid a glitch when first starting.

The resolution of the duty cycle is 8-bit for low frequencies (1kHz or less)
but is reduced the higher the frequency of the PWM signal is.

@param initialDutyCycle The duty-cycle to start generating.
Enable a PWM Output on this line . Allocate one of the 4 DO PWM generator resources from this module . Supply the initial duty - cycle to output so as to avoid a glitch when first starting . The resolution of the duty cycle is 8 - bit for low frequencies ( 1kHz or less ) but is reduced the higher the frequency of the PWM signal is . @param initialDutyCycle The duty - cycle to start generating .
void DigitalOutput::EnablePWM(float initialDutyCycle)
{
	if (m_pwmGenerator != ~0ul) return;
	m_pwmGenerator = m_module->AllocateDO_PWM();
	m_module->SetDO_PWMDutyCycle(m_pwmGenerator, initialDutyCycle);
	m_module->SetDO_PWMOutputChannel(m_pwmGenerator, m_channel);
}
void DigitalOutput :: EnablePWM ( float initialDutyCycle ) { if ( m_pwmGenerator != ~ 0ul ) return ; m_pwmGenerator = m_module -> AllocateDO_PWM ( ) ; m_module -> SetDO_PWMDutyCycle ( m_pwmGenerator , initialDutyCycle ) ; m_module -> SetDO_PWMOutputChannel ( m_pwmGenerator , m_channel ) ; }
Enable a PWM Output on this line.
Enable a PWM Output on this line .