Changes DigitalSource API for HAL ease of use (#144)

This commit is contained in:
Thad House
2016-07-07 21:43:55 -07:00
committed by Peter Johnson
parent 7597e3c274
commit 4a3e3a6324
38 changed files with 398 additions and 336 deletions

View File

@@ -50,26 +50,26 @@ bool AnalogTriggerOutput::Get() const {
return result;
}
/**
* @return The value to be written to the channel field of a routing mux.
*/
uint32_t AnalogTriggerOutput::GetChannelForRouting() const {
return (m_trigger.m_index << 2) + m_outputType;
}
/**
* @return The value to be written to the module field of a routing mux.
*/
uint32_t AnalogTriggerOutput::GetModuleForRouting() const { return 0; }
/**
* @return The value to be written to the module field of a routing mux.
*/
bool AnalogTriggerOutput::GetAnalogTriggerForRouting() const { return true; }
/**
* @return The HAL Handle to the specified source.
*/
HalHandle AnalogTriggerOutput::GetPortHandle() const {
HalHandle AnalogTriggerOutput::GetPortHandleForRouting() const {
return m_trigger.m_trigger;
}
/**
* Is source an AnalogTrigger
*/
bool AnalogTriggerOutput::IsAnalogTrigger() const { return true; }
/**
* @return The type of analog trigger output to be used.
*/
AnalogTriggerType AnalogTriggerOutput::GetAnalogTriggerTypeForRouting() const {
return m_outputType;
}
/**
* @return The channel of the source.
*/
uint32_t AnalogTriggerOutput::GetChannel() const { return m_trigger.m_index; }