kernel: add definitions for a TTY device interface.

This commit is contained in:
2023-02-09 09:17:04 +00:00
parent 943e9dc517
commit 5b9bdd4848
3 changed files with 116 additions and 0 deletions

View File

@@ -1,11 +1,27 @@
#ifndef SOCKS_CONSOLE_H_
#define SOCKS_CONSOLE_H_
/* The console system
Consoles are like simplified TTYs. Their purpose is to serve as an output
sink for messages printed using printk.
a console_t could be used to represent a serial port, UART port, or even
a text-based framebuffer display. Anything where the job of displaying
or sending text can be abstracted to a simple write() call.
A secondary purpose of consoles is to allow input. For example, a console
representing a serial port may allow both sending AND receiving over the
port.
*/
#include <socks/queue.h>
#include <socks/locks.h>
#include <socks/status.h>
typedef enum console_flags {
/* console is only used during the boot process. the console
will be automatically de-registered when the first
non-boot console is registered */
CON_BOOT = 0x01u,
} console_flags_t;