From 849e523d2ccda972c3bf8fdc099d74b064680b08 Mon Sep 17 00:00:00 2001 From: "@CarlWachter" Date: Mon, 1 Jan 2024 16:34:58 +0100 Subject: [PATCH] Changed controller getter --- include/sta/rtos/system/can_bus.hpp | 2 +- src/system/can_bus.cpp | 19 +------------------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/include/sta/rtos/system/can_bus.hpp b/include/sta/rtos/system/can_bus.hpp index 71a5591..8299581 100644 --- a/include/sta/rtos/system/can_bus.hpp +++ b/include/sta/rtos/system/can_bus.hpp @@ -113,7 +113,7 @@ namespace sta * * Implementation must be provided by application. */ - extern CanController * getCanController(); + extern STM32CanController * getCanController(); /** @} */ } // namespace rtos diff --git a/src/system/can_bus.cpp b/src/system/can_bus.cpp index a71cf6d..4298fca 100644 --- a/src/system/can_bus.cpp +++ b/src/system/can_bus.cpp @@ -25,23 +25,6 @@ #include - -namespace -{ - osThreadId_t canBusTaskHandle = nullptr; - osMessageQueueId_t canBusDataQueueHandle = nullptr; - osMessageQueueId_t canBusSysQueueHandle = nullptr; - - sta::CanController * canBusController = nullptr; - - const size_t queueLength = 8; - - // Static memory buffers - CanDataMsg canBusDataQueueBuffer[queueLength]; - CanSysMsg canBusSysQueueBuffer[queueLength]; - uint32_t canBusStack[256]; -} - namespace sta { namespace rtos @@ -274,7 +257,7 @@ namespace sta if (controller_->receiveFrame(fifo, &header, payload)) { -// debug::displayFrameUART(frame); + //debug::displayFrameUART(frame); // Forward frame to callback switch (fifo)