nrfx 3.3
Data Structures | Macros | Typedefs | Enumerations | Functions
Power Management

Helper layer that provides support for nrfx_pm interface. This file contains functionality that should be used only from inside drivers. More...

Data Structures

struct  nrfx_pm_t
 Internal power management structure. More...
 

Macros

#define NRFX_PM_DEFAULT_CONFIG(_transition_handler)
 Power Management default configuration. This configuration must be used internally in the drivers.
 

Typedefs

typedef nrfx_err_t(* nrfx_pm_transition_handler_t) (nrfx_pm_operation_t operation)
 Power management transition handler type.
 

Enumerations

enum  nrfx_pm_state_t {
  NRFX_PM_STATE_OFF ,
  NRFX_PM_STATE_WAKING_UP ,
  NRFX_PM_STATE_ON ,
  NRFX_PM_STATE_POWERING_DOWN
}
 Work states of the internal Power Management finite-state machine. More...
 
enum  nrfx_pm_operation_t {
  NRFX_PM_OPERATION_TURN_OFF ,
  NRFX_PM_OPERATION_TURN_ON
}
 Operations that can be triggered on the driver instance. More...
 

Functions

void nrfx_pm_notify (nrfx_pm_t *p_pm)
 Function to be called when power up or power down procedure is finished.
 
bool nrfx_pm_is_powered (nrfx_pm_t *p_pm)
 Function for checking if the peripheral is powered.
 
void nrfx_pm_busy_set (nrfx_pm_t *p_pm, bool is_busy)
 Fuction for setting the busy state.
 
void nrfx_pm_powered_set (nrfx_pm_t *p_pm)
 Function for setting the powered status.
 

Detailed Description

Helper layer that provides support for nrfx_pm interface. This file contains functionality that should be used only from inside drivers.

Macro Definition Documentation

◆ NRFX_PM_DEFAULT_CONFIG

#define NRFX_PM_DEFAULT_CONFIG (   _transition_handler)
Value:
{ \
.transition_handler = _transition_handler, \
.event_handler = NULL, \
.current_state = NRFX_PM_STATE_OFF, \
.required_state = NRFX_PM_STATE_OFF, \
.peripheral_busy = false \
}
@ NRFX_PM_STATE_OFF
Last completed state of the machine is Power Off.
Definition: nrfx_pm_driver.h:22

Power Management default configuration. This configuration must be used internally in the drivers.

Parameters
[in]_transition_handlerTransition handler provided by driver.

Enumeration Type Documentation

◆ nrfx_pm_operation_t

Operations that can be triggered on the driver instance.

Enumerator
NRFX_PM_OPERATION_TURN_OFF 

Turn off instance of the peripheral.

NRFX_PM_OPERATION_TURN_ON 

Turn on instance of the peripheral.

◆ nrfx_pm_state_t

Work states of the internal Power Management finite-state machine.

Enumerator
NRFX_PM_STATE_OFF 

Last completed state of the machine is Power Off.

NRFX_PM_STATE_WAKING_UP 

Last completed state of the machine is Waking Up.

NRFX_PM_STATE_ON 

Last completed state of the machine is Power On.

NRFX_PM_STATE_POWERING_DOWN 

Last completed state of the machine is Powering Down.

Function Documentation

◆ nrfx_pm_busy_set()

void nrfx_pm_busy_set ( nrfx_pm_t p_pm,
bool  is_busy 
)

Fuction for setting the busy state.

Parameters
[in]p_pmPointer to the instance of driver's power management structure.
[in]is_busyTrue if the busy state is to be enabled, false otherwise.

◆ nrfx_pm_is_powered()

bool nrfx_pm_is_powered ( nrfx_pm_t p_pm)

Function for checking if the peripheral is powered.

Parameters
[in]p_pmPointer to the instance of driver's power management structure.
Return values
truePeripheral instance is powered on.
falsePeripheral instance is powered off.

◆ nrfx_pm_notify()

void nrfx_pm_notify ( nrfx_pm_t p_pm)

Function to be called when power up or power down procedure is finished.

Parameters
[in]p_pmPointer to the instance of driver's power management structure.

◆ nrfx_pm_powered_set()

void nrfx_pm_powered_set ( nrfx_pm_t p_pm)

Function for setting the powered status.

Parameters
[in]p_pmPointer to the instance of driver's power management structure.

Documentation feedback | Developer Zone | Subscribe | Updated