Replace <pre> with @code - remaining files (#388)

Co-authored-by: Paul Bartell <pbartell@amazon.com>
Co-authored-by: Ming Yue <mingyue86010@gmail.com>
This commit is contained in:
Zim Kalinowski 2021-09-08 03:03:12 +08:00 committed by GitHub
parent fa0f5c436c
commit f8ada39d85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 421 additions and 381 deletions

View file

@ -44,9 +44,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* vSemaphoreCreateBinary( SemaphoreHandle_t xSemaphore );
* </pre>
* @endcode
*
* In many usage scenarios it is faster and more memory efficient to use a
* direct to task notification in place of a binary semaphore!
@ -74,7 +74,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* @param xSemaphore Handle to the created semaphore. Should be of type SemaphoreHandle_t.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore = NULL;
*
* void vATask( void * pvParameters )
@ -89,7 +89,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // The semaphore can now be used.
* }
* }
* </pre>
* @endcode
* \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary
* \ingroup Semaphores
*/
@ -106,9 +106,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateBinary( void );
* </pre>
* @endcode
*
* Creates a new binary semaphore instance, and returns a handle by which the
* new semaphore can be referenced.
@ -144,7 +144,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* hold the semaphore's data structures could not be allocated.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore = NULL;
*
* void vATask( void * pvParameters )
@ -159,7 +159,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // The semaphore can now be used.
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateBinary xSemaphoreCreateBinary
* \ingroup Semaphores
*/
@ -169,9 +169,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateBinaryStatic( StaticSemaphore_t *pxSemaphoreBuffer );
* </pre>
* @endcode
*
* Creates a new binary semaphore instance, and returns a handle by which the
* new semaphore can be referenced.
@ -204,7 +204,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* returned. If pxSemaphoreBuffer is NULL then NULL is returned.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore = NULL;
* StaticSemaphore_t xSemaphoreBuffer;
*
@ -220,7 +220,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
*
* // Rest of task code goes here.
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateBinaryStatic xSemaphoreCreateBinaryStatic
* \ingroup Semaphores
*/
@ -230,12 +230,12 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* xSemaphoreTake(
* SemaphoreHandle_t xSemaphore,
* TickType_t xBlockTime
* );
* </pre>
* @endcode
*
* <i>Macro</i> to obtain a semaphore. The semaphore must have previously been
* created with a call to xSemaphoreCreateBinary(), xSemaphoreCreateMutex() or
@ -254,7 +254,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* if xBlockTime expired without the semaphore becoming available.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore = NULL;
*
* // A task that creates a semaphore.
@ -291,7 +291,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* }
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreTake xSemaphoreTake
* \ingroup Semaphores
*/
@ -299,12 +299,12 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* xSemaphoreTakeRecursive(
* SemaphoreHandle_t xMutex,
* TickType_t xBlockTime
* );
* </pre>
* @endcode
*
* <i>Macro</i> to recursively obtain, or 'take', a mutex type semaphore.
* The mutex must have previously been created using a call to
@ -335,7 +335,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* expired without the semaphore becoming available.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xMutex = NULL;
*
* // A task that creates a mutex.
@ -386,7 +386,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* }
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreTakeRecursive xSemaphoreTakeRecursive
* \ingroup Semaphores
*/
@ -396,9 +396,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* xSemaphoreGive( SemaphoreHandle_t xSemaphore );
* </pre>
* @endcode
*
* <i>Macro</i> to release a semaphore. The semaphore must have previously been
* created with a call to xSemaphoreCreateBinary(), xSemaphoreCreateMutex() or
@ -419,7 +419,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* semaphore was not first obtained correctly.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore = NULL;
*
* void vATask( void * pvParameters )
@ -453,7 +453,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* }
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreGive xSemaphoreGive
* \ingroup Semaphores
*/
@ -461,9 +461,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* xSemaphoreGiveRecursive( SemaphoreHandle_t xMutex );
* </pre>
* @endcode
*
* <i>Macro</i> to recursively release, or 'give', a mutex type semaphore.
* The mutex must have previously been created using a call to
@ -487,7 +487,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* @return pdTRUE if the semaphore was given.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xMutex = NULL;
*
* // A task that creates a mutex.
@ -539,7 +539,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* }
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreGiveRecursive xSemaphoreGiveRecursive
* \ingroup Semaphores
*/
@ -549,12 +549,12 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* xSemaphoreGiveFromISR(
* SemaphoreHandle_t xSemaphore,
* BaseType_t *pxHigherPriorityTaskWoken
* );
* </pre>
* @endcode
*
* <i>Macro</i> to release a semaphore. The semaphore must have previously been
* created with a call to xSemaphoreCreateBinary() or xSemaphoreCreateCounting().
@ -576,7 +576,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* @return pdTRUE if the semaphore was successfully given, otherwise errQUEUE_FULL.
*
* Example usage:
* <pre>
* @code{c}
\#define LONG_TIME 0xffff
\#define TICKS_TO_WAIT 10
* SemaphoreHandle_t xSemaphore = NULL;
@ -633,7 +633,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // to find the syntax required.
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreGiveFromISR xSemaphoreGiveFromISR
* \ingroup Semaphores
*/
@ -641,12 +641,12 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* xSemaphoreTakeFromISR(
* SemaphoreHandle_t xSemaphore,
* BaseType_t *pxHigherPriorityTaskWoken
* );
* </pre>
* @endcode
*
* <i>Macro</i> to take a semaphore from an ISR. The semaphore must have
* previously been created with a call to xSemaphoreCreateBinary() or
@ -676,9 +676,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateMutex( void );
* </pre>
* @endcode
*
* Creates a new mutex type semaphore instance, and returns a handle by which
* the new mutex can be referenced.
@ -712,7 +712,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* data structures then NULL is returned.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore;
*
* void vATask( void * pvParameters )
@ -727,7 +727,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // The semaphore can now be used.
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateMutex xSemaphoreCreateMutex
* \ingroup Semaphores
*/
@ -737,9 +737,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateMutexStatic( StaticSemaphore_t *pxMutexBuffer );
* </pre>
* @endcode
*
* Creates a new mutex type semaphore instance, and returns a handle by which
* the new mutex can be referenced.
@ -776,7 +776,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* mutex is returned. If pxMutexBuffer was NULL then NULL is returned.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore;
* StaticSemaphore_t xMutexBuffer;
*
@ -790,7 +790,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // As no dynamic memory allocation was performed, xSemaphore cannot be NULL,
* // so there is no need to check it.
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateMutexStatic xSemaphoreCreateMutexStatic
* \ingroup Semaphores
*/
@ -801,9 +801,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateRecursiveMutex( void );
* </pre>
* @endcode
*
* Creates a new recursive mutex type semaphore instance, and returns a handle
* by which the new recursive mutex can be referenced.
@ -845,7 +845,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* SemaphoreHandle_t.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore;
*
* void vATask( void * pvParameters )
@ -860,7 +860,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // The semaphore can now be used.
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateRecursiveMutex xSemaphoreCreateRecursiveMutex
* \ingroup Semaphores
*/
@ -870,9 +870,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateRecursiveMutexStatic( StaticSemaphore_t *pxMutexBuffer );
* </pre>
* @endcode
*
* Creates a new recursive mutex type semaphore instance, and returns a handle
* by which the new recursive mutex can be referenced.
@ -919,7 +919,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* returned.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore;
* StaticSemaphore_t xMutexBuffer;
*
@ -935,7 +935,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // As no dynamic memory allocation was performed, xSemaphore cannot be NULL,
* // so there is no need to check it.
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateRecursiveMutexStatic xSemaphoreCreateRecursiveMutexStatic
* \ingroup Semaphores
*/
@ -945,9 +945,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateCounting( UBaseType_t uxMaxCount, UBaseType_t uxInitialCount );
* </pre>
* @endcode
*
* Creates a new counting semaphore instance, and returns a handle by which the
* new counting semaphore can be referenced.
@ -999,7 +999,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* created.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore;
*
* void vATask( void * pvParameters )
@ -1017,7 +1017,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // The semaphore can now be used.
* }
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateCounting xSemaphoreCreateCounting
* \ingroup Semaphores
*/
@ -1027,9 +1027,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphoreCreateCountingStatic( UBaseType_t uxMaxCount, UBaseType_t uxInitialCount, StaticSemaphore_t *pxSemaphoreBuffer );
* </pre>
* @endcode
*
* Creates a new counting semaphore instance, and returns a handle by which the
* new counting semaphore can be referenced.
@ -1085,7 +1085,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* then NULL is returned.
*
* Example usage:
* <pre>
* @code{c}
* SemaphoreHandle_t xSemaphore;
* StaticSemaphore_t xSemaphoreBuffer;
*
@ -1104,7 +1104,7 @@ typedef QueueHandle_t SemaphoreHandle_t;
* // No memory allocation was attempted so xSemaphore cannot be NULL, so there
* // is no need to check its value.
* }
* </pre>
* @endcode
* \defgroup xSemaphoreCreateCountingStatic xSemaphoreCreateCountingStatic
* \ingroup Semaphores
*/
@ -1114,9 +1114,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr. h
* <pre>
* @code{c}
* void vSemaphoreDelete( SemaphoreHandle_t xSemaphore );
* </pre>
* @endcode
*
* Delete a semaphore. This function must be used with care. For example,
* do not delete a mutex type semaphore if the mutex is held by a task.
@ -1130,9 +1130,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr.h
* <pre>
* @code{c}
* TaskHandle_t xSemaphoreGetMutexHolder( SemaphoreHandle_t xMutex );
* </pre>
* @endcode
*
* If xMutex is indeed a mutex type semaphore, return the current mutex holder.
* If xMutex is not a mutex type semaphore, or the mutex is available (not held
@ -1147,9 +1147,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr.h
* <pre>
* @code{c}
* TaskHandle_t xSemaphoreGetMutexHolderFromISR( SemaphoreHandle_t xMutex );
* </pre>
* @endcode
*
* If xMutex is indeed a mutex type semaphore, return the current mutex holder.
* If xMutex is not a mutex type semaphore, or the mutex is available (not held
@ -1160,9 +1160,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr.h
* <pre>
* @code{c}
* UBaseType_t uxSemaphoreGetCount( SemaphoreHandle_t xSemaphore );
* </pre>
* @endcode
*
* If the semaphore is a counting semaphore then uxSemaphoreGetCount() returns
* its current count value. If the semaphore is a binary semaphore then
@ -1174,9 +1174,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
/**
* semphr.h
* <pre>
* @code{c}
* UBaseType_t uxSemaphoreGetCountFromISR( SemaphoreHandle_t xSemaphore );
* </pre>
* @endcode
*
* If the semaphore is a counting semaphore then uxSemaphoreGetCountFromISR() returns
* its current count value. If the semaphore is a binary semaphore then