Skip to content

Commit

Permalink
Merge pull request #226 from WildernessLabs/feature/rtc
Browse files Browse the repository at this point in the history
added IRealTimeClock interface
  • Loading branch information
adrianstevens committed May 4, 2024
2 parents 17403d3 + f899a11 commit 05ce4d3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Source/Meadow.Contracts/Peripherals/IRealTimeClock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;

namespace Meadow.Hardware;

/// <summary>
/// Abstraction for Real-time clock devices
/// </summary>
public interface IRealTimeClock
{
/// <summary>
/// Stops or starts the clock oscillator
/// </summary>
public bool IsRunning { get; set; }

/// <summary>
/// Reads the RTC time
/// </summary>
/// <returns></returns>
public DateTimeOffset GetTime();
/// <summary>
/// Sets the RTC time
/// </summary>
/// <param name="time"></param>
public void SetTime(DateTimeOffset time);
}

0 comments on commit 05ce4d3

Please sign in to comment.