Class Mcp79400.Eeprom
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
I2cDeviceThe I2C device to use for communication.
Exceptions
- ArgumentNullException
Thrown when
i2cDevice
isnull
.
Fields
DefaultI2cAddress
Default I2C address for Mcp79400x protected EEPROM.
public const byte DefaultI2cAddress = 167
Field Value
_i2cDevice
The underlying I2C device used for accessing the EEPROM address space.
protected readonly I2cDevice _i2cDevice
Field Value
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
byteThe 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
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.