From ecbfe0f406c12108dcba9b773bad0cf8d15f9d55 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Tue, 12 May 2020 11:52:34 +0300 Subject: [PATCH] Fix usage example in xSemaphoreCreateBinaryStatic --- components/freertos/include/freertos/semphr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/freertos/include/freertos/semphr.h b/components/freertos/include/freertos/semphr.h index abe3819f8f..1aff6c9ddf 100644 --- a/components/freertos/include/freertos/semphr.h +++ b/components/freertos/include/freertos/semphr.h @@ -235,13 +235,14 @@ typedef QueueHandle_t SemaphoreHandle_t; * * void vATask( void * pvParameters ) * { - * // Semaphore cannot be used before a call to xSemaphoreCreateBinary(). + * // Semaphore cannot be used before a call to xSemaphoreCreateBinary() or + * // xSemaphoreCreateBinaryStatic(). * // The semaphore's data structures will be placed in the xSemaphoreBuffer * // variable, the address of which is passed into the function. The * // function's parameter is not NULL, so the function will not attempt any * // dynamic memory allocation, and therefore the function will not return * // return NULL. - * xSemaphore = xSemaphoreCreateBinary( &xSemaphoreBuffer ); + * xSemaphore = xSemaphoreCreateBinaryStatic( &xSemaphoreBuffer ); * * // Rest of task code goes here. * }