mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 11:07:34 +00:00
Rename to STA RTOS
This commit is contained in:
37
include/sta/rtos/mutex.hpp
Normal file
37
include/sta/rtos/mutex.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief RTOS mutex implementation.
|
||||
*/
|
||||
#ifndef STA_RTOS_MUTEX_HPP
|
||||
#define STA_RTOS_MUTEX_HPP
|
||||
|
||||
#include <sta/intf/mutex.hpp>
|
||||
|
||||
#include <cmsis_os2.h>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
/**
|
||||
* @brief Implementation of Mutex interface using CMSIS RTOS2.
|
||||
*
|
||||
* @ingroup STA_RTOS_API
|
||||
*/
|
||||
class RTOSMutex : public Mutex
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @param handle CMSIS RTOS2 mutex
|
||||
*/
|
||||
RTOSMutex(osMutexId_t * handle);
|
||||
|
||||
void acquire() override;
|
||||
void release() override;
|
||||
|
||||
private:
|
||||
osMutexId_t * handle_; /**< CMSIS RTOS2 mutex */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_RTOS_MUTEX_HPP
|
Reference in New Issue
Block a user