/* Configures the wake conditions for the Hibernation module. */
void HibernateWakeSet(uint32_t ui32WakeFlags)
/* Configures the wake conditions for the Hibernation module. */
void HibernateWakeSet(uint32_t ui32WakeFlags)
{
    ASSERT(!(ui32WakeFlags & ~(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC |
                               HIBERNATE_WAKE_LOW_BAT)));
    HWREG(HIB_CTL) = (ui32WakeFlags | (HWREG(HIB_CTL) &
                                       ~(HIBERNATE_WAKE_PIN |
                                         HIBERNATE_WAKE_RTC |
                                         HIBERNATE_WAKE_LOW_BAT)));
    _HibernateWriteComplete();
}