mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
Merge pull request #96 from antmicro/clockentry-api
Update Renode models with new ClockEntry API
This commit is contained in:
commit
459a61a2c9
4 changed files with 5 additions and 5 deletions
|
|
@ -28,7 +28,7 @@ namespace Antmicro.Renode.Peripherals.I2C
|
||||||
dataFromSlave = new Queue<byte>();
|
dataFromSlave = new Queue<byte>();
|
||||||
IRQ = new GPIO();
|
IRQ = new GPIO();
|
||||||
|
|
||||||
irqTimeoutCallback = new ClockEntry((ulong)5, ClockEntry.FrequencyToRatio(machine, 1000), this.FinishTransaction, machine, "Irq Scheduler");
|
irqTimeoutCallback = new ClockEntry((ulong)5, 1000, this.FinishTransaction, machine, "Irq Scheduler");
|
||||||
|
|
||||||
var registersMap = new Dictionary<long, DoubleWordRegister>()
|
var registersMap = new Dictionary<long, DoubleWordRegister>()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Antmicro.Renode.Peripherals.I2C
|
||||||
dataFromSlave = new Queue<byte>();
|
dataFromSlave = new Queue<byte>();
|
||||||
IRQ = new GPIO();
|
IRQ = new GPIO();
|
||||||
|
|
||||||
irqTimeoutCallback = new ClockEntry((ulong)5, ClockEntry.FrequencyToRatio(machine, 1000), this.FinishTransaction, machine, "Irq Scheduler");
|
irqTimeoutCallback = new ClockEntry((ulong)5, 1000, this.FinishTransaction, machine, "Irq Scheduler");
|
||||||
|
|
||||||
var registersMap = new Dictionary<long, DoubleWordRegister>()
|
var registersMap = new Dictionary<long, DoubleWordRegister>()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Antmicro.Renode.Peripherals.Timers
|
||||||
{
|
{
|
||||||
public BetrustedWatchdog(Machine machine) : base(machine)
|
public BetrustedWatchdog(Machine machine) : base(machine)
|
||||||
{
|
{
|
||||||
machine.ClockSource.AddClockEntry(new ClockEntry(10, ClockEntry.FrequencyToRatio(this, 1000), OnTick, this, String.Empty));
|
machine.ClockSource.AddClockEntry(new ClockEntry(10, 1000, OnTick, this, String.Empty));
|
||||||
var registersMap = new Dictionary<long, DoubleWordRegister>()
|
var registersMap = new Dictionary<long, DoubleWordRegister>()
|
||||||
{
|
{
|
||||||
{(long)Registers.Watchdog, new DoubleWordRegister(this)
|
{(long)Registers.Watchdog, new DoubleWordRegister(this)
|
||||||
|
|
@ -103,4 +103,4 @@ namespace Antmicro.Renode.Peripherals.Timers
|
||||||
State = 0x8,
|
State = 0x8,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ namespace Antmicro.Renode.Peripherals.Timers
|
||||||
{
|
{
|
||||||
public TickTimer(Machine machine, ulong periodInMs = 1) : base(machine)
|
public TickTimer(Machine machine, ulong periodInMs = 1) : base(machine)
|
||||||
{
|
{
|
||||||
machine.ClockSource.AddClockEntry(new ClockEntry(periodInMs, ClockEntry.FrequencyToRatio(this, 1000), OnTick, this, "TickTimer"));
|
machine.ClockSource.AddClockEntry(new ClockEntry(periodInMs, 1000, OnTick, this, "TickTimer"));
|
||||||
this.IRQ = new GPIO();
|
this.IRQ = new GPIO();
|
||||||
DefineRegisters();
|
DefineRegisters();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue