Module lpc82x_hal::pmu[][src]

API for the Power Management Unit (PMU)

The entry point to this API is PMU. Please refer to PMU's documentation for additional information.

The PMU is described in the user manual, chapter 6.

Examples

Use the PMU to enter sleep mode:

use lpc82x_hal::{
    raw,
    Peripherals,
};

let mut cp = raw::CorePeripherals::take().unwrap();
let mut p  = Peripherals::take().unwrap();

let mut pmu = p.pmu.split();

// Enters sleep mode. Unless we set up some interrupts, we won't wake up
// from this again.
pmu.handle.enter_sleep_mode(&mut cp.SCB);

Please refer to the examples in the repository for more example code.

Structs

Handle

Handle to the PMU peripheral

LowPowerClock

The 10 kHz low-power clock

PMU

Entry point to the PMU API

Parts

The main API for the PMU peripheral