code/WPILib/DigitalModule.cpp
/**
 * Generate a single pulse.
 * Write a pulse to the specified digital output channel. There can only be a single pulse going at any time.
 */
Generate a single pulse.
Write a pulse to the specified digital output channel. There can only be a single pulse going at any time.
Generate a single pulse . Write a pulse to the specified digital output channel . There can only be a single pulse going at any time .
void DigitalModule::Pulse(UINT32 channel, float pulseLength)
{
	UINT16 mask = 1 << RemapDigitalChannel(channel - 1);
	m_fpgaDIO->writePulseLength((UINT8)(1.0e9 * pulseLength / (m_fpgaDIO->readLoopTiming(&status) * 25)), &status);
	m_fpgaDIO->writePulse(mask, &status);
	wpi_assertCleanStatus(status);
}
void DigitalModule :: Pulse ( UINT32 channel , float pulseLength ) { UINT16 mask = 1 << RemapDigitalChannel ( channel - 1 ) ; m_fpgaDIO -> writePulseLength ( ( UINT8 ) ( 1.0e9 * pulseLength / ( m_fpgaDIO -> readLoopTiming ( & status ) * 25 ) ) , & status ) ; m_fpgaDIO -> writePulse ( mask , & status ) ; wpi_assertCleanStatus ( status ) ; }
Generate a single pulse.
Generate a single pulse .