mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
emulation: i2c: implement Reset bit on I2C
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
c392d8df90
commit
11783a050e
1 changed files with 9 additions and 0 deletions
|
|
@ -44,6 +44,15 @@ namespace Antmicro.Renode.Peripherals.I2C
|
|||
{(long)Registers.Transmit, new DoubleWordRegister(this)
|
||||
.WithValueField(0, 8, out transmitBuffer, FieldMode.Write)
|
||||
},
|
||||
{(long)Registers.Reset, new DoubleWordRegister(this)
|
||||
.WithFlag(0, writeCallback: (_, val) => {
|
||||
if (val) {
|
||||
dataToSlave.Clear();
|
||||
dataFromSlave.Clear();
|
||||
UpdateInterrupts();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
{(long)Registers.Receive, new DoubleWordRegister(this)
|
||||
.WithValueField(0, 8, out receiveBuffer, FieldMode.Read)
|
||||
|
|
|
|||
Loading…
Reference in a new issue