Cleanup SerialOut
This commit is contained in:
@ -4,23 +4,19 @@
|
||||
#include "IOport.h"
|
||||
#include "lib/string/String.h"
|
||||
#include "lib/string/StringView.h"
|
||||
#include "lib/util/RestrictedConstructors.h"
|
||||
|
||||
// NOTE: I took this code from https://wiki.osdev.org/Serial_Ports
|
||||
|
||||
namespace Device {
|
||||
|
||||
class SerialOut {
|
||||
private:
|
||||
static const IOport com1;
|
||||
|
||||
static int serial_received();
|
||||
|
||||
static int is_transmit_empty();
|
||||
|
||||
public:
|
||||
SerialOut();
|
||||
|
||||
SerialOut(const SerialOut ©) = delete;
|
||||
MakeUncopyable(SerialOut)
|
||||
|
||||
MakeUnmovable(SerialOut)
|
||||
|
||||
// Can't make singleton because atexit
|
||||
|
||||
@ -29,6 +25,13 @@ public:
|
||||
static void write(char a);
|
||||
|
||||
static void write(String::string_view a);
|
||||
|
||||
private:
|
||||
static const IOport com1;
|
||||
|
||||
static int serial_received();
|
||||
|
||||
static int is_transmit_empty();
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user