Move interrupt methods to InterruptableSensorBase

Analog interrupts work again now, and RequestInterrupts is no longer
duplicated three times.

Change-Id: I5244b76262d7620852141cd21b2429d627636793
This commit is contained in:
Thomas Clark
2014-10-08 14:52:24 -04:00
parent dc09233fca
commit 4d2a720f47
9 changed files with 83 additions and 214 deletions

View File

@@ -14,15 +14,15 @@ class AnalogTrigger;
* This class is used to get the current output value and also as a DigitalSource
* to provide routing of an output to digital subsystems on the FPGA such as
* Counter, Encoder, and Interrupt.
*
*
* The TriggerState output indicates the primary output value of the trigger. If the analog
* signal is less than the lower limit, the output is false. If the analog value is greater
* than the upper limit, then the output is true. If the analog value is in between, then
* the trigger output state maintains its most recent value.
*
*
* The InWindow output indicates whether or not the analog signal is inside the range defined
* by the limits.
*
*
* The RisingPulse and FallingPulse outputs detect an instantaneous transition from above the
* upper limit to below the lower limit, and vise versa. These pulses represent a rollover
* condition of a sensor and can be routed to an up / down couter or to interrupts. Because
@@ -40,7 +40,7 @@ class AnalogTriggerOutput : public DigitalSource
{
friend class AnalogTrigger;
public:
virtual ~AnalogTriggerOutput();
bool Get();
@@ -48,8 +48,6 @@ public:
virtual uint32_t GetChannelForRouting();
virtual uint32_t GetModuleForRouting();
virtual bool GetAnalogTriggerForRouting();
virtual void RequestInterrupts(InterruptHandlerFunction handler, void *param = NULL); ///< Asynchronus handler version.
virtual void RequestInterrupts(); ///< Synchronus Wait version.
protected:
AnalogTriggerOutput(AnalogTrigger *trigger, AnalogTriggerType outputType);