summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-10-29 19:44:20 +0800
committerGitHub <[email protected]>2018-10-29 19:44:20 +0800
commit7fd434e2f7799dd25379f66f888b1cb8b8453648 (patch)
tree0ba7c1a564a3d250077aef1c40846d87c2c8a071 /components/drivers
parentc904962b5c4468194d690e6d686f26ffaee2689b (diff)
parentf05baecc5a1b35177edcaae3d09c6f9c38819b93 (diff)
Merge pull request #1935 from armink/add_pm
[DeviceDriver][pm] Update pm driver.
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/pm/pm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/drivers/pm/pm.c b/components/drivers/pm/pm.c
index bd8a0a5e95..655c4b4c02 100644
--- a/components/drivers/pm/pm.c
+++ b/components/drivers/pm/pm.c
@@ -238,7 +238,15 @@ void rt_pm_request(rt_ubase_t mode)
* if not, it has already called in rt_pm_exit()
*/
if (pm->current_mode < PM_SLEEP_MODE_START)
+ {
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 */
pm->current_mode = mode;