Ignore:
Timestamp:
May 27, 2014, 4:43:09 PM (10 years ago)
Author:
alain
Message:

tsar_boot:

  • Erasing unused constant in defs.h
  • Modofication in IO access functions to allow addressing in clusters using physical address extension
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/src/reset_tty.c

    r586 r704  
     1/********************************************************************
     2 * \file    reset_tty.c
     3 * \date    5 mars 2014
     4 * \author  Cesar Fuguet
     5 *
     6 * Minimal driver for TTY controler
     7 *******************************************************************/
     8
    19#include <reset_tty.h>
    210#include <io.h>
     
    715{
    816    unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE;
    9     if (ioread32(&tty_address[TTY_STATUS]) == 0)
    10         return 0;
    1117
    12     *c = ioread32(&tty_address[TTY_READ]);
     18    if (ioread32( &tty_address[TTY_STATUS] ) == 0) return 0;
     19    *c = ioread32( &tty_address[TTY_READ] );
    1320    return 1;
    1421}
     
    1825{
    1926    unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE;
    20     iowrite32(&tty_address[TTY_WRITE], (unsigned int)c);
    2127
    22     if (c == '\n')
    23     {
    24         iowrite32(&tty_address[TTY_WRITE], (unsigned int)'\r');
    25     }
     28    iowrite32( &tty_address[TTY_WRITE], (unsigned int)c );
     29    if (c == '\n') reset_putc( '\r' );
    2630}
    2731
     
    3438    {
    3539        if (buffer[n] == 0) break;
    36 
    3740        reset_putc(buffer[n]);
    3841    }
Note: See TracChangeset for help on using the changeset viewer.