mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpilib] Remove InterruptableSensorBase and replace with interrupt classes (#2410)
This commit is contained in:
@@ -7,21 +7,13 @@ package edu.wpi.first.hal;
|
||||
public class InterruptJNI extends JNIWrapper {
|
||||
public static final int HalInvalidHandle = 0;
|
||||
|
||||
public interface InterruptJNIHandlerFunction {
|
||||
void apply(int interruptAssertedMask, Object param);
|
||||
}
|
||||
|
||||
public static native int initializeInterrupts(boolean watcher);
|
||||
public static native int initializeInterrupts();
|
||||
|
||||
public static native void cleanInterrupts(int interruptHandle);
|
||||
|
||||
public static native int waitForInterrupt(
|
||||
int interruptHandle, double timeout, boolean ignorePrevious);
|
||||
|
||||
public static native void enableInterrupts(int interruptHandle);
|
||||
|
||||
public static native void disableInterrupts(int interruptHandle);
|
||||
|
||||
public static native long readInterruptRisingTimestamp(int interruptHandle);
|
||||
|
||||
public static native long readInterruptFallingTimestamp(int interruptHandle);
|
||||
@@ -29,9 +21,6 @@ public class InterruptJNI extends JNIWrapper {
|
||||
public static native void requestInterrupts(
|
||||
int interruptHandle, int digitalSourceHandle, int analogTriggerType);
|
||||
|
||||
public static native void attachInterruptHandler(
|
||||
int interruptHandle, InterruptJNIHandlerFunction handler, Object param);
|
||||
|
||||
public static native void setInterruptUpSourceEdge(
|
||||
int interruptHandle, boolean risingEdge, boolean fallingEdge);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user