mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add hidden functions to get the SPI system and SPI DMA (#2162)
With the addition of stall configuration, its not very clear how it works, and seems like it would be different per use. So adding ways to manually get them, so the functionality can be figured out how to be used.
This commit is contained in:
committed by
Peter Johnson
parent
ccdd0fbdb2
commit
6b4eecf5fe
@@ -631,4 +631,12 @@ int32_t HAL_GetSPIAutoDroppedCount(HAL_SPIPort port, int32_t* status) {
|
||||
return spiSystem->readTransferSkippedFullCount(status);
|
||||
}
|
||||
|
||||
// These 2 functions are so the new stall functionality
|
||||
// can be tested. How they're used is not very clear
|
||||
// but I want them to be testable so we can add an impl.
|
||||
// We will not be including these in the headers
|
||||
void* HAL_GetSPIDMAManager() { return spiAutoDMA.get(); }
|
||||
|
||||
void* HAL_GetSPISystem() { return spiSystem.get(); }
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user