Files
lora_meshtastic_project/code/firmware-2.7.15.567b8ea/src/concurrency/BinarySemaphorePosix.h
T
kevin 26d5971aba 稳定版代码
Signed-off-by: 吴文峰 <kevin@lmve.net>
2026-03-06 19:52:05 +08:00

30 lines
426 B
C++

#pragma once
#include "../freertosinc.h"
namespace concurrency
{
#ifndef HAS_FREE_RTOS
class BinarySemaphorePosix
{
// SemaphoreHandle_t semaphore;
public:
BinarySemaphorePosix();
~BinarySemaphorePosix();
/**
* Returns false if we timed out
*/
bool take(uint32_t msec);
void give();
void giveFromISR(BaseType_t *pxHigherPriorityTaskWoken);
};
#endif
} // namespace concurrency