13 #include <hal/Interrupts.h>
15 #include "frc/AnalogTriggerType.h"
16 #include "frc/ErrorBase.h"
46 virtual HAL_Handle GetPortHandleForRouting()
const = 0;
47 virtual AnalogTriggerType GetAnalogTriggerTypeForRouting()
const = 0;
99 bool ignorePrevious =
true);
146 hal::Handle<HAL_InterruptHandle> m_interrupt;
147 std::unique_ptr<InterruptEventHandler> m_interruptHandler{
nullptr};
149 void AllocateInterrupts(
bool watcher);
std::function< void(WaitResult)> InterruptEventHandler
Handler for interrupts.
Definition: InterruptableSensorBase.h:34
virtual WaitResult WaitForInterrupt(double timeout, bool ignorePrevious=true)
In synchronous mode, wait for the defined interrupt to occur.
Definition: InterruptableSensorBase.h:20
virtual void DisableInterrupts()
Disable Interrupts without without deallocating structures.
virtual double ReadFallingTimestamp()
Return the timestamp for the falling interrupt that occurred most recently.
virtual void RequestInterrupts()
Request one of the 8 interrupts synchronously on this digital input.
virtual ~InterruptableSensorBase()
Free the resources for an interrupt event.
Base class for most objects.
Definition: ErrorBase.h:104
virtual double ReadRisingTimestamp()
Return the timestamp for the rising interrupt that occurred most recently.
virtual void EnableInterrupts()
Enable interrupts to occur on this input.
virtual void CancelInterrupts()
Cancel interrupts on this device.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
virtual void SetUpSourceEdge(bool risingEdge, bool fallingEdge)
Set which edge to trigger interrupts on.