Add methods to retreive the FPGA index for counters and encoders and return the encoding type as an integer

Change-Id: Iaa4062ec124b968b27e7c812cc754032fcb354d2

Add methods to retrieve the FPGA index for counters and encoders and return the encoding type as an integer

Change-Id: If04dc291f39a9b331495d2b97a8b87d3ded71280
This commit is contained in:
Brad Miller
2014-12-30 17:36:12 -05:00
parent b94341a23e
commit fb7f5e9de8
9 changed files with 89 additions and 10 deletions

View File

@@ -23,8 +23,8 @@ void Counter::InitCounter(Mode mode)
m_table = NULL;
int32_t status = 0;
uint32_t index = 0;
m_counter = initializeCounter(mode, &index, &status);
m_index = 0;
m_counter = initializeCounter(mode, &m_index, &status);
wpi_setErrorWithContext(status, getHALErrorMessage(status));
m_upSource = NULL;
@@ -34,7 +34,7 @@ void Counter::InitCounter(Mode mode)
SetMaxPeriod(.5);
HALReport(HALUsageReporting::kResourceType_Counter, index, mode);
HALReport(HALUsageReporting::kResourceType_Counter, m_index, mode);
}
/**