source: trunk/kernel/drivers/ibmpc/tty.h @ 248

Last change on this file since 248 was 1, checked in by alain, 8 years ago

First import

File size: 1.5 KB
Line 
1/*
2 * tty.c - a basic tty driver
3 *
4 * Copyright (c) 2008,2009,2010,2011,2012 Ghassan Almaless
5 * Copyright (c) 2011,2012 UPMC Sorbonne Universites
6 *
7 * This file is part of ALMOS-kernel.
8 *
9 * ALMOS-kernel is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; version 2.0 of the License.
12 *
13 * ALMOS-kernel is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with ALMOS-kernel; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef _TTY_H_
24#define _TTY_H_
25
26#include <driver.h>
27#include <scheduler.h>
28#include <rwlock.h>
29
30#define TTY_STATUS_REG  0
31#define TTY_READ_REG    1
32#define TTY_WRITE_REG   2
33
34struct device_s;
35struct fifomwmr_s;
36
37void ibmpc_tty_init(struct device_s *tty, void *base, uint_t irq, uint_t tty_id);
38
39struct thread_s;
40
41struct tty_context_s
42{
43        uint_t pos_X, pos_Y;
44        uint_t attr;
45        uint_t id;
46        dev_request_t *pending_rq;
47        unsigned int eol;               /* End Of Line */
48        struct rwlock_s rwlock;
49        struct wait_queue_s wait_queue;
50        struct fifomwmr_s *in_channel;
51        struct fifiomwmr_s *out_channel;
52};
53
54extern uint8_t keyboard_map[];
55#endif  /* _TTY_H_ */
Note: See TracBrowser for help on using the repository browser.