提交 bd46eacd 编写于 作者: G Greg Ingram 提交者: Jose Perez Rodriguez

Update parameter name (#521)

* Updated parameter name to be same as other device type

* Updated parameter name to be same as other device type
上级 c5b9f814
......@@ -188,29 +188,29 @@ namespace System.Device.I2c.Drivers
/// <summary>
/// Writes a byte to the I2C device.
/// </summary>
/// <param name="data">The byte to be written to the I2C device.</param>
public override unsafe void WriteByte(byte data)
/// <param name="value">The byte to be written to the I2C device.</param>
public override unsafe void WriteByte(byte value)
{
Initialize();
int length = sizeof(byte);
Transfer(&data, null, length, 0);
Transfer(&value, null, length, 0);
}
/// <summary>
/// Writes data to the I2C device.
/// </summary>
/// <param name="data">
/// <param name="value">
/// The buffer that contains the data to be written to the I2C device.
/// The data should not include the I2C device address.
/// </param>
public override unsafe void Write(ReadOnlySpan<byte> data)
public override unsafe void Write(ReadOnlySpan<byte> value)
{
Initialize();
fixed (byte* dataPointer = data)
fixed (byte* dataPointer = value)
{
Transfer(dataPointer, null, data.Length, 0);
Transfer(dataPointer, null, value.Length, 0);
}
}
......
......@@ -15,9 +15,9 @@ namespace System.Device.Spi.Drivers
public override void Read(Span<byte> buffer) => throw new PlatformNotSupportedException();
public override void WriteByte(byte data) => throw new PlatformNotSupportedException();
public override void WriteByte(byte value) => throw new PlatformNotSupportedException();
public override void Write(ReadOnlySpan<byte> data) => throw new PlatformNotSupportedException();
public override void Write(ReadOnlySpan<byte> buffer) => throw new PlatformNotSupportedException();
public override void TransferFullDuplex(ReadOnlySpan<byte> writeBuffer, Span<byte> readBuffer) => throw new PlatformNotSupportedException();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册