//===================================================================== // SetTime //===================================================================== public void SetTime(RTCTime timeStruct) { // Create array to set the time byte[] timeArray = new byte[] { 0x00, // Stop oscillator ToBCD(timeStruct.second), ToBCD(timeStruct.minute), ToBCD(timeStruct.hour), ToBCD((byte)(timeStruct.weekday + 1)), ToBCD(timeStruct.day), ToBCD(timeStruct.month), ToBCD(timeStruct.year), 0x00 // Restart oscillator }; // Write the time WriteRegister(0x00, timeArray); }
public RTCWkAlrm(byte Enabled = default, byte Pending = default, RTCTime Time = default) { this.Enabled = Enabled; this.Pending = Pending; this.Time = Time; }