Changes between Version 6 and Version 7 of Component/Vci Multi Tty
- Timestamp:
- Jan 4, 2008, 12:37:31 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Component/Vci Multi Tty
v6 v7 24 24 Each TTY controller contains 3 memory mapped registers: 25 25 26 * `TTY_WRITE` : ADDRESS![3:0] = 0x026 * `TTY_WRITE` 27 27 This 8 bits pseudo-register is write only. 28 28 Any write request will interpret the 8 LSB bits of the WDATA field 29 29 as an ASCII character, and this character will be displayed on the addressed terminal. 30 30 31 * `TTY_STATUS` : ADDRESS![3:0] = 0x431 * `TTY_STATUS` 32 32 This Boolean status register is read-only. 33 33 A read request returns the zero value if there is no pending character. 34 34 It returns a non zero value if there is a pending character in the keyboard buffer. 35 35 36 * `TTY_READ` : ADDRESS![3:0] = 0x836 * `TTY_READ` 37 37 This 8 bits register contains one single ASCII character. 38 38 This register is read-only. A read request returns the ACSII character … … 54 54 static inline void putc(const size_t term_no, const char x) 55 55 { 56 volatile int *tty = ((int*)tty_address) + term_no*TTY_SPAN; 57 tty[TTY_WRITE] = x; 56 soclib_io_set( tty_address, term_no*TTY_SPAN + TTY_WRITE, x ); 58 57 } 59 58 60 59 static inline char getc(const size_t term_no) 61 60 { 62 volatile int *tty = ((int*)tty_address) + term_no*TTY_SPAN; 63 return tty[TTY_READ]; 61 return soclib_io_get( tty_address, term_no*TTY_SPAN + TTY_READ ); 64 62 } 65 63 }}}