mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
* 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>
32 lines
1.2 KiB
Java
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);
|
|
}
|