diff options
Diffstat (limited to 'pmapi.h')
-rw-r--r-- | pmapi.h | 41 |
1 files changed, 16 insertions, 25 deletions
@@ -23,8 +23,10 @@ #ifndef __POWER_MANAGER_LIBRARY_H__ #define __POWER_MANAGER_LIBRARY_H__ +#include "pmapi_managed.h" + /** - * @defgroup POWER_MANAGER Power manager library + * @defgroup POWER_MANAGER Power manager library * @ingroup SYSTEM_FRAMEWORK * @brief Power manager control API library * @@ -100,8 +102,9 @@ extern "C" { #define SETALL (LCD_DIM | LCD_OFF | LCD_NORMAL) /*< select all state - not supported yet */ /* parameters for pm_lock_state() */ -#define GOTO_STATE_NOW 0x1 #define STAY_CUR_STATE 0x0 +#define GOTO_STATE_NOW 0x1 +#define HOLD_KEY_BLOCK 0x2 /* paramters for pm_unlcok_state() - details are described at 162 line */ #define PM_SLEEP_MARGIN 0x0 /**< keep guard time for unlock */ @@ -115,13 +118,20 @@ extern "C" { * @brief This API is used to lock a particular power-state as the current power-state.\n * The parameter state specifies the power state which you want to lock LCD_NORMAL, LCD_DIM, LCD_OFF. \n * The second parameter Flag is set if you want to go the requested lock state directly.\n - * The third parameter timeout specifies lock-timeout in milliseconds. + * The third parameter timeout specifies lock-timeout in milliseconds. * If the value 0 is selected, the power state remains locked until pm_unlock_state is called. * @param[in] state target power state which you want to lock - LCD_NORMAL, LCD_DIM, LCD_OFF - * @param[in] flag set if you want to go the lock state directly - GOTO_STATE_NOW, STAY_CUR_STATE - * @param[in] timeout lock-timeout in miliseconds. + * @param[in] flag set if you want to go the lock state directly + * GOTO_STATE_NOW - State is changed directly you want to lock. + * STAY_CUR_STATE - State is not changed directly and phone stay current state until timeout expired. + * (Default if there is no value in flag.) + * HOLD_KEY_BLOCK - Hold key is blocked during locking LCD_NORMAL or LCD_DIM. + * Then LCD state transition to LCD_OFF is blocked. + * If this flag is not set, phone state is lcd off after pressing hold key. + * GOTO_STATE_NOW and STAY_CUR_STATE can't be applied at the same time. + * @param[in] timeout lock-timeout in miliseconds. * 0 is always lock until calling pm_unlock_state - * If you call this function with same state in duplicate, + * If you call this function with same state in duplicate, * only last one will be processed and others are ignored. * @return 0 on success, -1 if failed * @see pm_unlock_state(), pm_change_state() @@ -169,25 +179,6 @@ extern "C" { int pm_unlock_state(unsigned int, unsigned int); /** - * @fn int pm_change_state(unsigned int state); - * @brief This API is used to change the power manager state by force. - * @param[in] state power manager state - LCD_NORMAL, LCD_DIM, LCD_OFF - * @return 0 on success, -1 if failed. - * @see pm_lock_state(), pm_unlock_state() - * @pat Example - * @code - * ... - * result = pm_change_state(LCD_OFF); - * if( result < 0 ) - * printf("[ERROR] return value result =%d, \n",result); - * else - * printf("[SUCCESS]return value result =%d \n",result); - * ... - * @endcode - */ - int pm_change_state(unsigned int); - -/** * @} */ |