Skip to content

Commit

Permalink
Merge pull request #229 from WildernessLabs/feature/battery-backed-pe…
Browse files Browse the repository at this point in the history
…ripheral

add IBatteryBackedPeripheral interface
  • Loading branch information
adrianstevens committed May 16, 2024
2 parents 4478cf8 + 5e71ba9 commit 9bcc04f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Source/Meadow.Contracts/IBatteryBackedPeripheral.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Meadow;

/// <summary>
/// Provides an abstraction for peripherals that have a battery and that can read information about that battery
/// </summary>
public interface IBatteryBackedPeripheral
{
/// <summary>
/// Reads the state of the battery
/// </summary>
/// <returns><b>True</b> if the battery voltage is low, otherwise <b>False</b></returns>
bool IsBatteryLow();
}

0 comments on commit 9bcc04f

Please sign in to comment.