2013-01-03 19:41:36 -04:00
|
|
|
|
|
|
|
#ifndef __AP_HAL_SMACCM_SEMAPHORE_H__
|
|
|
|
#define __AP_HAL_SMACCM_SEMAPHORE_H__
|
|
|
|
|
2013-01-09 17:32:34 -04:00
|
|
|
#include <AP_HAL_Boards.h>
|
|
|
|
|
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SMACCM
|
|
|
|
|
2013-01-03 19:41:36 -04:00
|
|
|
#include <AP_HAL_SMACCM.h>
|
|
|
|
#include <FreeRTOS.h>
|
|
|
|
#include <semphr.h>
|
|
|
|
|
|
|
|
class SMACCM::SMACCMSemaphore : public AP_HAL::Semaphore {
|
|
|
|
public:
|
|
|
|
SMACCMSemaphore();
|
|
|
|
|
|
|
|
void init();
|
|
|
|
virtual bool take(uint32_t timeout_ms);
|
|
|
|
virtual bool take_nonblocking();
|
|
|
|
virtual bool give();
|
|
|
|
|
|
|
|
private:
|
|
|
|
xSemaphoreHandle m_semaphore;
|
|
|
|
};
|
|
|
|
|
2013-01-09 17:32:34 -04:00
|
|
|
#endif // CONFIG_HAL_BOARD == HAL_BOARD_SMACCM
|
2013-01-03 19:41:36 -04:00
|
|
|
#endif // __AP_HAL_SMACCM_SEMAPHORE_H__
|