mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 12:24:07 -04:00
Replace the function that returns the current run time counter value with a macro for easier inlining.
This commit is contained in:
parent
25bc4acc6a
commit
12949b4507
5 changed files with 39 additions and 39 deletions
|
@ -102,29 +102,3 @@ static __interrupt void prvRunTimeStatsOverflowISR( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
inline unsigned long ulGetRunTimeStatsTime( void )
|
||||
{
|
||||
unsigned long ulReturn;
|
||||
|
||||
TA1CTL &= ~MC__CONTINOUS;
|
||||
|
||||
if( ( TA1CTL & TAIFG ) != 0 )
|
||||
{
|
||||
/* An overflow has occurred but not yet been processed. */
|
||||
ulStatsOverflowCount++;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
TA1CTL &= ~TAIFG;
|
||||
}
|
||||
else
|
||||
{
|
||||
__no_operation();
|
||||
}
|
||||
|
||||
ulReturn = ( ulStatsOverflowCount << 16UL );
|
||||
ulReturn |= ( unsigned long ) TA1R;
|
||||
TA1CTL |= MC__CONTINOUS;
|
||||
|
||||
return ulReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue