From 6b4eecf5fe77522caa8f000a590535616603c575 Mon Sep 17 00:00:00 2001 From: Thad House Date: Sat, 7 Dec 2019 17:16:14 -0800 Subject: [PATCH] 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. --- hal/src/main/native/athena/SPI.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hal/src/main/native/athena/SPI.cpp b/hal/src/main/native/athena/SPI.cpp index bb0666a1a0..aaa82e94a3 100644 --- a/hal/src/main/native/athena/SPI.cpp +++ b/hal/src/main/native/athena/SPI.cpp @@ -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"