2022-04-09 21:16:11 +02:00

32 lines
475 B
C++

#ifndef STA_OS2_MUTEX_HPP
#define STA_OS2_MUTEX_HPP
#include <sta/mutex.hpp>
#include <cmsis_os2.h>
namespace sta
{
/**
* @brief Implementation of Mutex for CMSIS V2.
*/
class Os2Mutex : public Mutex
{
public:
/**
* @param handle CMSIS V2 mutex
*/
Os2Mutex(osMutexId_t * handle);
void acquire() override;
void release() override;
private:
osMutexId_t * handle_; /**< CMSIS V2 mutex */
};
} // namespace sta
#endif // STA_OS2_MUTEX_HPP