diff --git a/src/startup.cpp b/src/startup.cpp index b312a93..0fda9b3 100644 --- a/src/startup.cpp +++ b/src/startup.cpp @@ -40,6 +40,10 @@ extern osMutexId_t uartMutexHandle; * @brief Functions that are called during startup. */ +// CAN Handle +#ifdef STA_RTOS_CAN_BUS_ENABLE + extern CAN_HandleTypeDef hcan1; +#endif /* STA_RTOS_CAN_BUS_ENABLE */ namespace sta { @@ -150,6 +154,14 @@ namespace sta tacos::initWatchdog(); #endif // STA_TACOS_WATCHDOG_ENABLED } + +#ifdef STA_RTOS_CAN_BUS_ENABLE + STA_WEAK + CAN_HandleTypeDef * getCanController(){ + return &hcan1; + } +#endif /* STA_RTOS_CAN_BUS_ENABLE */ + } // namespace rtos } // namespace sta