Пример #1
0
void RtcSetTimeout( uint32_t timeout )
{
    uint32_t timeoutValue = 0;

    timeoutValue = timeout;

    if( timeoutValue < ( 3 * RTC_ALARM_TIME_BASE ) )
    {
        timeoutValue = 3 * RTC_ALARM_TIME_BASE;
    }

    if( timeoutValue < 55000 )
    {
        // we don't go in Low Power mode for delay below 50ms (needed for LEDs)
        RtcTimerEventAllowsLowPower = false;
    }
    else
    {
        RtcTimerEventAllowsLowPower = true;
    }

    if( ( LowPowerDisableDuringTask == false ) && ( RtcTimerEventAllowsLowPower == true ) )
    {
        timeoutValue = timeoutValue - MCU_WAKE_UP_TIME;
    }

    RtcStartWakeUpAlarm( timeoutValue );
}
Пример #2
0
void RtcSetTimeout( uint32_t timeout )
{	
		uint32_t timeoutValue = 0;

		timeoutValue = RtcGetAdjustedTimeoutValue( timeout );//原厂的放在TimerSetTimeout里面

		RtcStartWakeUpAlarm( timeoutValue );
}
Пример #3
0
void RtcSetTimeout( uint32_t timeout )
{
    RtcStartWakeUpAlarm( RtcConvertMsToTick( timeout ) );
}
void RtcSetTimeout( uint32_t timeout )
{
    RtcStartWakeUpAlarm( timeout );
}