Class Pcf85263
Driver for RTC PCF85263 with key functions implemented for time.
public class Pcf85263 : RtcBase
- Inheritance
-
Pcf85263
- Inherited Members
Remarks
See datasheet for details: https://www.nxp.com/docs/en/data-sheet/PCF85263A.pdf.
Constructors
Pcf85263(I2cDevice)
Initializes a new instance of the Pcf85263 class.
public Pcf85263(I2cDevice i2cDevice)
Parameters
i2cDevice
I2cDeviceThe I2C device used for communication.
Fields
DefaultI2cAddress
Pcf8563 Default I2C Address.
public const byte DefaultI2cAddress = 81
Field Value
Methods
Dispose(bool)
Cleanup.
protected override void Dispose(bool disposing)
Parameters
disposing
boolIs disposing.
GetAlarm(int)
Returns the alarm if any, for month, day, hour, min seconds. The year part is just picked to be current year but alarm will fire every time for that month and the date/time.
public DateTime GetAlarm(int alarm)
Parameters
alarm
intThe alarm to set.
Returns
- DateTime
Date and time of alarm if set, or DateTime.MinValue if alarm is not set.
Remarks
Support for this is not yet available.
ReadTime()
Read time from the Pcf85263.
protected override DateTime ReadTime()
Returns
- DateTime
Time from the device.
SetAlarm(DateTime, int)
Set alarm for seconds/min/hour/day/month, a full calandar like alarm.
public bool SetAlarm(DateTime alarmDateTime, int alarm)
Parameters
alarmDateTime
DateTimeDate and time to set the alarm, must be in the future from present RTC time.
alarm
intThe alarm to set.
Returns
- bool
True if alarm set, False if the alarm date is in the past from the RTC time.
Remarks
Support for this is not yet available.
SetTime(DateTime)
Set Pcf85263 Time.
protected override void SetTime(DateTime time)
Parameters
time
DateTimeTime.