/// © MiroZ 2024 #include "Mutex.h" #include Mutex::Mutex() { assert(m_mutex = xSemaphoreCreateMutex()); } Mutex::Mutex(SemaphoreHandle_t mutex) { m_mutex = mutex; } bool Mutex::take(uint32_t ticks) { return xSemaphoreTake(m_mutex, ticks); } bool Mutex::give() { return xSemaphoreGive(m_mutex); }