portduino WIP

This commit is contained in:
geeksville
2020-09-04 15:03:22 -07:00
parent ccf3522ada
commit c629b94333
11 changed files with 230 additions and 85 deletions

View File

@@ -1,8 +1,10 @@
#include "Lock.h"
#include <cassert>
namespace concurrency {
namespace concurrency
{
#ifdef HAS_FREE_RTOS
Lock::Lock()
{
handle = xSemaphoreCreateBinary();
@@ -19,5 +21,12 @@ void Lock::unlock()
{
assert(xSemaphoreGive(handle));
}
#else
Lock::Lock() {}
void Lock::lock() {}
void Lock::unlock() {}
#endif
} // namespace concurrency