The I2CPort class writes to and reads from the one of the three I2C bus On Chip Peripheral (OCP) devices integrated into the Beaglebone Black CPU via the I2CDev device driver access method. At this time there is no BBBCSIO class of similar functionality which uses the Memory Mapped access method.
public class I2CPortFS : PortFS
public I2CPortFS(I2CPortEnum i2cPortIn) : base(GpioEnum.GPIO_NONE)
public override void ClosePort()
public void Dispose()
public override PortDirectionEnum PortDirection()
public void Read(int devID, byte[] rxByteBuf, int numBytes)
The address of the I2C device is specified by the devID. You do not need to include the address as the first outgoing byte in the rxByteBuf or set the READ/WRITE bit in that address. The I2C driver does that and sends it for you automatically.
public void Write(int devID, byte[] txByteBuf, int numBytes)
The address of the I2C device is specified by the devID. You do not need to include the address as the first outgoing byte in the txByteBuf or set the READ/WRITE bit in that address. The I2C driver does that and sends it for you automatically.
public I2CPortEnum I2CPort { get; }