mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user