diff --git a/wpilibc/wpilibC++Devices/src/InterruptableSensorBase.cpp b/wpilibc/wpilibC++Devices/src/InterruptableSensorBase.cpp index 509f21f922..08e02432ef 100644 --- a/wpilibc/wpilibC++Devices/src/InterruptableSensorBase.cpp +++ b/wpilibc/wpilibC++Devices/src/InterruptableSensorBase.cpp @@ -21,6 +21,13 @@ InterruptableSensorBase::~InterruptableSensorBase() } +/** +* Request one of the 8 interrupts asynchronously on this digital input. +* Request interrupts in asynchronous mode where the user's interrupt handler will be +* called when the interrupt fires. Users that want control over the thread priority +* should use the synchronous method with their own spawned thread. +* The default is interrupt on rising edges only. +*/ void InterruptableSensorBase::RequestInterrupts(InterruptHandlerFunction handler, void *param) { if (StatusIsFatal()) return; @@ -44,9 +51,9 @@ void InterruptableSensorBase::RequestInterrupts(InterruptHandlerFunction handler } /** -* Request interrupts synchronously on this digital input. -* Request interrupts in synchronus mode where the user program will have to explicitly -* wait for the interrupt to occur. +* Request one of the 8 interrupts synchronously on this digital input. +* Request interrupts in synchronous mode where the user program will have to explicitly +* wait for the interrupt to occur using WaitForInterrupt. * The default is interrupt on rising edges only. */ void InterruptableSensorBase::RequestInterrupts() diff --git a/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java b/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java index 7ca88e7045..0fbb221f7a 100644 --- a/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java +++ b/wpilibj/wpilibJavaDevices/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java @@ -73,13 +73,13 @@ public abstract class InterruptableSensorBase extends SensorBase { abstract byte getModuleForRouting(); /** - * Request interrupts asynchronously on this digital input. + * Request one of the 8 interrupts asynchronously on this digital input. * * @param handler * The {@link InterruptHandlerFunction} that contains the method * {@link InterruptHandlerFunction#interruptFired(int, Object)} that * will be called whenever there is an interrupt on this device. - * Request interrupts in synchronus mode where the user program + * Request interrupts in synchronous mode where the user program * interrupt handler will be called when an interrupt occurs. The * default is interrupt on rising edges only. */ @@ -105,10 +105,10 @@ public abstract class InterruptableSensorBase extends SensorBase { } /** - * Request interrupts synchronously on this digital input. Request + * Request one of the 8 interrupts synchronously on this digital input. Request * interrupts in synchronous mode where the user program will have to - * explicitly wait for the interrupt to occur. The default is interrupt on - * rising edges only. + * explicitly wait for the interrupt to occur using {@link waitForInterrupt}. + * The default is interrupt on rising edges only. */ public void requestInterrupts() { if(m_interrupt != null){