mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
kernel: console
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#ifndef _CONSOLE_H
|
||||
#define _CONSOLE_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void console_init();
|
||||
void console_putc(char c);
|
||||
void console_write(char *str, size_t size);
|
||||
|
||||
#endif
|
||||
@@ -6,6 +6,7 @@
|
||||
#define DEV_MAJOR_NULL 1
|
||||
#define DEV_MAJOR_FULL 2
|
||||
#define DEV_MAJOR_ZERO 3
|
||||
#define DEV_MAJOR_CONSOLE 4
|
||||
|
||||
typedef struct {
|
||||
int (*open)(int minor, int flags);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef _TERMIOS_H
|
||||
#define _TERMIOS_H
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
|
||||
#define VINTR 0
|
||||
#define ISIG 0000001
|
||||
#define NCCS 32
|
||||
#define ECHO 0000010
|
||||
#define ICANON 0000002
|
||||
#define VMIN 6
|
||||
#define INLCR 0000100
|
||||
#define IGNCR 0000200
|
||||
#define ICRNL 0000400
|
||||
#define OCRNL 0000010
|
||||
|
||||
typedef struct {
|
||||
tcflag_t c_iflag;
|
||||
tcflag_t c_oflag;
|
||||
tcflag_t c_cflag;
|
||||
tcflag_t c_lflag;
|
||||
cc_t c_line;
|
||||
cc_t c_cc[NCCS];
|
||||
speed_t ibaud;
|
||||
speed_t obaud;
|
||||
} termios_t;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user