Changeset 315 for soft/giet_vm


Ignore:
Timestamp:
Jun 8, 2014, 11:45:17 AM (10 years ago)
Author:
cfuguet
Message:

tty write functions:

  • Write a carriage return when writing newline character.
Location:
soft/giet_vm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_common/utils.c

    r314 r315  
    532532
    533533        // write one byte
     534        if ( string[n] == '\n') {
     535            _tty_set_register( 0, TTY_WRITE, (unsigned int)'\r' );
     536        }
    534537        _tty_set_register( 0, TTY_WRITE, (unsigned int)string[n] );
    535538        n++;
  • soft/giet_vm/giet_drivers/tty_driver.c

    r313 r315  
    104104
    105105        // write one byte
     106        if (buffer[nwritten] == '\n') {
     107            _tty_set_register( channel, TTY_WRITE, (unsigned int)'\r' );
     108        }
    106109        _tty_set_register( channel, TTY_WRITE, (unsigned int)buffer[nwritten] );
    107110    }
Note: See TracChangeset for help on using the changeset viewer.