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

Last change on this file since 281 was 258, checked in by alain, 11 years ago

This is a major release, including a deep restructuration of code.
The main evolutions are

  • use of the Tsar preloader to load the GIET boot-loader from disk
  • introduction of a FAT32 file system library,
  • use of this fat32 library by the boot-loader to load the map.bin data structure, and the various .elf files
  • reorganisation of drivers (one file per peripheral).
  • introduction of drivers for new peripherals: vci_chbuf_dma and vci_multi_ahci.
  • introduction of a new physical memory allocator in the boot code.

This release has been tested on the tsar_generic_iob architecture,
for the two following mappings: 4c_1p_iob_four.xml and 4c_1p_iob_sort.xml

File size: 2.1 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 access functions and variables
27///////////////////////////////////////////////////////////////////////////////////
28
29extern volatile unsigned char _tty_get_buf[];
30
31extern volatile unsigned char _tty_get_full[];
32
33/////// rather high level access functions ///////////////////////////////////////
34
35extern unsigned int _tty_write( const char*  buffer,
36                                unsigned int length,     // number of characters
37                                unsigned int channel );  // channel index
38
39extern unsigned int _tty_read(  char*        buffer,
40                                unsigned int length,     // unused
41                                unsigned int channel );  // channel index
42
43/////// very low level access functions //////////////////////////////////////////
44
45extern void _tty_write_data( unsigned int channel, char byte );
46
47extern unsigned int _tty_read_data( unsigned int channel );
48
49extern unsigned int _tty_get_status( unsigned int channel );
50
51extern void _tty_get_lock( unsigned int channel );
52
53extern void _tty_release_lock( unsigned int channel );
54
55///////////////////////////////////////////////////////////////////////////////////
56
57
58#endif
59
60// Local Variables:
61// tab-width: 4
62// c-basic-offset: 4
63// c-file-offsets:((innamespace . 0)(inline-open . 0))
64// indent-tabs-mode: nil
65// End:
66// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
67
Note: See TracBrowser for help on using the repository browser.