From f36d0d8d03e1b0b3d6c25be4c5306a9a489be9e9 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 7 May 2023 16:03:31 +0800 Subject: [PATCH] fix cast error in renode For some reason renode is now complaining about a C# error where a (ulong) cannot be cast to a (uint) type without an explicit type cast. This fixes that error. Seems to work ok. --- emulation/peripherals/keyrom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulation/peripherals/keyrom.cs b/emulation/peripherals/keyrom.cs index e0e51884f..f16d00775 100644 --- a/emulation/peripherals/keyrom.cs +++ b/emulation/peripherals/keyrom.cs @@ -27,7 +27,7 @@ namespace Antmicro.Renode.Peripherals.Miscellaneous.Betrusted private void DefineRegisters() { Registers.ADDRESS.Define(this) - .WithValueField(0, 8, writeCallback: (_, value) => { this.address = value; }, valueProviderCallback: _ => { return this.address; }) + .WithValueField(0, 8, writeCallback: (_, value) => { this.address = value; }, valueProviderCallback: _ => { return (uint) this.address; }) ; Registers.DATA.Define(this)