Table of Contents

Class Mcp7940n

Namespace
Iot.Device.Mcp7940xx
Assembly
Iot.Device.Mcp7940xx.dll

Battery-Backed I2C Real-Time Clock/Calendar with SRAM.

public class Mcp7940n : Mcp7940m
Inheritance
Mcp7940n
Derived
Inherited Members

Constructors

Mcp7940n(I2cDevice, ClockSource)

Initializes a new instance of the Mcp7940n class.

public Mcp7940n(I2cDevice i2cDevice, ClockSource clockSource)

Parameters

i2cDevice I2cDevice

The I2C device to use for communication.

clockSource ClockSource

The clocks oscillator configuration.

Exceptions

ArgumentNullException

Thrown when i2cDevice is null.

Properties

HasPowerFailureAlert

Gets a value indicating whether the device has experienced a power failure.

public bool HasPowerFailureAlert { get; }

Property Value

bool

IsEnabledExternalBatteryBackup

Gets a value indicating whether the external battery backup is enabled.

public bool IsEnabledExternalBatteryBackup { get; }

Property Value

bool

Methods

ClearPowerFailureAlert()

Clears the power failure alert flag.

public void ClearPowerFailureAlert()

DisableExternalBatteryBackup()

Disables external battery backup.

public void DisableExternalBatteryBackup()

EnableExternalBatteryBackup()

Enables external battery backup.

public void EnableExternalBatteryBackup()

GetLastPowerDown()

Gets a Mcp7940n.PowerEvent object that is set to the date and time of the last power down event.

public Mcp7940n.PowerEvent GetLastPowerDown()

Returns

Mcp7940n.PowerEvent

An object whose value is the date and time of the last power down event.

GetLastPowerUp()

Gets a Mcp7940n.PowerEvent object that is set to the date and time of the last power up event.

public Mcp7940n.PowerEvent GetLastPowerUp()

Returns

Mcp7940n.PowerEvent

An object whose value is the date and time of the last power up event.