Skip to main content

Interface ISleepAwarePeripheral

Provides an abstraction for peripherals that can be notified of sleep state changes

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

Methods

BeforeSleep(CancellationToken)

Called before the platform goes into Sleep state

View Source
Declaration
Task BeforeSleep(CancellationToken cancellationToken)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokencancellationToken

AfterWake(CancellationToken)

Called after the platform returns to Wake state

View Source
Declaration
Task AfterWake(CancellationToken cancellationToken)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokencancellationToken