Macro to obtain a semaphore. The semaphore must have previously been created with a call to xSemaphoreCreateBinary(), xSemaphoreCreateMutex() or xSemaphoreCreateCounting().
xSemaphoreA handle to the semaphore being taken - obtained when the semaphore was created.
xBlockTimeThe time in ticks to wait for the semaphore to become available. The macro portTICK_PERIOD_MS can be used to convert this to a real time. A block time of zero can be used to poll the semaphore. A block time of portMAX_DELAY can be used to block indefinitely (provided INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h).
pdTRUE if the semaphore was obtained. pdFALSE if xBlockTime expired without the semaphore becoming available.