Kernel: You can now read serial output from the /dev/ttyS*

This commit is contained in:
Bananymous
2023-09-05 00:05:49 +03:00
parent 93c5755012
commit 3fd94b1acb
4 changed files with 85 additions and 17 deletions

View File

@@ -43,6 +43,8 @@ namespace Kernel
virtual uint32_t height() const override;
virtual void putchar(uint8_t) override;
virtual void update() override;
private:
SerialTTY(Serial);
bool initialize();

View File

@@ -29,6 +29,7 @@ namespace Kernel
static void initialize_devices();
void on_key_event(Input::KeyEvent);
void handle_input(const uint8_t* ch);
virtual bool is_tty() const override { return true; }
@@ -50,7 +51,7 @@ namespace Kernel
void do_backspace();
protected:
mutable Kernel::SpinLock m_lock;
mutable Kernel::RecursiveSpinLock m_lock;
TerminalDriver::Color m_foreground { TerminalColor::BRIGHT_WHITE };
TerminalDriver::Color m_background { TerminalColor::BLACK };