mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
A long overdue cleanup of the src/ tree. - Moved src/drivers to src/user because it contains more than drivers - Removed src/drivers/ahci because it's unused - will restore it when I make a real AHCI driver - Removed unused src/tools - Moved kernel.ld (the only used file under src/arch) to src/kernel for now, if/when there's a multi-platform effort that should be figured out as part of it - Removed the rest of the unused src/arch - Renamed 'fb' to 'drv.uefi_fb' and 'nulldrv' to 'testapp'
27 lines
389 B
C++
27 lines
389 B
C++
#pragma once
|
|
/// \file serial.h
|
|
/// Declarations related to serial ports.
|
|
#include <stdint.h>
|
|
|
|
#define serial_port nulldrv_serial_port
|
|
|
|
class serial_port
|
|
{
|
|
public:
|
|
/// Constructor.
|
|
/// \arg port The IO address of the serial port
|
|
serial_port(uint16_t port);
|
|
|
|
serial_port();
|
|
|
|
void write(char c);
|
|
char read();
|
|
|
|
private:
|
|
uint16_t m_port;
|
|
|
|
bool read_ready();
|
|
bool write_ready();
|
|
};
|
|
|