Files
allwpilib/hal/src/main/java/edu/wpi/first/hal/InterruptJNI.java
Thad House 58b6484dbe Switch away from NI interrupt manager to custom implementation (#3705)
* Switch away from NI interrupt manager to custom implementation

* Formatting

* Fix tidy

* Formatting

* Fix loading

* Make interrupt api public

* Add multiple wait api

* Formatting

* Fix build

* Fix review comments

* wpiformat

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-13 17:25:54 -07:00

32 lines
1.2 KiB
Java

// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package edu.wpi.first.hal;
public class InterruptJNI extends JNIWrapper {
public static final int HalInvalidHandle = 0;
public static native int initializeInterrupts();
public static native void cleanInterrupts(int interruptHandle);
public static native long waitForInterrupt(
int interruptHandle, double timeout, boolean ignorePrevious);
public static native long waitForMultipleInterrupts(
int interruptHandle, long mask, double timeout, boolean ignorePrevious);
public static native long readInterruptRisingTimestamp(int interruptHandle);
public static native long readInterruptFallingTimestamp(int interruptHandle);
public static native void requestInterrupts(
int interruptHandle, int digitalSourceHandle, int analogTriggerType);
public static native void setInterruptUpSourceEdge(
int interruptHandle, boolean risingEdge, boolean fallingEdge);
public static native void releaseWaitingInterrupt(int interruptHandle);
}