src/drivers/tty/tty.h File Reference

#include <timers.h>

Go to the source code of this file.

Classes

struct  tty

Defines

#define TTY_REVIVE   6767
#define CONS_MINOR   0
#define LOG_MINOR   15
#define RS232_MINOR   16
#define KBD_MINOR   127
#define KBDAUX_MINOR   126
#define VIDEO_MINOR   125
#define TTYPX_MINOR   128
#define PTYPX_MINOR   192
#define LINEWRAP   1
#define TTY_IN_BYTES   256
#define TAB_SIZE   8
#define TAB_MASK   7
#define ESC   '\33'
#define O_NOCTTY   00400
#define O_NONBLOCK   04000
#define NOT_ESCAPED   0
#define ESCAPED   1
#define RUNNING   0
#define STOPPED   1
#define IN_CHAR   0x00FF
#define IN_LEN   0x0F00
#define IN_LSHIFT   8
#define IN_EOT   0x1000
#define IN_EOF   0x2000
#define IN_ESC   0x4000
#define force_timeout()   ((void) (0))
#define buflen(buf)   (sizeof(buf) / sizeof((buf)[0]))
#define bufend(buf)   ((buf) + buflen(buf))
#define tty_reply(c, r, p, s)   tty_reply_f(__FILE__, __LINE__, (c), (r), (p), (s))

Typedefs

typedef struct tty tty_t

Functions

typedef _PROTOTYPE (int(*devfun_t),(struct tty *tp, int try_only))
typedef _PROTOTYPE (void(*devfunarg_t),(struct tty *tp, int c))
 _PROTOTYPE (void handle_events,(struct tty *tp))
 _PROTOTYPE (void sigchar,(struct tty *tp, int sig, int mayflush))
 _PROTOTYPE (void tty_task,(void))
 _PROTOTYPE (int in_process,(struct tty *tp, char *buf, int count))
 _PROTOTYPE (void out_process,(struct tty *tp, char *bstart, char *bpos, char *bend, int *icount, int *ocount))
 _PROTOTYPE (void tty_wakeup,(clock_t now))
 _PROTOTYPE (void tty_reply_f,(char *f, int l, int code, int replyee, int proc_nr, int status))
 _PROTOTYPE (int tty_devnop,(struct tty *tp, int try))
 _PROTOTYPE (int select_try,(struct tty *tp, int ops))
 _PROTOTYPE (int select_retry,(struct tty *tp))
 _PROTOTYPE (void rs_interrupt,(message *m))
 _PROTOTYPE (void kputc,(int c))
 _PROTOTYPE (void do_diagnostics,(message *m, int safe))
 _PROTOTYPE (int con_loadfont,(message *m))
 _PROTOTYPE (void select_console,(int cons_line))
 _PROTOTYPE (void beep_x,(unsigned freq, clock_t dur))
 _PROTOTYPE (int kbd_loadmap,(message *m, int safe))
 _PROTOTYPE (int kbd_status,(message *m_ptr))
 _PROTOTYPE (void do_pty,(struct tty *tp, message *m_ptr))

Variables

tty_t tty_table [NR_CONS+NR_RS_LINES+NR_PTYS]
int ccurrent
int irq_hook_id
u32_t system_hz
unsigned long kbd_irq_set
unsigned long rs_irq_set
int panicing
timer_ttty_timers
clock_t tty_next_timeout
struct machine machine
struct kmessages kmess


Define Documentation

#define bufend ( buf   )     ((buf) + buflen(buf))

Definition at line 140 of file tty.h.

#define buflen ( buf   )     (sizeof(buf) / sizeof((buf)[0]))

Definition at line 139 of file tty.h.

#define CONS_MINOR   0

Definition at line 11 of file tty.h.

#define ESC   '\33'

Definition at line 26 of file tty.h.

#define ESCAPED   1

Definition at line 119 of file tty.h.

 
#define force_timeout (  )     ((void) (0))

Definition at line 132 of file tty.h.

#define IN_CHAR   0x00FF

Definition at line 124 of file tty.h.

#define IN_EOF   0x2000

Definition at line 128 of file tty.h.

#define IN_EOT   0x1000

Definition at line 127 of file tty.h.

#define IN_ESC   0x4000

Definition at line 129 of file tty.h.

#define IN_LEN   0x0F00

Definition at line 125 of file tty.h.

#define IN_LSHIFT   8

Definition at line 126 of file tty.h.

#define KBD_MINOR   127

Definition at line 14 of file tty.h.

#define KBDAUX_MINOR   126

Definition at line 15 of file tty.h.

#define LINEWRAP   1

Definition at line 20 of file tty.h.

#define LOG_MINOR   15

Definition at line 12 of file tty.h.

#define NOT_ESCAPED   0

Definition at line 118 of file tty.h.

#define O_NOCTTY   00400

Definition at line 28 of file tty.h.

#define O_NONBLOCK   04000

Definition at line 29 of file tty.h.

#define PTYPX_MINOR   192

Definition at line 18 of file tty.h.

#define RS232_MINOR   16

Definition at line 13 of file tty.h.

#define RUNNING   0

Definition at line 120 of file tty.h.

#define STOPPED   1

Definition at line 121 of file tty.h.

#define TAB_MASK   7

Definition at line 24 of file tty.h.

#define TAB_SIZE   8

Definition at line 23 of file tty.h.

#define TTY_IN_BYTES   256

Definition at line 22 of file tty.h.

#define tty_reply ( c,
r,
p,
s   )     tty_reply_f(__FILE__, __LINE__, (c), (r), (p), (s))

Definition at line 157 of file tty.h.

#define TTY_REVIVE   6767

Definition at line 8 of file tty.h.

#define TTYPX_MINOR   128

Definition at line 17 of file tty.h.

#define VIDEO_MINOR   125

Definition at line 16 of file tty.h.


Typedef Documentation

typedef struct tty tty_t


Function Documentation

_PROTOTYPE ( void  do_pty,
(struct tty *tp, message *m_ptr)   
)

_PROTOTYPE ( int  kbd_status,
(message *m_ptr)   
)

_PROTOTYPE ( int  kbd_loadmap,
(message *m, int safe)   
)

_PROTOTYPE ( void  beep_x,
(unsigned freq, clock_t dur)   
)

_PROTOTYPE ( void  select_console,
(int cons_line)   
)

_PROTOTYPE ( int  con_loadfont,
(message *m  
)

_PROTOTYPE ( void  do_diagnostics,
(message *m, int safe)   
)

_PROTOTYPE ( void  kputc,
(int c  
)

_PROTOTYPE ( void  rs_interrupt,
(message *m  
)

_PROTOTYPE ( int  select_retry,
(struct tty *tp)   
)

_PROTOTYPE ( int  select_try,
(struct tty *tp, int ops  
)

_PROTOTYPE ( int  tty_devnop,
(struct tty *tp, int try)   
)

_PROTOTYPE ( void  tty_reply_f,
(char *f, int l, int code, int replyee, int proc_nr, int status  
)

_PROTOTYPE ( void  tty_wakeup,
(clock_t now  
)

_PROTOTYPE ( void  out_process,
(struct tty *tp, char *bstart, char *bpos, char *bend, int *icount, int *ocount)   
)

_PROTOTYPE ( int  in_process,
(struct tty *tp, char *buf, int count)   
)

_PROTOTYPE ( void  tty_task,
(void)   
)

_PROTOTYPE ( void  sigchar,
(struct tty *tp, int sig, int mayflush)   
)

_PROTOTYPE ( void  handle_events,
(struct tty *tp)   
)

typedef _PROTOTYPE ( void *  devfunarg_t,
(struct tty *tp, int c  
)

typedef _PROTOTYPE ( int *  devfun_t,
(struct tty *tp, int try_only)   
)


Variable Documentation

int ccurrent

Definition at line 140 of file tty.c.

Definition at line 74 of file audio_fw.c.

unsigned long kbd_irq_set

Definition at line 76 of file tty.c.

struct kmessages kmess

Definition at line 103 of file tty.c.

struct machine machine

Definition at line 143 of file tty.c.

int panicing

Definition at line 8 of file panic.c.

unsigned long rs_irq_set

Definition at line 77 of file tty.c.

Definition at line 37 of file tcpstat.c.

Definition at line 142 of file tty.c.

tty_t tty_table[NR_CONS+NR_RS_LINES+NR_PTYS]

Definition at line 139 of file tty.c.

Definition at line 141 of file tty.c.


Generated on Tue Mar 9 04:36:51 2010 for Minix by  doxygen 1.5.8