Proper getCanController init

This commit is contained in:
@CarlWachter 2024-02-16 14:42:38 +01:00
parent 2dc3299186
commit becb501438

View File

@ -40,6 +40,10 @@ extern osMutexId_t uartMutexHandle;
* @brief Functions that are called during startup. * @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 namespace sta
{ {
@ -150,6 +154,14 @@ namespace sta
tacos::initWatchdog(); tacos::initWatchdog();
#endif // STA_TACOS_WATCHDOG_ENABLED #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 rtos
} // namespace sta } // namespace sta