The Pedigree Project 0.1
kernel/machine/mach_virt/Serial.h
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted.
6 */
7
8#ifndef KERNEL_MACHINE_VIRT_SERIAL_H
9#define KERNEL_MACHINE_VIRT_SERIAL_H
10
11#include "pedigree/kernel/machine/Serial.h"
12
14class VirtSerial : public Serial {
15 public:
16 VirtSerial();
17 void setBase(uintptr_t base) override;
18 bool hasData() override;
19 char read() override;
20 char readNonBlock() override;
21 void write(char c) override;
22
24 static void earlyWrite(uintptr_t base, char c);
25
26 private:
27 uintptr_t m_Base;
28};
29
30#endif
void setBase(uintptr_t base) override
static void earlyWrite(uintptr_t base, char c)