code/WPILib/Counter.cpp
/**
 * Create an instance of a counter object.
 * This creates a ChipObject counter and initializes status variables appropriately
 */
Create an instance of a counter object.
This creates a ChipObject counter and initializes status variables appropriately
Create an instance of a counter object . This creates a ChipObject counter and initializes status variables appropriately
void Counter::InitCounter(Mode mode)
{
	Resource::CreateResourceObject(&counters, tCounter::kNumSystems);
	m_index = counters->Allocate();
	m_counter = new tCounter(m_index, &status);
	m_counter->writeConfig_Mode(mode, &status);
	m_upSource = NULL;
	m_downSource = NULL;
	m_allocatedUpSource = false;
	m_allocatedDownSource = false;
	m_counter->writeTimerConfig_AverageSize(1, &status);
}
void Counter :: InitCounter ( Mode mode ) { Resource :: CreateResourceObject ( & counters , tCounter :: kNumSystems ) ; m_index = counters -> Allocate ( ) ; m_counter = new tCounter ( m_index , & status ) ; m_counter -> writeConfig_Mode ( mode , & status ) ; m_upSource = NULL ; m_downSource = NULL ; m_allocatedUpSource = false ; m_allocatedDownSource = false ; m_counter -> writeTimerConfig_AverageSize ( 1 , & status ) ; }
Create an instance of a counter object.
Create an instance of a counter object .