mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Fix usage example in xSemaphoreCreateBinaryStatic
This commit is contained in:
parent
437a8fa9d2
commit
ecbfe0f406
@ -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.
|
||||
* }
|
||||
|
Loading…
x
Reference in New Issue
Block a user