Changeset 437 for soft/giet_vm/giet_drivers/tty_driver.h
- Timestamp:
- Nov 3, 2014, 10:53:00 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/tty_driver.h
r350 r437 5 5 // Copyright (c) UPMC-LIP6 6 6 /////////////////////////////////////////////////////////////////////////////////// 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 /////////////////////////////////////////////////////////////////////////////////// 7 22 8 23 #ifndef _GIET_TTY_DRIVERS_H_ 9 24 #define _GIET_TTY_DRIVERS_H_ 10 25 11 #include "utils.h"26 #include <utils.h> 12 27 13 28 /////////////////////////////////////////////////////////////////////////////////// 14 // TTY (vci_multi_tty)registers offsets29 // registers offsets 15 30 /////////////////////////////////////////////////////////////////////////////////// 16 31 … … 26 41 27 42 /////////////////////////////////////////////////////////////////////////////////// 28 // TTYvariables43 // external variables 29 44 /////////////////////////////////////////////////////////////////////////////////// 30 45 … … 36 51 37 52 ////////////////////////////////////////////////////////////////////////////////// 38 // TTYaccess functions53 // access functions 39 54 ////////////////////////////////////////////////////////////////////////////////// 40 55 41 extern unsigned int _tty_write( const char* buffer, 42 unsigned int length, 43 unsigned int channel ); 56 extern unsigned int _tty_get_register( unsigned int channel, 57 unsigned int index ); 44 58 45 extern unsigned int _tty_read( char* buffer,46 unsigned int length,47 unsigned int channel );59 extern void _tty_set_register( unsigned int channel, 60 unsigned int index, 61 unsigned int value ); 48 62 49 extern void _tty_get_lock( unsigned int channel, 50 unsigned int* save_sr_ptr ); 51 52 extern void _tty_release_lock( unsigned int channel, 53 unsigned int* save_sr_ptr ); 63 /////////////////////////////////////////////////////////////////////////////////// 64 // Interrupt Service Routine 65 /////////////////////////////////////////////////////////////////////////////////// 54 66 55 67 extern void _tty_rx_isr( unsigned int irq_type, … … 61 73 unsigned int channel ); 62 74 63 ///////////////////////////////////////////////////////////////////////////////////64 // low-level access functions65 ///////////////////////////////////////////////////////////////////////////////////66 67 extern unsigned int _tty_get_register( unsigned int channel,68 unsigned int index );69 70 extern void _tty_set_register( unsigned int channel,71 unsigned int index,72 unsigned int value );73 75 74 76 #endif
Note: See TracChangeset
for help on using the changeset viewer.