code/WPILib/AnalogTrigger.cpp
/**
 * Initialize an analog trigger from a slot and channel.
 * This is the common code for the two constructors that use a slot and channel.
 */
Initialize an analog trigger from a slot and channel.
This is the common code for the two constructors that use a slot and channel.
Initialize an analog trigger from a slot and channel . This is the common code for the two constructors that use a slot and channel .
void AnalogTrigger::InitTrigger(UINT32 slot, UINT32 channel)
{
	Resource::CreateResourceObject(&triggers, tAnalogTrigger::kNumSystems);
	m_channel = channel;
	m_analogModule = AnalogModule::GetInstance(slot);
	m_index = triggers->Allocate();
	m_trigger = new tAnalogTrigger(m_index, &status);
	m_trigger->writeSourceSelect_Channel(m_channel - 1, &status);
	m_trigger->writeSourceSelect_Module(AnalogModule::SlotToIndex(slot), &status);
	wpi_assertCleanStatus(status);
}
void AnalogTrigger :: InitTrigger ( UINT32 slot , UINT32 channel ) { Resource :: CreateResourceObject ( & triggers , tAnalogTrigger :: kNumSystems ) ; m_channel = channel ; m_analogModule = AnalogModule :: GetInstance ( slot ) ; m_index = triggers -> Allocate ( ) ; m_trigger = new tAnalogTrigger ( m_index , & status ) ; m_trigger -> writeSourceSelect_Channel ( m_channel - 1 , & status ) ; m_trigger -> writeSourceSelect_Module ( AnalogModule :: SlotToIndex ( slot ) , & status ) ; wpi_assertCleanStatus ( status ) ; }
Initialize an analog trigger from a slot and channel.
Initialize an analog trigger from a slot and channel .