diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-01-15 18:20:09 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-01-15 18:20:09 +0300 |
commit | 8ae69f3fb37b6c26bd5fcae2aced81a89027d6f4 (patch) | |
tree | 9ba530ee8a0bd0e76fa5255e263802700d50bd59 /src/CAN | |
parent | 8bd63eaab18a258999eab2bb52892db2561c3749 (diff) |
Poll the Tx event FIFO on the SAME5x instead of using the interrupt
Diffstat (limited to 'src/CAN')
-rw-r--r-- | src/CAN/CanInterface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CAN/CanInterface.cpp b/src/CAN/CanInterface.cpp index 7ac0776c..d39da7d8 100644 --- a/src/CAN/CanInterface.cpp +++ b/src/CAN/CanInterface.cpp @@ -428,7 +428,7 @@ void CanInterface::Init() noexcept #if USE_NEW_CAN_DRIVER CanTiming timing; timing.SetDefaults(); - can0dev = CanDevice::Init(0, CanDeviceNumber, Can0Config, can0Memory, timing, TxCallback); + can0dev = CanDevice::Init(0, CanDeviceNumber, Can0Config, can0Memory, timing, nullptr); InitReceiveFilters(); can0dev->Enable(); #else @@ -643,7 +643,9 @@ extern "C" [[noreturn]] void CanClockLoop(void *) noexcept #endif msg->lastTimeSent = lastTimeSent; -#if !USE_NEW_CAN_DRIVER +#if USE_NEW_CAN_DRIVER + CanDriver::PollTxEventFifo(TxCallback); +#else PollTxEventFifo(TxCallback); #endif if (gotTimeSyncTxTimeStamp) |