tree: 40119e9bf33a09c6dfed59f4cc4d1dddf0465511 [path history] [tgz]
  1. suspend_config/
  2. unmanaged_element/
  3. wake_lease/
  4. BUILD.gn
  5. OWNERS
  6. README.md
examples/power/README.md

Power Framework Examples

Examples that demonstrate power concepts.

Get started by adding power examples to your fx args:

fx set core.x64 --with //examples/power --with-test //examples/power:hermetic_tests

Make sure to run fx build and fx serve if it's your first time setting up these examples.

You can then run all example tests using fx test.

Power Topology

Concepts from https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0250_power_topology.

Examples below include recommended unit and integration tests.

Taking a Wake Lease

Prevent system suspend by requesting a wake lease from the System Activity Governor.

Unmanaged Element

Control unmanaged power elements without dependencies to report power states to Power Framework.