CAN-Demo/App/Src/startup.cpp
2024-07-05 14:06:49 +02:00

35 lines
661 B
C++

/*
* printable.cpp
*
* Created on: Aug 30, 2023
* Author: Dario
*/
#include <sta/tacos.hpp>
#include <tasks/can_spam.hpp>
#include <tasks/can_receiver.hpp>
namespace sta
{
namespace tacos
{
void onStatemachineInit()
{
}
void onManagerInit()
{
// ###### Register different threads for different states here. ######
// Register Spam Thread to only run in the first state
addThread<demo::CanSpam>({ALL_STATES}, 0x123);
// Register Receive Thread to run in states 0 and 2
addThread<demo::CanReceiver>({0,2}, 0x124);
STA_DEBUG_PRINTF("The answer to everything is %d", 42);
}
} // namespace tacos
} // namespace sta