From eba8b7ddd0a455d9e49f32dcae712c5612c0093c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 26 Jan 2024 22:26:48 +0100 Subject: Kernel: Major repository refactor. Rework the repo into Private and Public modules. Signed-off-by: Amlal El Mahrouss --- Private/KernelKit/DebugOutput.hpp | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Private/KernelKit/DebugOutput.hpp (limited to 'Private/KernelKit/DebugOutput.hpp') diff --git a/Private/KernelKit/DebugOutput.hpp b/Private/KernelKit/DebugOutput.hpp new file mode 100644 index 00000000..1e30e6a4 --- /dev/null +++ b/Private/KernelKit/DebugOutput.hpp @@ -0,0 +1,40 @@ +/* + * ======================================================== + * + * hCore + * Copyright 2024 Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#pragma once + +#include +#include +#include + +namespace hCore +{ + // @brief Emulates a VT100 terminal. + class TerminalDevice final : public DeviceInterface + { + public: + TerminalDevice(void (*print)(const char *), void (*get)(const char *)) : DeviceInterface(print, get) {} + virtual ~TerminalDevice() {} + + /// @brief returns device name (terminal name) + /// @return string type (const char*) + virtual const char* Name() const override { return ("TerminalDevice"); } + + TerminalDevice &operator=(const TerminalDevice &) = default; + TerminalDevice(const TerminalDevice &) = default; + + }; + + namespace Detail + { + bool serial_init(); + } + + extern TerminalDevice kcout; +} // namespace hCore -- cgit v1.2.3