/**
 * Set Semi-period mode on this counter.
 * Counts up on both rising and falling edges. 
 */
void Counter::SetSemiPeriodMode(bool highSemiPeriod)
{
	m_counter->writeConfig_Mode(kSemiperiod, &status);
	m_counter->writeConfig_UpRisingEdge(highSemiPeriod, &status);
	SetUpdateWhenEmpty(false);
	wpi_assertCleanStatus(status);
}
/**
 * Set Semi-period mode on this counter.
 * Counts up on both rising and falling edges. 
 */
void xCounter::SetSemiPeriodMode(bool highSemiPeriod)
{
	if (StatusIsFatal()) return;
	tRioStatusCode localStatus = NiFpga_Status_Success;
	m_counter->writeConfig_Mode(kSemiperiod, &localStatus);
	m_counter->writeConfig_UpRisingEdge(highSemiPeriod, &localStatus);
	SetUpdateWhenEmpty(false);
	wpi_setError(localStatus);
}
/**
 * Delete the Counter object.
 */
xCounter::~xCounter()
{
	SetUpdateWhenEmpty(true);
	if (m_allocatedUpSource)
	{
		delete m_upSource;
		m_upSource = NULL;
	}
	if (m_allocatedDownSource)
	{
		delete m_downSource;
		m_downSource = NULL;
	}
	delete m_counter;
	m_counter = NULL;
	counters->Free(m_index);
}