better init error output

This commit is contained in:
Robin Müller 2020-07-26 03:12:04 +02:00
parent e179288c00
commit 6425c0dd4c
2 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,7 @@ const uint32_t MutexIF::BLOCKING = portMAX_DELAY;
Mutex::Mutex() {
handle = xSemaphoreCreateMutex();
if(handle == nullptr) {
sif::error << "Mutex: Creation failure" << std::endl;
sif::error << "Mutex::Mutex(FreeRTOS): Creation failure" << std::endl;
}
}

View File

@ -20,6 +20,7 @@ public:
~Mutex();
ReturnValue_t lockMutex(uint32_t timeoutMs = MutexIF::BLOCKING) override;
ReturnValue_t unlockMutex() override;
private:
SemaphoreHandle_t handle;
};