You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
567 B
27 lines
567 B
|
|
#ifndef __AP_HAL_SMACCM_SEMAPHORE_H__ |
|
#define __AP_HAL_SMACCM_SEMAPHORE_H__ |
|
|
|
#include <AP_HAL_Boards.h> |
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SMACCM |
|
|
|
#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 // CONFIG_HAL_BOARD == HAL_BOARD_SMACCM |
|
#endif // __AP_HAL_SMACCM_SEMAPHORE_H__
|
|
|