Class Power
- Namespace
- nanoFramework.Hardware.TI
- Assembly
- nanoFramework.Hardware.TI.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 TI targets.
Properties
SourceOfReset
Gets the reset source.
public static Power.ResetSource SourceOfReset { get; }
Property Value
Methods
ConfigureWakeupFromGpioPin(PinWakeupConfig[])
Setup wakeup configuration from GPIO pins.
public static void ConfigureWakeupFromGpioPin(Power.PinWakeupConfig[] pinWakeupConfig)
Parameters
pinWakeupConfig
PinWakeupConfig[]Array of Power.PinWakeupConfig with the configuration for the GPIO pins.
Remarks
This method is used to setup the wakeup configuration from GPIO pins. If there is a need to make further changes to the configuration just call this method again with the new configuration. There is no storage for the configuration nor any method to query the existing configuration, if any. If a GPIO pin has been setup with a wakeup configuration and that needs to be removed, it should be added to the new configuration array with None.
EnterShutdownMode()
Sets the target device to enter TI "shutdown" mode.
public static void EnterShutdownMode()
Remarks
If no wakeup sources configured then it will be a indefinite sleep. This call never returns. After the device enters shutdown 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.
EnterStandbyMode(TimeSpan)
Sets the target device to enter TI "standby" mode.
public static void EnterStandbyMode(TimeSpan duration)
Parameters
duration
TimeSpanDuration of the standby mode.
Remarks
After the device enters standby it will wake-up after the set period of time . Keep in mind that the execution WILL NOT continue after the call to this method.