drivers/power: PM: Add pm_querystate function
This commit is contained in:
parent
006b7d3963
commit
7d9787d530
|
@ -213,4 +213,23 @@ int pm_changestate(int domain, enum pm_state_e newstate)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pm_querystate
|
||||
*
|
||||
* Description:
|
||||
* This function returns the current power management state.
|
||||
*
|
||||
* Input Parameters:
|
||||
* domain - The PM domain to check
|
||||
*
|
||||
* Returned Value:
|
||||
* The current power management state.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
enum pm_state_e pm_querystate(int domain)
|
||||
{
|
||||
return g_pmglobals.domain[domain].state;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
|
|
|
@ -550,6 +550,22 @@ enum pm_state_e pm_checkstate(int domain);
|
|||
|
||||
int pm_changestate(int domain, enum pm_state_e newstate);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pm_querystate
|
||||
*
|
||||
* Description:
|
||||
* This function returns the current power management state.
|
||||
*
|
||||
* Input Parameters:
|
||||
* domain - The PM domain to check
|
||||
*
|
||||
* Returned Value:
|
||||
* The current power management state.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
enum pm_state_e pm_querystate(int domain);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -575,6 +591,7 @@ int pm_changestate(int domain, enum pm_state_e newstate);
|
|||
# define pm_relax(domain,state)
|
||||
# define pm_checkstate(domain) (0)
|
||||
# define pm_changestate(domain,state)
|
||||
# define pm_querystate(domain) (0)
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
#endif /* __INCLUDE_NUTTX_POWER_PM_H */
|
||||
|
|
Loading…
Reference in New Issue