[hal] Add support for DMA to Java (#3158)

This commit is contained in:
Thad House
2021-06-14 19:56:42 -07:00
committed by GitHub
parent 85144e47ff
commit 4a36f86c81
39 changed files with 2013 additions and 97 deletions

View File

@@ -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) {