Changeset 456 for soft/giet_vm/giet_drivers/tty_driver.c
- Timestamp:
- Dec 5, 2014, 3:38:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/tty_driver.c
r437 r456 12 12 #include <ctx_handler.h> 13 13 #include <utils.h> 14 #include <tty0.h> 14 15 15 16 #if !defined(SEG_TTY_BASE) … … 21 22 #endif 22 23 23 #if !defined(GIET_NO_HARD_CC)24 # error: You must define GIET_NO_HARD_CC in the giet_config.h file24 #if (NB_TTY_CHANNELS == 0) 25 # error: The NB_TTY_CHANNELS in the hard_config.h file cannot be 0 25 26 #endif 26 27 27 #if (NB_TTY_CHANNELS < 1) 28 # error: NB_TTY_CHANNELS cannot be smaller than 1! 29 #endif 28 //////////////////////////////////////////////////////////////////////////////////// 29 // global variables 30 //////////////////////////////////////////////////////////////////////////////////// 30 31 31 ////////////////////////////////////////////////////////////////////////////// 32 // global variables 33 ////////////////////////////////////////////////////////////////////////////// 32 simple_lock_t _tty_tx_lock[NB_TTY_CHANNELS] __attribute__((aligned(64))); 34 33 35 #define in_unckdata __attribute__((section (".unckdata"))) 36 #define in_kdata __attribute__((section (".kdata"))) 34 unsigned int _tty_rx_buf[NB_TTY_CHANNELS]; 35 unsigned int _tty_rx_full[NB_TTY_CHANNELS]; 37 36 38 #if GIET_NO_HARD_CC 39 in_unckdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS]; 40 in_unckdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS]; 41 in_unckdata giet_lock_t _tty_lock[NB_TTY_CHANNELS] __attribute__((aligned(64))); 42 #else 43 in_kdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS]; 44 in_kdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS]; 45 in_kdata giet_lock_t _tty_lock[NB_TTY_CHANNELS] __attribute__((aligned(64))); 46 #endif 47 48 ////////////////////////////////////////////////////////////////////////////// 37 //////////////////////////////////////////////////////////////////////////////////// 49 38 // access functions 50 ////////////////////////////////////////////////////////////////////////////// 39 //////////////////////////////////////////////////////////////////////////////////// 51 40 52 41 ///////////////////////////////////////////////////// … … 67 56 } 68 57 58 ////////////////////////////////////// 59 void _tty_init( unsigned int channel ) 60 { 61 _tty_rx_full[channel] = 0; 62 } 69 63 70 64 ////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.