From f4c975bf8c12b01eda8ef6f67b682d3d96fc3f28 Mon Sep 17 00:00:00 2001 From: "sc943313837@gmail.com" Date: Sat, 15 Sep 2012 12:52:48 +0000 Subject: [PATCH] delete pm.h git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2290 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/drivers/include/drivers/pm.h | 80 ------------------------- 1 file changed, 80 deletions(-) delete mode 100644 components/drivers/include/drivers/pm.h diff --git a/components/drivers/include/drivers/pm.h b/components/drivers/include/drivers/pm.h deleted file mode 100644 index 042acb2be4..0000000000 --- a/components/drivers/include/drivers/pm.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * File : pm.h - * COPYRIGHT (C) 2012, Shanghai Real-Thread Technology Co., Ltd - * - * All rights reserved. - * - * Change Logs: - * Date Author Notes - * 2012-06-02 Bernard the first version - */ - -#ifndef __PM_H__ -#define __PM_H__ - -#include - -#ifdef RT_USING_PM -enum -{ - PM_HIGHSPEED_MODE = 0, /* mode 0 */ - PM_RUNNING_MODE, /* mode 1 */ - PM_SLEEP_MODE, /* mode 2 */ - PM_DEEPSLEEP_MODE, /* mode 3 */ - PM_TIMER_MODE, /* mode 4 */ - PM_DEEPTIMER_MODE, /* mode 5 */ - PM_SHUTDOWN_MODE, /* mode 6 */ - PM_DEEPSHUTDOWN_MODE, /* mode 7 */ - PM_MODE_MAX = PM_DEEPSHUTDOWN_MODE, -}; - -#define RT_PM_DEVICE(device) (struct rt_pm*)(device) - -/** - * device control flag to request or release power - */ -#define RT_PM_DEVICE_CTRL_REQUEST 0x01 -#define RT_PM_DEVICE_CTRL_RELEASE 0x02 - -struct rt_pm; -/** - * low power mode operations - */ -struct rt_pm_ops -{ - void (*enter)(struct rt_pm *pm); - void (*exit)(struct rt_pm *pm); - - void (*timer_start)(struct rt_pm *pm, rt_uint32_t timeout); - void (*timer_stop)(struct rt_pm *pm); - rt_uint32_t (*timer_get_tick)(struct rt_pm *pm); -}; - -/** - * power management - */ -struct rt_pm -{ - struct rt_device parent; - rt_uint8_t mode[PM_MODE_MAX + 1]; - rt_uint8_t pm_mode; /* current pm mode */ - rt_uint8_t timer_mask; - - rt_uint32_t pm_tick; - - const struct rt_pm_ops *ops; -}; - - - -void rt_pm_enter(void); -void rt_pm_exit(void); -void rt_pm_request(rt_ubase_t mode); -void rt_pm_release(rt_ubase_t mode); - -void rt_system_pm_init(const struct rt_pm_ops *ops, rt_uint8_t timer_mask, - void *user_data); - -#endif - -#endif