UbixOS  2.0
tty.c File Reference
#include <ubixos/tty.h>
#include <ubixos/kpanic.h>
#include <ubixos/spinlock.h>
#include <lib/kprintf.h>
#include <lib/kmalloc.h>
#include <sys/io.h>
#include <string.h>
Include dependency graph for tty.c:

Go to the source code of this file.

Functions

int tty_change (uInt16 tty)
 
tty_termtty_find (uInt16 tty)
 
int tty_init ()
 
int tty_print (char *string, tty_term *term)
 

Variables

tty_termtty_foreground = 0x0
 

Function Documentation

◆ tty_change()

int tty_change ( uInt16  tty)

Definition at line 84 of file tty.c.

References kpanic(), memcpy(), tty_termNode::tty_buffer, tty_foreground, and TTY_MAX_TERMS.

Here is the call graph for this function:

◆ tty_find()

tty_term* tty_find ( uInt16  tty)

Definition at line 167 of file tty.c.

Referenced by execFile(), kprint(), and systemTask().

◆ tty_init()

int tty_init ( )

Definition at line 41 of file tty.c.

◆ tty_print()

int tty_print ( char *  string,
tty_term term 
)

Definition at line 115 of file tty.c.

References spinLock().

Referenced by kprint(), sys_fwrite(), and sysFwrite().

Here is the call graph for this function:

Variable Documentation

◆ tty_foreground

tty_term* tty_foreground = 0x0

Definition at line 38 of file tty.c.

Referenced by getchar(), kpanic(), kprint(), sys_fgetc(), sys_pread(), sys_read(), and tty_change().