mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
18 lines
349 B
C++
18 lines
349 B
C++
#include "Thread.h"
|
|
#include "timing.h"
|
|
|
|
namespace concurrency {
|
|
|
|
void Thread::start(const char *name, size_t stackSize, uint32_t priority)
|
|
{
|
|
auto r = xTaskCreate(callRun, name, stackSize, this, priority, &taskHandle);
|
|
assert(r == pdPASS);
|
|
}
|
|
|
|
void Thread::callRun(void *_this)
|
|
{
|
|
((Thread *)_this)->doRun();
|
|
}
|
|
|
|
} // namespace concurrency
|