[DeviceDriver][pm] Update pm driver.

This commit is contained in:
armink 2018-10-29 19:02:31 +08:00
parent 2d59fe0310
commit f05baecc5a
1 changed files with 8 additions and 0 deletions

View File

@ -238,7 +238,15 @@ void rt_pm_request(rt_ubase_t mode)
* if not, it has already called in rt_pm_exit() * if not, it has already called in rt_pm_exit()
*/ */
if (pm->current_mode < PM_SLEEP_MODE_START) if (pm->current_mode < PM_SLEEP_MODE_START)
{
pm->ops->exit(pm); pm->ops->exit(pm);
}
else if (pm->exit_count)
{
/* call exeit when global interrupt is disable */
pm->ops->exit(pm);
pm->exit_count = 0;
}
/* update current mode */ /* update current mode */
pm->current_mode = mode; pm->current_mode = mode;