1.17.14.3 POWER_WakeupSourceGet Function

C

POWER_WAKEUP_SOURCE POWER_WakeupSourceGet( void );

Summary

Returns the source of wakeup from deep sleep

Description

This function returns the name of the source which woke up the device from deep sleep.

Precondition

None.

Parameters

None.

Returns

POWER_WAKEUP_SOURCE - wakeup source

Example

if (POWER_WakeupSourceGet() == POWER_WAKEUP_SOURCE_DSINT0)
{
    // wakeup source was INT0
}

Remarks

This function is only available for the devices which has deep sleep controller. MHC will generate this function only for the selected devices accordingly. Check device datasheet for more information.