Skip to main content

I2cDevice Class

Namespace: System.Device.I2c · Assembly: GHIElectronics.TinyCLR.System.Device.I2c

.NET-style I²C device. Standard surface (Read / Write / WriteRead); internally TinyCLR routes calls through GHIElectronics.TinyCLR.Devices.I2c.I2cController.

public abstract class I2cDevice : IDisposable

Properties

ConnectionSettings

public abstract I2cConnectionSettings ConnectionSettings { get; }

The per-device bus settings (clock, mode, chip select, etc.). (inherited)

Methods

Create(I2cConnectionSettings settings)

public static I2cDevice Create(I2cConnectionSettings settings)

Creates a WebRequest . (inherited)

ParameterTypeDescription
settingsI2cConnectionSettings

Returns I2cDevice

Read(byte[] buffer)

public abstract void Read(byte[] buffer)

Read the data from internal buffer (inherited)

ParameterTypeDescription
bufferbyte[]

Write(byte[] buffer)

public abstract void Write(byte[] buffer)

Write a fileinfo or directoryinfo to the socket (inherited)

ParameterTypeDescription
bufferbyte[]

WriteRead(byte[] writeBuffer, byte[] readBuffer)

public abstract void WriteRead(byte[] writeBuffer, byte[] readBuffer)

Performs a register-style write-then-read transaction. (inherited)

ParameterTypeDescription
writeBufferbyte[]
readBufferbyte[]

Dispose()

public abstract void Dispose()

Releases buffered memory (the unmanaged firmware/application buffers). (inherited)