Can bus start without handle

This commit is contained in:
@CarlWachter
2024-02-16 17:43:28 +01:00
parent bfba17245f
commit 16b2ed5a20
5 changed files with 30 additions and 17 deletions

View File

@@ -32,19 +32,19 @@ namespace sta
{
public:
CanBus(CAN_HandleTypeDef * controller);
CanBus();
/**
* @brief Getter function for the singleton instance.
*/
static CanBus* instance(CAN_HandleTypeDef * handle)
static CanBus* instance()
{
static CGuard g;
if (!_instance)
{
// Create the can bus singleton instance.
CanBus::_instance = new CanBus(handle);
CanBus::_instance = new CanBus();
}
return _instance;
@@ -115,7 +115,7 @@ namespace sta
AlpakaCanBus canBus_;
static RtosEvent messageEvent;
};