mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-04 04:27:34 +00:00
emulation: ec: i2c: allow reading multiple registers
Previously, the code would only allow for reading one register at a time. This caused that one register to be duplicated repeatedly. As a result, readings such as Voltage were incorrect. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
6d294c97c5
commit
cd19fcba57
1 changed files with 3 additions and 3 deletions
|
|
@ -258,8 +258,8 @@ namespace Antmicro.Renode.Peripherals.I2C
|
|||
this.Log(LogLevel.Error, "selectedSlave is NULL!");
|
||||
return;
|
||||
}
|
||||
if (dataFromSlave.Count == 0)
|
||||
{
|
||||
// if (dataFromSlave.Count == 0)
|
||||
// {
|
||||
foreach (var b in selectedSlave.Read())
|
||||
{
|
||||
dataFromSlave.Enqueue(b);
|
||||
|
|
@ -271,7 +271,7 @@ namespace Antmicro.Renode.Peripherals.I2C
|
|||
receiveBuffer.Value = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
if (receiveBuffer == null) {
|
||||
this.Log(LogLevel.Error, "receiveBuffer is NULL!");
|
||||
|
|
|
|||
Loading…
Reference in a new issue