Replace <pre> with @code{c} (#386)

* replace <pre> with @code{c}

* endcode must pass spellcheck
This commit is contained in:
Zim Kalinowski 2021-09-01 00:04:36 +08:00 committed by GitHub
parent c290780e34
commit ae73f0de41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 52 deletions

1
.github/lexicon.txt vendored
View file

@ -561,6 +561,7 @@ enablerx
enabletx enabletx
enametoolong enametoolong
endbusres endbusres
endcode
endian endian
endif endif
endinit endinit

View file

@ -96,9 +96,9 @@ typedef TickType_t EventBits_t;
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventGroupHandle_t xEventGroupCreate( void ); * EventGroupHandle_t xEventGroupCreate( void );
* </pre> * @endcode
* *
* Create a new event group. * Create a new event group.
* *
@ -125,7 +125,7 @@ typedef TickType_t EventBits_t;
* event group then NULL is returned. See https://www.FreeRTOS.org/a00111.html * event group then NULL is returned. See https://www.FreeRTOS.org/a00111.html
* *
* Example usage: * Example usage:
* <pre> * @code{c}
* // Declare a variable to hold the created event group. * // Declare a variable to hold the created event group.
* EventGroupHandle_t xCreatedEventGroup; * EventGroupHandle_t xCreatedEventGroup;
* *
@ -142,7 +142,7 @@ typedef TickType_t EventBits_t;
* { * {
* // The event group was created. * // The event group was created.
* } * }
* </pre> * @endcode
* \defgroup xEventGroupCreate xEventGroupCreate * \defgroup xEventGroupCreate xEventGroupCreate
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -152,9 +152,9 @@ typedef TickType_t EventBits_t;
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventGroupHandle_t xEventGroupCreateStatic( EventGroupHandle_t * pxEventGroupBuffer ); * EventGroupHandle_t xEventGroupCreateStatic( EventGroupHandle_t * pxEventGroupBuffer );
* </pre> * @endcode
* *
* Create a new event group. * Create a new event group.
* *
@ -184,7 +184,7 @@ typedef TickType_t EventBits_t;
* returned. If pxEventGroupBuffer was NULL then NULL is returned. * returned. If pxEventGroupBuffer was NULL then NULL is returned.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
* // StaticEventGroup_t is a publicly accessible structure that has the same * // StaticEventGroup_t is a publicly accessible structure that has the same
* // size and alignment requirements as the real event group structure. It is * // size and alignment requirements as the real event group structure. It is
* // provided as a mechanism for applications to know the size of the event * // provided as a mechanism for applications to know the size of the event
@ -197,7 +197,7 @@ typedef TickType_t EventBits_t;
* *
* // Create the event group without dynamically allocating any memory. * // Create the event group without dynamically allocating any memory.
* xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer ); * xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer );
* </pre> * @endcode
*/ */
#if ( configSUPPORT_STATIC_ALLOCATION == 1 ) #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
EventGroupHandle_t xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer ) PRIVILEGED_FUNCTION; EventGroupHandle_t xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer ) PRIVILEGED_FUNCTION;
@ -205,13 +205,13 @@ typedef TickType_t EventBits_t;
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, * EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
* const EventBits_t uxBitsToWaitFor, * const EventBits_t uxBitsToWaitFor,
* const BaseType_t xClearOnExit, * const BaseType_t xClearOnExit,
* const BaseType_t xWaitForAllBits, * const BaseType_t xWaitForAllBits,
* const TickType_t xTicksToWait ); * const TickType_t xTicksToWait );
* </pre> * @endcode
* *
* [Potentially] block to wait for one or more bits to be set within a * [Potentially] block to wait for one or more bits to be set within a
* previously created event group. * previously created event group.
@ -255,9 +255,9 @@ typedef TickType_t EventBits_t;
* pdTRUE. * pdTRUE.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
#define BIT_0 ( 1 << 0 ) * #define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 ) * #define BIT_4 ( 1 << 4 )
* *
* void aFunction( EventGroupHandle_t xEventGroup ) * void aFunction( EventGroupHandle_t xEventGroup )
* { * {
@ -291,7 +291,7 @@ typedef TickType_t EventBits_t;
* // without either BIT_0 or BIT_4 becoming set. * // without either BIT_0 or BIT_4 becoming set.
* } * }
* } * }
* </pre> * @endcode
* \defgroup xEventGroupWaitBits xEventGroupWaitBits * \defgroup xEventGroupWaitBits xEventGroupWaitBits
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -303,9 +303,9 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ); * EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear );
* </pre> * @endcode
* *
* Clear bits within an event group. This function cannot be called from an * Clear bits within an event group. This function cannot be called from an
* interrupt. * interrupt.
@ -319,9 +319,9 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
* @return The value of the event group before the specified bits were cleared. * @return The value of the event group before the specified bits were cleared.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
#define BIT_0 ( 1 << 0 ) * #define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 ) * #define BIT_4 ( 1 << 4 )
* *
* void aFunction( EventGroupHandle_t xEventGroup ) * void aFunction( EventGroupHandle_t xEventGroup )
* { * {
@ -352,7 +352,7 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
* // Neither bit 0 nor bit 4 were set in the first place. * // Neither bit 0 nor bit 4 were set in the first place.
* } * }
* } * }
* </pre> * @endcode
* \defgroup xEventGroupClearBits xEventGroupClearBits * \defgroup xEventGroupClearBits xEventGroupClearBits
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -361,9 +361,9 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ); * BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );
* </pre> * @endcode
* *
* A version of xEventGroupClearBits() that can be called from an interrupt. * A version of xEventGroupClearBits() that can be called from an interrupt.
* *
@ -388,9 +388,9 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
* if the timer service queue was full. * if the timer service queue was full.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
#define BIT_0 ( 1 << 0 ) * #define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 ) * #define BIT_4 ( 1 << 4 )
* *
* // An event group which it is assumed has already been created by a call to * // An event group which it is assumed has already been created by a call to
* // xEventGroupCreate(). * // xEventGroupCreate().
@ -408,7 +408,7 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
* // The message was posted successfully. * // The message was posted successfully.
* } * }
* } * }
* </pre> * @endcode
* \defgroup xEventGroupClearBitsFromISR xEventGroupClearBitsFromISR * \defgroup xEventGroupClearBitsFromISR xEventGroupClearBitsFromISR
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -422,9 +422,9 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ); * EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );
* </pre> * @endcode
* *
* Set bits within an event group. * Set bits within an event group.
* This function cannot be called from an interrupt. xEventGroupSetBitsFromISR() * This function cannot be called from an interrupt. xEventGroupSetBitsFromISR()
@ -450,9 +450,9 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
* event group value before the call to xEventGroupSetBits() returns. * event group value before the call to xEventGroupSetBits() returns.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
#define BIT_0 ( 1 << 0 ) * #define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 ) * #define BIT_4 ( 1 << 4 )
* *
* void aFunction( EventGroupHandle_t xEventGroup ) * void aFunction( EventGroupHandle_t xEventGroup )
* { * {
@ -488,7 +488,7 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
* // cleared as the task left the Blocked state. * // cleared as the task left the Blocked state.
* } * }
* } * }
* </pre> * @endcode
* \defgroup xEventGroupSetBits xEventGroupSetBits * \defgroup xEventGroupSetBits xEventGroupSetBits
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -497,9 +497,9 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken ); * BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken );
* </pre> * @endcode
* *
* A version of xEventGroupSetBits() that can be called from an interrupt. * A version of xEventGroupSetBits() that can be called from an interrupt.
* *
@ -532,9 +532,9 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
* if the timer service queue was full. * if the timer service queue was full.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
#define BIT_0 ( 1 << 0 ) * #define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 ) * #define BIT_4 ( 1 << 4 )
* *
* // An event group which it is assumed has already been created by a call to * // An event group which it is assumed has already been created by a call to
* // xEventGroupCreate(). * // xEventGroupCreate().
@ -563,7 +563,7 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken ); * portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
* } * }
* } * }
* </pre> * @endcode
* \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR * \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -578,12 +578,12 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup, * EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
* const EventBits_t uxBitsToSet, * const EventBits_t uxBitsToSet,
* const EventBits_t uxBitsToWaitFor, * const EventBits_t uxBitsToWaitFor,
* TickType_t xTicksToWait ); * TickType_t xTicksToWait );
* </pre> * @endcode
* *
* Atomically set bits within an event group, then wait for a combination of * Atomically set bits within an event group, then wait for a combination of
* bits to be set within the same event group. This functionality is typically * bits to be set within the same event group. This functionality is typically
@ -622,13 +622,13 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
* automatically cleared. * automatically cleared.
* *
* Example usage: * Example usage:
* <pre> * @code{c}
* // Bits used by the three tasks. * // Bits used by the three tasks.
#define TASK_0_BIT ( 1 << 0 ) * #define TASK_0_BIT ( 1 << 0 )
#define TASK_1_BIT ( 1 << 1 ) * #define TASK_1_BIT ( 1 << 1 )
#define TASK_2_BIT ( 1 << 2 ) * #define TASK_2_BIT ( 1 << 2 )
* *
#define ALL_SYNC_BITS ( TASK_0_BIT | TASK_1_BIT | TASK_2_BIT ) * #define ALL_SYNC_BITS ( TASK_0_BIT | TASK_1_BIT | TASK_2_BIT )
* *
* // Use an event group to synchronise three tasks. It is assumed this event * // Use an event group to synchronise three tasks. It is assumed this event
* // group has already been created elsewhere. * // group has already been created elsewhere.
@ -696,7 +696,7 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
* } * }
* } * }
* *
* </pre> * @endcode
* \defgroup xEventGroupSync xEventGroupSync * \defgroup xEventGroupSync xEventGroupSync
* \ingroup EventGroup * \ingroup EventGroup
*/ */
@ -708,9 +708,9 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventBits_t xEventGroupGetBits( EventGroupHandle_t xEventGroup ); * EventBits_t xEventGroupGetBits( EventGroupHandle_t xEventGroup );
* </pre> * @endcode
* *
* Returns the current value of the bits in an event group. This function * Returns the current value of the bits in an event group. This function
* cannot be used from an interrupt. * cannot be used from an interrupt.
@ -726,9 +726,9 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ); * EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup );
* </pre> * @endcode
* *
* A version of xEventGroupGetBits() that can be called from an ISR. * A version of xEventGroupGetBits() that can be called from an ISR.
* *
@ -743,9 +743,9 @@ EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ) PRIVILEG
/** /**
* event_groups.h * event_groups.h
* <pre> * @code{c}
* void xEventGroupDelete( EventGroupHandle_t xEventGroup ); * void xEventGroupDelete( EventGroupHandle_t xEventGroup );
* </pre> * @endcode
* *
* Delete an event group that was previously created by a call to * Delete an event group that was previously created by a call to
* xEventGroupCreate(). Tasks that are blocked on the event group will be * xEventGroupCreate(). Tasks that are blocked on the event group will be