|
985 | 985 | traceTIMER_COMMAND_RECEIVED( pxTimer, xMessage.xMessageID, xMessage.u.xTimerParameters.xMessageValue ); |
986 | 986 |
|
987 | 987 | /* In this case the xTimerListsWereSwitched parameter is not used, but |
988 | | - * it must be present in the function call. prvSampleTimeNow() must be |
989 | | - * called after the message is received from xTimerQueue so there is no |
990 | | - * possibility of a higher priority task adding a message to the message |
991 | | - * queue with a time that is ahead of the timer daemon task (because it |
992 | | - * pre-empted the timer daemon task after the xTimeNow value was set). */ |
| 988 | + * it must be present in the function call. prvSampleTimeNow() must be |
| 989 | + * called after the message is received from xTimerQueue so there is no |
| 990 | + * possibility of a higher priority task adding a message to the message |
| 991 | + * queue with a time that is ahead of the timer daemon task (because it |
| 992 | + * pre-empted the timer daemon task after the xTimeNow value was set). */ |
993 | 993 | xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); |
994 | 994 |
|
995 | 995 | switch( xMessage.xMessageID ) |
|
1004 | 1004 | if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE ) |
1005 | 1005 | { |
1006 | 1006 | /* The timer expired before it was added to the active |
1007 | | - * timer list. Process it now. */ |
| 1007 | + * timer list. Process it now. */ |
1008 | 1008 | if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0U ) |
1009 | 1009 | { |
1010 | 1010 | prvReloadTimer( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow ); |
|
1038 | 1038 | configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); |
1039 | 1039 |
|
1040 | 1040 | /* The new period does not really have a reference, and can |
1041 | | - * be longer or shorter than the old one. The command time is |
1042 | | - * therefore set to the current time, and as the period cannot |
1043 | | - * be zero the next expiry time can only be in the future, |
1044 | | - * meaning (unlike for the xTimerStart() case above) there is |
1045 | | - * no fail case that needs to be handled here. */ |
| 1041 | + * be longer or shorter than the old one. The command time is |
| 1042 | + * therefore set to the current time, and as the period cannot |
| 1043 | + * be zero the next expiry time can only be in the future, |
| 1044 | + * meaning (unlike for the xTimerStart() case above) there is |
| 1045 | + * no fail case that needs to be handled here. */ |
1046 | 1046 | ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow ); |
1047 | 1047 | break; |
1048 | 1048 |
|
1049 | 1049 | case tmrCOMMAND_DELETE: |
1050 | 1050 | #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) |
1051 | 1051 | { |
1052 | 1052 | /* The timer has already been removed from the active list, |
1053 | | - * just free up the memory if the memory was dynamically |
1054 | | - * allocated. */ |
| 1053 | + * just free up the memory if the memory was dynamically |
| 1054 | + * allocated. */ |
1055 | 1055 | if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 ) |
1056 | 1056 | { |
1057 | 1057 | vPortFree( pxTimer ); |
|
1064 | 1064 | #else /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */ |
1065 | 1065 | { |
1066 | 1066 | /* If dynamic allocation is not enabled, the memory |
1067 | | - * could not have been dynamically allocated. So there is |
1068 | | - * no need to free the memory - just mark the timer as |
1069 | | - * "not active". */ |
| 1067 | + * could not have been dynamically allocated. So there is |
| 1068 | + * no need to free the memory - just mark the timer as |
| 1069 | + * "not active". */ |
1070 | 1070 | pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE ); |
1071 | 1071 | } |
1072 | 1072 | #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ |
|
0 commit comments