mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-17 16:22:48 +00:00
20 lines
465 B
C++
20 lines
465 B
C++
#include "NotifiedWorkerThread.h"
|
|
|
|
namespace concurrency {
|
|
|
|
/**
|
|
* Notify this thread so it can run
|
|
*/
|
|
void NotifiedWorkerThread::notify(uint32_t v, eNotifyAction action)
|
|
{
|
|
xTaskNotify(taskHandle, v, action);
|
|
}
|
|
|
|
void NotifiedWorkerThread::block()
|
|
{
|
|
xTaskNotifyWait(0, // don't clear notification on entry
|
|
clearOnRead, ¬ification, portMAX_DELAY); // Wait forever
|
|
}
|
|
|
|
} // namespace concurrency
|