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)
| Parameter | Type | Description |
|---|---|---|
settings | I2cConnectionSettings |
Returns I2cDevice
Read(byte[] buffer)
public abstract void Read(byte[] buffer)
Read the data from internal buffer (inherited)
| Parameter | Type | Description |
|---|---|---|
buffer | byte[] |
Write(byte[] buffer)
public abstract void Write(byte[] buffer)
Write a fileinfo or directoryinfo to the socket (inherited)
| Parameter | Type | Description |
|---|---|---|
buffer | byte[] |
WriteRead(byte[] writeBuffer, byte[] readBuffer)
public abstract void WriteRead(byte[] writeBuffer, byte[] readBuffer)
Performs a register-style write-then-read transaction. (inherited)
| Parameter | Type | Description |
|---|---|---|
writeBuffer | byte[] | |
readBuffer | byte[] |
Dispose()
public abstract void Dispose()
Releases buffered memory (the unmanaged firmware/application buffers). (inherited)