Subversion Repositories HelenOS-historic

Rev

Rev 324 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 324 Rev 326
Line 29... Line 29...
29
#include <putchar.h>
29
#include <putchar.h>
30
#include <arch/types.h>
30
#include <arch/types.h>
31
#include <arch/cp0.h>
31
#include <arch/cp0.h>
32
#include <arch/console.h>
32
#include <arch/console.h>
33
 
33
 
34
static void (*putchar_func)(const char ch) = NULL;
-
 
35
 
-
 
36
static void cons_putchar(const char ch)
34
static void cons_putchar(const char ch)
37
{
35
{
38
    *((char *) VIDEORAM) = ch;
36
    *((char *) VIDEORAM) = ch;
39
}
37
}
40
 
38
 
Line 50... Line 48...
50
    while (! ((*SERIAL_LSR) & (1<<TRANSMIT_EMPTY_BIT)))
48
    while (! ((*SERIAL_LSR) & (1<<TRANSMIT_EMPTY_BIT)))
51
        ;
49
        ;
52
    *(SERIAL_PORT_BASE) = ch;
50
    *(SERIAL_PORT_BASE) = ch;
53
}
51
}
54
 
52
 
-
 
53
static void (*putchar_func)(const char ch) = cons_putchar;
-
 
54
 
55
void console_init(void)
55
void console_init(void)
56
{
56
{
57
    /* The LSR on the start usually contains this value */
57
    /* The LSR on the start usually contains this value */
58
    if (*SERIAL_LSR == 0x60)
58
    if (*SERIAL_LSR == 0x60)
59
        putchar_func = serial_putchar;
59
        putchar_func = serial_putchar;