/* Configures and enters in SLEEP low power mode.  */
void POWER_EnterSleep(void)
/* Configures and enters in SLEEP low power mode.  */
void POWER_EnterSleep(void)
{
    uint32_t pmsk;
    pmsk = __get_PRIMASK();
    __disable_irq();
    SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
    __WFI();
    __set_PRIMASK(pmsk);
}