Table of Contents

Class Mcp79400.Eeprom

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

Provides access to the protected EEPROM of the Mcp79400.

public class Mcp79400.Eeprom
Inheritance
Mcp79400.Eeprom
Derived

Constructors

Eeprom(I2cDevice)

Initializes a new instance of the Mcp79400.Eeprom class.

public Eeprom(I2cDevice i2cDevice)

Parameters

i2cDevice I2cDevice

The I2C device to use for communication.

Exceptions

ArgumentNullException

Thrown when i2cDevice is null.

Fields

DefaultI2cAddress

Default I2C address for Mcp79400x protected EEPROM.

public const byte DefaultI2cAddress = 167

Field Value

byte

_i2cDevice

The underlying I2C device used for accessing the EEPROM address space.

protected readonly I2cDevice _i2cDevice

Field Value

I2cDevice

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

ReadByte(byte)

Reads a single byte from the devices EEPROM at the given address.

public byte ReadByte(byte address)

Parameters

address byte

The address to read from.

Returns

byte

The byte read from the device.

Remarks

Parameter address must be in the range 0 to 63.

Exceptions

ArgumentOutOfRangeException

Thrown when address falls outside of the addressable range for this device.

WriteByte(byte, byte)

Writes a single byte to the devices EEPROM at the given address.

public void WriteByte(byte address, byte value)

Parameters

address byte

The address to write to.

value byte

The byte to be written into the device.

Remarks

Parameter address must be in the range 0 to 63.

Exceptions

ArgumentOutOfRangeException

Thrown when address falls outside of the addressable range for this device.