code/WPILib/DigitalOutput.cpp
/**
 * Request interrupts asynchronously on this digital output.
 * @param handler The address of the interrupt handler function of type tInterruptHandler that
 * will be called whenever there is an interrupt on the digitial output port.
 * Request interrupts in synchronus mode where the user program interrupt handler will be
 * called when an interrupt occurs.
 * The default is interrupt on rising edges only.
 */
Request interrupts asynchronously on this digital output.
@param handler The address of the interrupt handler function of type tInterruptHandler that
will be called whenever there is an interrupt on the digitial output port.
Request interrupts in synchronus mode where the user program interrupt handler will be
called when an interrupt occurs.
The default is interrupt on rising edges only.
Request interrupts asynchronously on this digital output . @param handler The address of the interrupt handler function of type tInterruptHandler that will be called whenever there is an interrupt on the digitial output port . Request interrupts in synchronus mode where the user program interrupt handler will be called when an interrupt occurs . The default is interrupt on rising edges only .
void DigitalOutput::RequestInterrupts(tInterruptHandler handler, void *param)
{
	m_interruptIndex = interruptsResource->Allocate();
	AllocateInterrupts(false);
	m_interrupt->writeConfig_WaitForAck(false, &status);
	m_interrupt->writeConfig_Source_AnalogTrigger(GetAnalogTriggerForRouting(), &status);
	m_interrupt->writeConfig_Source_Channel(GetChannelForRouting(), &status);
	m_interrupt->writeConfig_Source_Module(GetModuleForRouting(), &status);
	SetUpSourceEdge(true, false);
	m_manager->registerHandler(handler, param, &status);
	wpi_assertCleanStatus(status);
}
void DigitalOutput :: RequestInterrupts ( tInterruptHandler handler , void * param ) { m_interruptIndex = interruptsResource -> Allocate ( ) ; AllocateInterrupts ( false ) ; m_interrupt -> writeConfig_WaitForAck ( false , & status ) ; m_interrupt -> writeConfig_Source_AnalogTrigger ( GetAnalogTriggerForRouting ( ) , & status ) ; m_interrupt -> writeConfig_Source_Channel ( GetChannelForRouting ( ) , & status ) ; m_interrupt -> writeConfig_Source_Module ( GetModuleForRouting ( ) , & status ) ; SetUpSourceEdge ( true , false ) ; m_manager -> registerHandler ( handler , param , & status ) ; wpi_assertCleanStatus ( status ) ; }
Request interrupts asynchronously on this digital output.
Request interrupts asynchronously on this digital output .
//TODO: check for error on allocation // Creates a manager too