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

Last change on this file since 313 was 295, checked in by alain, 10 years ago

Introducing a major release, to suppoort the tsar_generic_leti platform
and the various (external or internal) peripherals configurations.
The map.xml format has been modified, in order to support the new
vci_iopic componentand a new policy for peripherals initialisation.
The IRQs are nom described in the XICU and IOPIC components
(and not anymore in the processors).
To enforce this major change, the map.xml file signature changed:
The signature value must be: 0xDACE2014

This new release has been tested on the tsar_generic_leti platform
for the following mappings:

  • 4c_4p_sort_leti
  • 4c_4p_sort_leti_ext
  • 4c_4p_transpose_leti
  • 4c_4p_transpose_leti_ext
  • 4c_1p_four_leti_ext
File size: 2.6 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : tty_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_TTY_DRIVERS_H_
9#define _GIET_TTY_DRIVERS_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12// TTY (vci_multi_tty) registers offsets
13///////////////////////////////////////////////////////////////////////////////////
14
15enum TTY_registers
16{
17    TTY_WRITE   = 0,
18    TTY_STATUS  = 1,
19    TTY_READ    = 2,
20    TTY_CONFIG  = 3,
21    /**/
22    TTY_SPAN    = 4,
23};
24
25///////////////////////////////////////////////////////////////////////////////////
26// TTY variables
27///////////////////////////////////////////////////////////////////////////////////
28
29extern volatile unsigned char _tty_get_buf[];
30
31extern volatile unsigned char _tty_get_full[];
32
33//////////////////////////////////////////////////////////////////////////////////
34// TTY access functions
35//////////////////////////////////////////////////////////////////////////////////
36
37extern unsigned int _tty_write( const char*  buffer,
38                                unsigned int length,     
39                                unsigned int channel ); 
40
41extern unsigned int _tty_read(  char*        buffer,
42                                unsigned int length, 
43                                unsigned int channel ); 
44
45extern void _tty_get_lock( unsigned int  channel, 
46                           unsigned int* save_sr_ptr );
47
48extern void _tty_release_lock( unsigned int  channel,
49                               unsigned int* save_sr_ptr );
50
51extern void _tty_rx_isr( unsigned int irq_type,
52                         unsigned int irq_id,
53                         unsigned int channel );
54
55extern void _tty_tx_isr( unsigned int irq_type,
56                         unsigned int irq_id,
57                         unsigned int channel );
58
59///////////////////////////////////////////////////////////////////////////////////
60// low-level access functions
61///////////////////////////////////////////////////////////////////////////////////
62
63extern unsigned int _tty_get_register( unsigned int channel,
64                                       unsigned int index );
65
66extern void _tty_set_register( unsigned int channel,
67                               unsigned int index,
68                               unsigned int value );
69
70#endif
71
72// Local Variables:
73// tab-width: 4
74// c-basic-offset: 4
75// c-file-offsets:((innamespace . 0)(inline-open . 0))
76// indent-tabs-mode: nil
77// End:
78// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
79
Note: See TracBrowser for help on using the repository browser.