rotary: init task [#9]

This commit is contained in:
Vasily Davydov
2023-04-26 16:54:50 +03:00
parent e4885adbc9
commit 809358b341
6 changed files with 92 additions and 36 deletions

View File

@@ -0,0 +1,26 @@
/*
* Rotary.cpp
*
* Created on: 26 Apr 2023
* Author: tylen
*/
#include "Rotary.h"
Rotary::Rotary(ThreadCommon::QueueManager* qm) : _qm(qm) {}
Rotary::~Rotary() {}
void Rotary::taskFunction()
{
Event data(Event::Null, 0);
Event* e = new Event(Event::Rotary, ThreadCommon::RotaryAction::Idle);
_qm->send<Event>(ThreadCommon::QueueManager::master_event_all, e, 10);
for (;;) {}
}
void rotary_thread(void* pvParams)
{
Rotary r(static_cast<ThreadCommon::QueueManager*>(pvParams));
r.taskFunction();
}