Skip to main content

Interface IPowerController

Interface for controlling power-related functionality of the device.

Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IPowerController

Methods

Reset()

Resets the device.

View Source
Declaration
void Reset()

Sleep(TimeSpan)

Puts the device into low-power (sleep) mode for the specified amount of time.

View Source
Declaration
void Sleep(TimeSpan duration)
Parameters
TypeNameDescription
System.TimeSpandurationThe amount of time to sleep.

Sleep(DateTime)

Puts the device into low-power (sleep) mode until the specified time.

View Source
Declaration
void Sleep(DateTime wakeTime)
Parameters
TypeNameDescription
System.DateTimewakeTimeThe UTC time to wake.

Sleep(IPin, InterruptMode, ResistorMode)

Puts the device into low-power (sleep) mode until an interrupt occurs

View Source
Declaration
void Sleep(IPin interruptPin, InterruptMode interruptMode, ResistorMode resistorMode = ResistorMode.Disabled)
Parameters
TypeNameDescription
Meadow.Hardware.IPininterruptPinThe IPin to monitor for the wake interrupt.
Meadow.Hardware.InterruptModeinterruptModeThe interrupt mode used for wake
Meadow.Hardware.ResistorModeresistorModeThe resistor mode used for wake

RegisterForSleep(ISleepAwarePeripheral)

Registers a peripheral to be aware of sleep mode.

View Source
Declaration
void RegisterForSleep(ISleepAwarePeripheral peripheral)
Parameters
TypeNameDescription
Meadow.ISleepAwarePeripheralperipheralThe peripheral to register.

Events

BeforeReset

Event called before a software reset.

View Source
Declaration
event PowerTransitionHandler BeforeReset
Event Type

Meadow.PowerTransitionHandler

BeforeSleep

Event called before entering sleep mode.

View Source
Declaration
event PowerTransitionHandler BeforeSleep
Event Type

Meadow.PowerTransitionHandler

AfterWake

Event called after waking from sleep mode.

View Source
Declaration
event EventHandler<WakeSource> AfterWake
Event Type

System.EventHandler<Meadow.Hardware.WakeSource>