Class Power
- Namespace
- nanoFramework.Hardware.Stm32
- Assembly
- nanoFramework.Hardware.Stm32.dll
Provides methods to control power mode of the target CPU.
public static class Power
- Inheritance
-
Power
- Inherited Members
Remarks
This API is available only for SMT32 targets.
Properties
WakeupReason
Gets the reason for device wakeup.
public static Power.WakeupReasonType WakeupReason { get; }
Property Value
Methods
DisableWakeupPin(WakeupPin)
Disables the specified pin
as wake-up source.
public static void DisableWakeupPin(Power.WakeupPin pin = WakeupPin.Pin1)
Parameters
Remarks
The wake-up pin availability is target dependent. Check the target device data-sheet for details. If the specified pin is not available an ArgumentException is thrown.
EnableWakeupPin(WakeupPin)
Enables the specified pin
as wake-up source.
public static void EnableWakeupPin(Power.WakeupPin pin = WakeupPin.Pin1)
Parameters
Remarks
The wake-up pin availability is target dependent. Check the target device data-sheet for details. If the specified pin is not available an ArgumentException is thrown.
EnterStandbyMode()
Sets the target device to enter STM32 "standby" mode.
public static void EnterStandbyMode()
Remarks
If no wakeup sources configured then it will be a indefinite sleep. This call never returns. After the device enters standby a wakeup source will wake the device and the execution will start as if it was a reset. Keep in mind that the execution WILL NOT continue after the call to this method.