Files
jsix_import/src/kernel/panic.serial/serial.h
Justin C. Miller 5f88f5ed02 [kernel] Move kassert out of kutil
Continuing moving things out of kutil. The assert as implemented could
only ever work in the kernel, so remaining kutil uses of kassert have
been moved to including standard C assert instead.

Along the way, kassert was broken out into panic::panic and kassert,
and the panic.serial namespace was renamed panicking.
2022-01-02 01:38:04 -08:00

24 lines
404 B
C++

#pragma once
/// \file panic_serial.h
/// Non-interrupt-driven serial 'driver' for panic handling
#include <stdint.h>
namespace panicking {
class serial_port
{
public:
/// Constructor.
/// \arg port The IO address of the serial port
serial_port(uint16_t port);
void write(const char *s);
private:
uint16_t m_port;
};
constexpr uint16_t COM1 = 0x03f8;
} // namespace panicking