mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 08:13:34 +08:00
changed counting semaphore to binary
This commit is contained in:
@@ -20,9 +20,6 @@
|
|||||||
#elif UAVCAN_STM32_FREERTOS
|
#elif UAVCAN_STM32_FREERTOS
|
||||||
# include <stm32f4xx.h>
|
# include <stm32f4xx.h>
|
||||||
# include <cmsis_os.h>
|
# include <cmsis_os.h>
|
||||||
# ifndef MAX_SEMAPHORE_COUNT
|
|
||||||
# define MAX_SEMAPHORE_COUNT 50
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
# error "Unknown OS"
|
# error "Unknown OS"
|
||||||
#endif
|
#endif
|
||||||
@@ -178,7 +175,7 @@ public:
|
|||||||
BusEvent(CanDriver& can_driver)
|
BusEvent(CanDriver& can_driver)
|
||||||
{
|
{
|
||||||
(void)can_driver;
|
(void)can_driver;
|
||||||
sem_ = xSemaphoreCreateCounting( MAX_SEMAPHORE_COUNT, 0 );
|
sem_ = xSemaphoreCreateBinary();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wait(uavcan::MonotonicDuration duration);
|
bool wait(uavcan::MonotonicDuration duration);
|
||||||
|
|||||||
Reference in New Issue
Block a user