diff --git a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/thread.hpp b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/thread.hpp index 9902e3e1f1..33ff54f575 100644 --- a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/thread.hpp +++ b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/thread.hpp @@ -20,9 +20,6 @@ #elif UAVCAN_STM32_FREERTOS # include # include -# ifndef MAX_SEMAPHORE_COUNT -# define MAX_SEMAPHORE_COUNT 50 -#endif #else # error "Unknown OS" #endif @@ -178,7 +175,7 @@ public: BusEvent(CanDriver& can_driver) { (void)can_driver; - sem_ = xSemaphoreCreateCounting( MAX_SEMAPHORE_COUNT, 0 ); + sem_ = xSemaphoreCreateBinary(); } bool wait(uavcan::MonotonicDuration duration);