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>
This commit is contained in:
Thad House
2022-10-13 17:25:54 -07:00
committed by GitHub
parent ca43fe2798
commit 58b6484dbe
11 changed files with 272 additions and 16 deletions

View File

@@ -90,7 +90,7 @@ public class SynchronousInterrupt implements AutoCloseable {
* interrupt was read.
* @return The raw hardware interrupt result
*/
int waitForInterruptRaw(double timeoutSeconds, boolean ignorePrevious) {
long waitForInterruptRaw(double timeoutSeconds, boolean ignorePrevious) {
return InterruptJNI.waitForInterrupt(m_handle, timeoutSeconds, ignorePrevious);
}
@@ -104,7 +104,7 @@ public class SynchronousInterrupt implements AutoCloseable {
* @return Result of which edges were triggered, or if an timeout occurred.
*/
public WaitResult waitForInterrupt(double timeoutSeconds, boolean ignorePrevious) {
int result = InterruptJNI.waitForInterrupt(m_handle, timeoutSeconds, ignorePrevious);
long result = InterruptJNI.waitForInterrupt(m_handle, timeoutSeconds, ignorePrevious);
// Rising edge result is the interrupt bit set in the byte 0xFF
// Falling edge result is the interrupt bit set in the byte 0xFF00