/* This function returns the flags representing the wake configuration for the Hibernation module. The return value is a combination of the following flags: */
uint32_t HibernateWakeGet(void)
/* This function returns the flags representing the wake configuration for the Hibernation module. The return value is a combination of the following flags: */
uint32_t HibernateWakeGet(void)
{
    uint32_t ui32Ctrl;
    if(HIBERNATE_WAKE_IO)
    {
        ui32Ctrl = HWREG(HIB_CTL);
        return((ui32Ctrl & (HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC |
                            HIBERNATE_WAKE_LOW_BAT)) |
               ((HWREG(HIB_IO) << 16) & (HIBERNATE_WAKE_RESET |
                                         HIBERNATE_WAKE_GPIO)));
    }
    else
    {
        return(HWREG(HIB_CTL) & (HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC |
                                 HIBERNATE_WAKE_LOW_BAT));
    }
}