未验证 提交 8d610d4d 编写于 作者: J Jose Perez Rodriguez 提交者: GitHub

Removing the register address parameter from the read/write methods of SPI and...

Removing the register address parameter from the read/write methods of SPI and I2C as these aren't general (#41)
上级 0f9aed5c
......@@ -7,10 +7,10 @@ namespace System.Device.I2c
public abstract class I2cDevice : IDisposable
{
public abstract I2cConnectionSettings ConnectionSettings { get; }
public abstract byte ReadByte(int address);
public abstract void Read(int address, Span<byte> buffer);
public abstract void WriteByte(int address, byte data);
public abstract void Write(int address, Span<byte> data);
public abstract byte ReadByte();
public abstract void Read(Span<byte> buffer);
public abstract void WriteByte(byte data);
public abstract void Write(Span<byte> data);
public void Dispose()
{
Dispose(true);
......
......@@ -26,22 +26,22 @@ namespace System.Device.I2c
throw new NotImplementedException();
}
public override byte ReadByte(int address)
public override byte ReadByte()
{
throw new NotImplementedException();
}
public override void Read(int address, Span<byte> buffer)
public override void Read(Span<byte> buffer)
{
throw new NotImplementedException();
}
public override void WriteByte(int address, byte data)
public override void WriteByte(byte data)
{
throw new NotImplementedException();
}
public override void Write(int address, Span<byte> data)
public override void Write(Span<byte> data)
{
throw new NotImplementedException();
}
......
......@@ -7,10 +7,10 @@ namespace System.Device.Spi
public abstract class SpiDevice : IDisposable
{
public abstract SpiConnectionSettings ConnectionSettings { get; }
public abstract byte ReadByte(int address);
public abstract void Read(int address, Span<byte> buffer);
public abstract void WriteByte(int address, byte data);
public abstract void Write(int address, Span<byte> data);
public abstract byte ReadByte();
public abstract void Read(Span<byte> buffer);
public abstract void WriteByte(byte data);
public abstract void Write(Span<byte> data);
public void Dispose()
{
Dispose(true);
......
......@@ -26,22 +26,22 @@ namespace System.Device.Spi
throw new NotImplementedException();
}
public override byte ReadByte(int address)
public override byte ReadByte()
{
throw new NotImplementedException();
}
public override void Read(int address, Span<byte> buffer)
public override void Read(Span<byte> buffer)
{
throw new NotImplementedException();
}
public override void WriteByte(int address, byte data)
public override void WriteByte(byte data)
{
throw new NotImplementedException();
}
public override void Write(int address, Span<byte> data)
public override void Write(Span<byte> data)
{
throw new NotImplementedException();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册