ISF  1.1
Intelligent Sensing Framework
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Include/isf_pm.h File Reference

isf_pm.h describes the API definitions, types, and macros for the Intelligent Sensing Framework (ISF) Power Manager (PM). More...

Go to the source code of this file.

Typedefs

typedef pm_power_level_enum power_level_t
 Type for the power levels supported by the Power Manager.

Enumerations

enum  pm_power_level_enum { ISF_POWER_NORMAL = 1, ISF_POWER_LOW = 2, ISF_POWER_LOWEST = 3, ISF_POWER_SLEEP = 4 }
 ISF power management settings. More...

Functions

isf_status_t pm_init (void)
 This API initializes the Power Manager.
power_level_t isf_power_set (power_level_t aLevel)
 This API sets the requested power level for power management.
power_level_t isf_power_get (void)
 This API returns the current power level for power management.

Detailed Description

isf_pm.h describes the API definitions, types, and macros for the Intelligent Sensing Framework (ISF) Power Manager (PM).

Definition in file isf_pm.h.


Typedef Documentation

Type for the power levels supported by the Power Manager.

Definition at line 68 of file isf_pm.h.


Enumeration Type Documentation

ISF power management settings.

Enumerator:
ISF_POWER_NORMAL 

At the normal power level, the CPU and clocks are active.

ISF_POWER_LOW 

At the low power level, the CPU stops and the peripheral clocks continue to run at full speed. The system is awakened by interrupts.

ISF_POWER_LOWEST 

At the very lowest power level, the CPU stops and the internal clocks run at reduced speed. The system is awakened by interrupts.

ISF_POWER_SLEEP 

At the sleep level, the CPU and clocks are stopped. The system is awakened by host access to the slave port or the external interrupt pin.

Definition at line 39 of file isf_pm.h.


Function Documentation

This API returns the current power level for power management.

The current power level setting of the Power Manager is returned.

Returns:
isf_power_get() returns a value of type power_level_t indicating the current power setting.
Constraints:
The following constraints must be observed when using this function. If these constraints are not met, this API returns an error.
  • pm_init() must be invoked prior to using this function.
Reentrant: Yes
Link Libraries:
isf_core.lib
See also:
isf_power_set(), power_level_t

This API sets the requested power level for power management.

The Power Manager provides the capability to automatically control the power mode when the system is idle. Part of the power management is an idle task running at the lowest system priority. When all higher-priority tasks are blocked waiting for events, the idle task is executed. In the idle task, the system power state is set to one of the states described by the pm_power_level_enum values as specified as the argument to this API call.

The user may retrieves the current power level setting by invoking isf_power_get().

Parameters:
[in]aLevelPower level of type power_level_t to set in the Power Manager.
Returns:
isf_power_set() returns a value of type power_level_t indicating the aLevel power setting. If aLevel is invalid, then the current power setting is returned.
Constraints:
The following constraints must be observed when using this function. If these constraints are not met, this API returns an error.
  • pm_init() must be invoked prior to using this function.
Reentrant: Yes
Link Libraries:
isf_core.lib
See also:
isf_power_get(), power_level_t
isf_status_t pm_init ( void  )

This API initializes the Power Manager.

The Power Manager requires a one-time initialization at system startup performed by this API call. It creates and initializes internal variables, and installs an interrupt service routine for the digital frame interrupt.

Returns:
isf_status_t pm_init() returns a value of type isf_status_t indicating the status of the initialization operation.
Return values:
ISF_SUCCESSThe initialization completes successfully.
ISF_ERR_LIB_INITThe interrupt service routine for the FXLC95000 digital frame interrupt could not be installed.
Constraints:
None
Reentrant: No
Link Libraries:
isf_core.lib

Referenced by isf_lib_init().