From 5339d016c07bf717ee388f4feb73544087324af0 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 6 Jan 2024 09:14:11 +0100 Subject: git: port from mercurial repo. Signed-off-by: Amlal El Mahrouss --- KernelKit/DebugOutput.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 KernelKit/DebugOutput.hpp (limited to 'KernelKit/DebugOutput.hpp') diff --git a/KernelKit/DebugOutput.hpp b/KernelKit/DebugOutput.hpp new file mode 100644 index 00000000..9634c32b --- /dev/null +++ b/KernelKit/DebugOutput.hpp @@ -0,0 +1,40 @@ +/* + * ======================================================== + * + * hCore + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#pragma once + +#include +#include +#include + +namespace hCore +{ + // @brief Emulates a VT100 terminal. + class TerminalDevice final : public IDevice + { + public: + TerminalDevice(void (*print)(const char *), void (*get)(const char *)) : IDevice(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