CAN-Demo/App/Src/startup.cpp
2024-03-08 13:56:19 +01:00

44 lines
785 B
C++

/*
* printable.cpp
*
* Created on: Aug 30, 2023
* Author: Dario
*/
#include <sta/debug/debug.hpp>
#include <tasks/can_task.hpp>
#include <tasks/thermo.hpp>
#include <sta/devices/stm32/gpio_pin.hpp>
#include <sta/rtos/debug/heap_stats.hpp>
#include <sta/tacos.hpp>
#include <memory>
extern CAN_HandleTypeDef hcan1;
namespace sta
{
namespace tacos
{
void onStatemachineInit()
{
}
void onManagerInit()
{
// ###### Register different threads for different states here. ######
// The dummy task runs for state 0.
Manager::instance()->registerThread(std::make_shared<demo::CanTask>("CAN test", 0x22), {ALL_STATES});
STA_DEBUG_PRINTF("The answer to everything is %d", 42);
STA_DEBUG_HEAP_STATS();
}
} // namespace tacos
} // namespace sta