00001 /* 00002 ** serial.h for in /root/work/lseosr2b/programs/serial 00003 ** 00004 ** Made by Vianney Rancurel 00005 ** Login <vianney@epita.fr> 00006 ** 00007 ** Started on Wed Mar 31 11:39:51 2004 Vianney Rancurel 00008 ** Last update Mon Dec 6 12:21:19 2004 Vianney Rancurel 00009 */ 00010 #ifndef __SERIAL_H__ 00011 #define __SERIAL_H__ 1 00012 00013 #define IO_COM1 0x3f8 00014 #define IO_COM2 0x2f8 00015 00016 /* PROTO serial.c */ 00017 /* serial.c */ 00018 int uart_detect(u_int32_t baseaddr); 00019 void uart_init(int combase); 00020 int uart_getchar(int combase); 00021 void uart_putchar(int combase, int ch); 00022 void do_serial_except(int intr); 00023 void serial_except(int intr); 00024 void create_serial_intr(char *name, int ioport, int intr); 00025 void serial_init_port(int combase); 00026 int serial_init(t_ttydev *ttydev, t_tty *tty, void **ttydev_data); 00027 void serial_destroy(void *ttydev_data); 00028 int serial_write(void *ttydev_data, char *buf, int len); 00029 void serial_class_init(void); 00030 #endif