mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Add descriptive comment for portTIMER_CALLBACK_ATTRIBUTE and move to same line as decorated code
This commit is contained in:
parent
52911682c4
commit
7eafef28c0
2 changed files with 8 additions and 9 deletions
|
@ -654,8 +654,7 @@ const List_t *pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
|
||||||
|
|
||||||
/* For internal use only - execute a 'set bits' command that was pended from
|
/* For internal use only - execute a 'set bits' command that was pended from
|
||||||
an interrupt. */
|
an interrupt. */
|
||||||
portTIMER_CALLBACK_ATTRIBUTE
|
portTIMER_CALLBACK_ATTRIBUTE void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet )
|
||||||
void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet )
|
|
||||||
{
|
{
|
||||||
( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
|
( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
|
||||||
}
|
}
|
||||||
|
@ -663,8 +662,7 @@ void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet
|
||||||
|
|
||||||
/* For internal use only - execute a 'clear bits' command that was pended from
|
/* For internal use only - execute a 'clear bits' command that was pended from
|
||||||
an interrupt. */
|
an interrupt. */
|
||||||
portTIMER_CALLBACK_ATTRIBUTE
|
portTIMER_CALLBACK_ATTRIBUTE void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear )
|
||||||
void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear )
|
|
||||||
{
|
{
|
||||||
( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
|
( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
|
||||||
}
|
}
|
||||||
|
|
11
timers.c
11
timers.c
|
@ -69,15 +69,17 @@ defining trmTIMER_SERVICE_TASK_NAME in FreeRTOSConfig.h. */
|
||||||
#define tmrSTATUS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 0x02 )
|
#define tmrSTATUS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 0x02 )
|
||||||
#define tmrSTATUS_IS_AUTORELOAD ( ( uint8_t ) 0x04 )
|
#define tmrSTATUS_IS_AUTORELOAD ( ( uint8_t ) 0x04 )
|
||||||
|
|
||||||
/* The definition of the timers themselves. */
|
/* The definition of the timers themselves.
|
||||||
|
portTIMER_CALLBACK_ATTRIBUTE can be used to apply an __attribute__ to timer callbacks and timer
|
||||||
|
callback function pointers. In some ports, this attribute enables the compiler to resolve function pointers in static analysis.
|
||||||
|
portTIMER_CALLBACK_ATTRIBUTE defaults as white space unless it is defined by the user. */
|
||||||
typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */
|
||||||
{
|
{
|
||||||
const char *pcTimerName; /*<< Text name. This is not used by the kernel, it is included simply to make debugging easier. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
const char *pcTimerName; /*<< Text name. This is not used by the kernel, it is included simply to make debugging easier. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||||
ListItem_t xTimerListItem; /*<< Standard linked list item as used by all kernel features for event management. */
|
ListItem_t xTimerListItem; /*<< Standard linked list item as used by all kernel features for event management. */
|
||||||
TickType_t xTimerPeriodInTicks;/*<< How quickly and often the timer expires. */
|
TickType_t xTimerPeriodInTicks;/*<< How quickly and often the timer expires. */
|
||||||
void *pvTimerID; /*<< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */
|
void *pvTimerID; /*<< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */
|
||||||
portTIMER_CALLBACK_ATTRIBUTE
|
portTIMER_CALLBACK_ATTRIBUTE TimerCallbackFunction_t pxCallbackFunction; /*<< The function that will be called when the timer expires. */
|
||||||
TimerCallbackFunction_t pxCallbackFunction; /*<< The function that will be called when the timer expires. */
|
|
||||||
#if( configUSE_TRACE_FACILITY == 1 )
|
#if( configUSE_TRACE_FACILITY == 1 )
|
||||||
UBaseType_t uxTimerNumber; /*<< An ID assigned by trace tools such as FreeRTOS+Trace */
|
UBaseType_t uxTimerNumber; /*<< An ID assigned by trace tools such as FreeRTOS+Trace */
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,8 +104,7 @@ typedef struct tmrTimerParameters
|
||||||
|
|
||||||
typedef struct tmrCallbackParameters
|
typedef struct tmrCallbackParameters
|
||||||
{
|
{
|
||||||
portTIMER_CALLBACK_ATTRIBUTE
|
portTIMER_CALLBACK_ATTRIBUTE PendedFunction_t pxCallbackFunction; /* << The callback function to execute. */
|
||||||
PendedFunction_t pxCallbackFunction; /* << The callback function to execute. */
|
|
||||||
void *pvParameter1; /* << The value that will be used as the callback functions first parameter. */
|
void *pvParameter1; /* << The value that will be used as the callback functions first parameter. */
|
||||||
uint32_t ulParameter2; /* << The value that will be used as the callback functions second parameter. */
|
uint32_t ulParameter2; /* << The value that will be used as the callback functions second parameter. */
|
||||||
} CallbackParameters_t;
|
} CallbackParameters_t;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue