ardupilot/libraries/AP_HAL_SMACCM/Semaphores.h
James Bielman 578c4859e4 AP_HAL_SMACCM: Update to new semaphore interface.
- Renamed files to match AVR HAL.
2013-01-03 17:33:13 -08:00

23 lines
450 B
C++

#ifndef __AP_HAL_SMACCM_SEMAPHORE_H__
#define __AP_HAL_SMACCM_SEMAPHORE_H__
#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;
};
#endif // __AP_HAL_SMACCM_SEMAPHORE_H__