source: soft/giet_vm/giet_drivers/tty_driver.h @ 438

Last change on this file since 438 was 437, checked in by alain, 10 years ago

Introducing dynamic allocation of peripheral channel(TTY, NIC, TIM, CMA)
Removint the ICU driver : ICU component not supported anymore.
Removing the FBF driver.

File size: 2.9 KB
RevLine 
[258]1///////////////////////////////////////////////////////////////////////////////////
2// File     : tty_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
[437]7// The tty_driver.c and tty_drivers.h files are part ot the GIET-VM kernel.
8// This driver supports the SocLib vci_multi_tty component.
9//
10// The total number of TTY terminals must be defined by the configuration
11// parameter NB_TTY_CHANNELS in the hard_config.h file.
12//
13// The "system" terminal is TTY[0].
14// The "user" TTYs are allocated to applications requesting it.
15//
16// The SEG_TTY_BASE address must be defined in the hard_config.h file.
17//
18// All physical accesses to device registers are done by the two
19// _tty_get_register(), _tty_set_register() low-level functions,
20// that are handling virtual / physical addressing.
21///////////////////////////////////////////////////////////////////////////////////
[258]22
23#ifndef _GIET_TTY_DRIVERS_H_
24#define _GIET_TTY_DRIVERS_H_
25
[437]26#include <utils.h>
[350]27
[258]28///////////////////////////////////////////////////////////////////////////////////
[437]29//                     registers offsets
[258]30///////////////////////////////////////////////////////////////////////////////////
31
32enum TTY_registers
33{
34    TTY_WRITE   = 0,
35    TTY_STATUS  = 1,
36    TTY_READ    = 2,
37    TTY_CONFIG  = 3,
38    /**/
39    TTY_SPAN    = 4,
40};
41
42///////////////////////////////////////////////////////////////////////////////////
[437]43//                   external variables
[258]44///////////////////////////////////////////////////////////////////////////////////
45
[350]46extern volatile unsigned int _tty_rx_buf[];
[258]47
[350]48extern volatile unsigned int _tty_rx_full[];
[258]49
[350]50extern giet_lock_t _tty_lock[];
51
[295]52//////////////////////////////////////////////////////////////////////////////////
[437]53//                    access functions
[295]54//////////////////////////////////////////////////////////////////////////////////
[258]55
[437]56extern unsigned int _tty_get_register( unsigned int channel,
57                                       unsigned int index );
[258]58
[437]59extern void _tty_set_register( unsigned int channel,
60                               unsigned int index,
61                               unsigned int value );
[258]62
[437]63///////////////////////////////////////////////////////////////////////////////////
64//                 Interrupt Service Routine
65///////////////////////////////////////////////////////////////////////////////////
[258]66
[295]67extern void _tty_rx_isr( unsigned int irq_type,
68                         unsigned int irq_id,
69                         unsigned int channel );
[258]70
[295]71extern void _tty_tx_isr( unsigned int irq_type,
72                         unsigned int irq_id,
73                         unsigned int channel );
[258]74
75
76#endif
77
78// Local Variables:
79// tab-width: 4
80// c-basic-offset: 4
81// c-file-offsets:((innamespace . 0)(inline-open . 0))
82// indent-tabs-mode: nil
83// End:
84// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
85
Note: See TracBrowser for help on using the repository browser.