|
|
@ -263,6 +263,7 @@ void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime )
|
|
|
|
uint32_t ulAlarmValue, ulCompleteTickPeriods;
|
|
|
|
uint32_t ulAlarmValue, ulCompleteTickPeriods;
|
|
|
|
eSleepModeStatus eSleepAction;
|
|
|
|
eSleepModeStatus eSleepAction;
|
|
|
|
portTickType xModifiableIdleTime;
|
|
|
|
portTickType xModifiableIdleTime;
|
|
|
|
|
|
|
|
enum sleepmgr_mode xSleepMode;
|
|
|
|
|
|
|
|
|
|
|
|
/* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */
|
|
|
|
/* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */
|
|
|
|
|
|
|
|
|
|
|
@ -331,9 +332,15 @@ portTickType xModifiableIdleTime;
|
|
|
|
means the application defined code has already executed the WAIT
|
|
|
|
means the application defined code has already executed the WAIT
|
|
|
|
instruction. */
|
|
|
|
instruction. */
|
|
|
|
if( xModifiableIdleTime > 0 )
|
|
|
|
if( xModifiableIdleTime > 0 )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/* Find the deepest allowable sleep mode. */
|
|
|
|
|
|
|
|
xSleepMode = sleepmgr_get_sleep_mode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( xSleepMode != SLEEPMGR_ACTIVE )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* Sleep until something happens. */
|
|
|
|
/* Sleep until something happens. */
|
|
|
|
sleepmgr_enter_sleep();
|
|
|
|
bpm_sleep( BPM, xSleepMode );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Allow the application to define some post sleep processing. */
|
|
|
|
/* Allow the application to define some post sleep processing. */
|
|
|
@ -347,7 +354,6 @@ portTickType xModifiableIdleTime;
|
|
|
|
|
|
|
|
|
|
|
|
/* Re-enable interrupts - see comments above the cpsid instruction()
|
|
|
|
/* Re-enable interrupts - see comments above the cpsid instruction()
|
|
|
|
above. */
|
|
|
|
above. */
|
|
|
|
#warning The sleep manager will have re-enabled interrupts already, does this matter?
|
|
|
|
|
|
|
|
__asm volatile( "cpsie i" );
|
|
|
|
__asm volatile( "cpsie i" );
|
|
|
|
|
|
|
|
|
|
|
|
if( ulTickFlag != pdFALSE )
|
|
|
|
if( ulTickFlag != pdFALSE )
|
|
|
|