96eccbdc8d
Replace LGPL from past commit with Apache License 2.0 for the newly created projects: - in Platforms/* - TactilityKernel Add license headers to source code in: - in Platforms/* - TactilityKernel - TactilityFreeRtos Updated LICENSE.md
21 lines
388 B
C
21 lines
388 B
C
// SPDX-License-Identifier: Apache-2.0
|
|
#pragma once
|
|
|
|
#ifdef ESP_PLATFORM
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/semphr.h>
|
|
#else
|
|
#include <FreeRTOS.h>
|
|
#include <semphr.h>
|
|
#endif
|
|
|
|
#include <cassert>
|
|
|
|
struct SemaphoreHandleDeleter {
|
|
static void operator()(QueueHandle_t handleToDelete) {
|
|
assert(xPortInIsrContext() == pdFALSE);
|
|
vSemaphoreDelete(handleToDelete);
|
|
}
|
|
};
|
|
|