tty: move tty/ from drivers/ to kernel/
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
a53141809e
commit
c4ec0bdf21
13 changed files with 8 additions and 184 deletions
|
|
@ -1,36 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _TTY_H_
|
||||
#define _TTY_H_
|
||||
|
||||
#include <kernel/device.h>
|
||||
|
||||
struct tty_serial_ops {
|
||||
void (*serial_putchar)(struct tty *tty, char c);
|
||||
char (*serial_getchar)(struct tty *tty);
|
||||
};
|
||||
|
||||
struct tty {
|
||||
dev_t dev;
|
||||
void *priv;
|
||||
struct tty_serial_ops serial_ops;
|
||||
};
|
||||
|
||||
void tty_layer_init();
|
||||
|
||||
struct tty *tty_create(const char *name, void *priv);
|
||||
void tty_putchar(struct tty *tty, char c);
|
||||
char tty_getchar(struct tty *tty);
|
||||
void tty_write(struct tty *tty, const char *s);
|
||||
|
||||
void arch_serial_write(struct tty *tty, char c);
|
||||
char arch_serial_read(struct tty *tty);
|
||||
|
||||
void tty_send_dsr(struct tty *tty);
|
||||
void tty_set_origin_mode(struct tty *tty);
|
||||
void tty_clear_screen(struct tty *tty);
|
||||
void tty_set_cursor_pos(struct tty *tty, int x, int y);
|
||||
void tty_get_cursor_pos(struct tty *tty, int *row, int *col);
|
||||
void tty_get_size(struct tty *tty, int *rows, int *cols);
|
||||
void tty_setlf(struct tty *tty);
|
||||
|
||||
#endif /* _TTY_H_ */
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <kernel/block.h>
|
||||
|
||||
#include <drivers/tty.h>
|
||||
#include <kernel/tty.h>
|
||||
|
||||
#include <fs/inode.h>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue