using System; using System.Collections.ObjectModel; namespace Unosquare.RaspberryIO.Abstractions { /// /// Interfaces the I2c bus on the Raspberry Pi. /// public interface II2CBus { /// /// Gets the registered devices as a read only collection. /// ReadOnlyCollection Devices { get; } /// /// Gets the with the specified device identifier. /// /// /// The . /// /// The device identifier. /// A reference to an I2C device. II2CDevice this[Int32 deviceId] { get; } /// /// Gets the device by identifier. /// /// The device identifier. /// The device reference. II2CDevice GetDeviceById(Int32 deviceId); /// /// Adds a device to the bus by its Id. If the device is already registered it simply returns the existing device. /// /// The device identifier. /// The device reference. II2CDevice AddDevice(Int32 deviceId); } }