Turns out using lambdas to control pins is lovely and correct, but terribly slow. Back to a more traditional method.

This commit is contained in:
Adrian Conlon
2025-03-24 20:18:04 +00:00
parent d4dc99b454
commit 3d6b549c76
12 changed files with 184 additions and 326 deletions

View File

@@ -25,9 +25,9 @@ namespace EightBit
{
if (this.POWER.Lowered())
{
this.OnRaisingPOWER();
RaisingPOWER?.Invoke(this, EventArgs.Empty);
this.POWER.Raise();
this.OnRaisedPOWER();
RaisedPOWER?.Invoke(this, EventArgs.Empty);
}
}
@@ -35,18 +35,10 @@ namespace EightBit
{
if (this.POWER.Raised())
{
this.OnLoweringPOWER();
LoweringPOWER?.Invoke(this, EventArgs.Empty);
this.POWER.Lower();
this.OnLoweredPOWER();
LoweredPOWER?.Invoke(this, EventArgs.Empty);
}
}
protected virtual void OnRaisingPOWER() => RaisingPOWER?.Invoke(this, EventArgs.Empty);
protected virtual void OnRaisedPOWER() => RaisedPOWER?.Invoke(this, EventArgs.Empty);
protected virtual void OnLoweringPOWER() => LoweringPOWER?.Invoke(this, EventArgs.Empty);
protected virtual void OnLoweredPOWER() => LoweredPOWER?.Invoke(this, EventArgs.Empty);
}
}