Changeset 604
- Timestamp:
- Jul 13, 2015, 3:10:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/tty_driver.c
r496 r604 63 63 unsigned int cluster_xy = gpid >> P_WIDTH; 64 64 65 // get TTY status66 unsigned int status = _tty_get_register( channel, TTY_STATUS );67 68 // check both TTY status and kernel buffer status:69 // does nothing if kernel buffer full or tty_buffer empty70 if ( ((status & 0x1) == 0) ||71 (_tty_rx_full[channel] != 0) ) return;72 73 65 // reset WTI in XCU if WTI type 74 66 if ( irq_type == IRQ_TYPE_WTI ) … … 78 70 } 79 71 80 // transfer character to kernel buffer and acknowledge TTY IRQ 72 // transfer character to kernel buffer and acknowledge TTY IRQ 81 73 _tty_rx_buf[channel] = _tty_get_register( channel, TTY_READ ); 82 74 75 // flush pending memory writes 76 asm volatile( "sync" ); 77 83 78 // set kernel buffer status 84 asm volatile( "sync" );85 79 _tty_rx_full[channel] = 1; 86 80
Note: See TracChangeset
for help on using the changeset viewer.