Added Kernal class api docs

This commit is contained in:
Elia Sulimanov 2020-06-02 21:42:43 +03:00
parent 731099fb57
commit 27cc44ace2

View file

@ -11,6 +11,9 @@ namespace Cosmos.System
/// </summary> /// </summary>
public abstract class Kernel public abstract class Kernel
{ {
/// <summary>
/// User ring debugger instance, with the tag "Kernel".
/// </summary>
public readonly Debugger mDebugger = new Debugger("User", "Kernel"); public readonly Debugger mDebugger = new Debugger("User", "Kernel");
public bool ClearScreen = true; public bool ClearScreen = true;
@ -20,17 +23,29 @@ namespace Cosmos.System
// Set to signal stopped // Set to signal stopped
protected bool mStopped = false; protected bool mStopped = false;
/// <summary>
/// Get text screen device.
/// </summary>
/// <returns>null</returns>
protected virtual TextScreenBase GetTextScreen() protected virtual TextScreenBase GetTextScreen()
{ {
// null means use default // null means use default
return null; return null;
} }
/// <summary>
/// Get keyboard key layout.
/// </summary>
/// <returns>Keyboard key layout.</returns>
protected ScanMapBase GetKeyboardScanMap() protected ScanMapBase GetKeyboardScanMap()
{ {
return KeyboardManager.GetKeyLayout(); return KeyboardManager.GetKeyLayout();
} }
/// <summary>
/// Set keyboard key layout.
/// </summary>
/// <param name="ScanMap">Keyboard key layout.</param>
protected void SetKeyboardScanMap(ScanMapBase ScanMap) protected void SetKeyboardScanMap(ScanMapBase ScanMap)
{ {
KeyboardManager.SetKeyLayout(ScanMap); KeyboardManager.SetKeyLayout(ScanMap);
@ -128,21 +143,34 @@ namespace Cosmos.System
mStopped = true; mStopped = true;
} }
/// <summary>
/// Kernal object constructor.
/// </summary>
public Kernel() public Kernel()
{ {
Global.mDebugger.Send("In Cosmos.System.Kernel..ctor"); Global.mDebugger.Send("In Cosmos.System.Kernel..ctor");
} }
// Shutdown and restart // Shutdown and restart
/// <summary>
/// Shutdown and restart.
/// </summary>
public void Restart() public void Restart()
{ {
} }
/// <summary>
/// Print message to the debbuger at system ring with "Global"-tag.
/// </summary>
/// <param name="message">A message to print.</param>
public static void PrintDebug(string message) public static void PrintDebug(string message)
{ {
Global.mDebugger.Send(message); Global.mDebugger.Send(message);
} }
/// <summary>
/// Get interrupts status.
/// </summary>
public static bool InterruptsEnabled public static bool InterruptsEnabled
{ {
get get