コード例 #1
0
ファイル: I2cProtocol.cs プロジェクト: mccj/Arduino.Firmata
 /// <summary>
 /// Requests the party system to send bytes read from the given memory address.
 /// </summary>
 /// <param name="slaveAddress">The slave's memory address</param>
 /// <param name="bytesToRead">Number of bytes to read</param>
 /// <remarks>
 /// The party system is expected to return a single I2C_REPLY message.
 /// This message triggers the <see cref="I2CReplyReceived"/> event. The data
 /// are passed in the <see cref="FirmataEventArgs{T}"/> in an <see cref="I2CReply"/> object.
 /// </remarks>
 public static void ReadI2COnce(this ArduinoSession session, int slaveAddress, int bytesToRead)
 {
     session.I2CRead(false, slaveAddress, -1, bytesToRead);
 }