mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[hal] Add support for DMA to Java (#3158)
This commit is contained in:
@@ -165,9 +165,17 @@ bool remapDigitalSource(HAL_Handle digitalSourceHandle,
|
||||
}
|
||||
analogTrigger = false;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
} else if (isHandleType(digitalSourceHandle, HAL_HandleEnum::PWM)) {
|
||||
// PWM's on MXP port are supported as a digital source
|
||||
int32_t index = getHandleIndex(digitalSourceHandle);
|
||||
if (index >= kNumPWMHeaders) {
|
||||
channel = remapMXPPWMChannel(index);
|
||||
module = 1;
|
||||
analogTrigger = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t remapMXPChannel(int32_t channel) {
|
||||
|
||||
Reference in New Issue
Block a user