Cosmos/source/Cosmos.HAL2/KeyboardBase.cs
2020-06-17 22:53:59 +03:00

26 lines
731 B
C#

namespace Cosmos.HAL
{
public abstract class KeyboardBase : Device
{
/// <summary>
/// Initialize the device. Happens before the interrupt is registered, ie before the class is being used.
/// </summary>
public abstract void Initialize();
/// <summary>
/// Update keyboard LEDs.
/// </summary>
public abstract void UpdateLeds();
public delegate void KeyPressedEventHandler(byte ScanCode, bool Released);
public KeyPressedEventHandler OnKeyPressed;
/// <summary>
/// Wait for key to be pressed.
/// </summary>
public static void WaitForKey()
{
Core.Global.CPU.Halt();
}
}
}