Files
MuditaOS/module-sys/tests/Common/SchedulerKiller.cpp
Radoslaw Wicik a8573a404c Apply new style
2020-03-17 10:03:16 +01:00

25 lines
615 B
C++

//
// Created by mati on 25.04.19.
//
#include "SchedulerKiller.hpp"
#include "thread.hpp"
#include "timer.hpp"
#include "ticks.hpp"
#include "SystemManager/SystemManager.hpp"
SchedulerKiller::SchedulerKiller(const std::string &name) : sys::Service(name)
{
timer_id = CreateTimer(cpp_freertos::Ticks::MsToTicks(100), true);
ReloadTimer(timer_id);
}
void SchedulerKiller::TickHandler(uint32_t id)
{
sys::SystemManager::CloseSystem(this);
}
sys::Message_t SchedulerKiller::DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp)
{
return std::make_shared<sys::ResponseMessage>();
}