Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 575 → Rev 574

/kernel/trunk/arch/ia32/src/drivers/ega.c
34,8 → 34,6
#include <arch/types.h>
#include <arch/asm.h>
#include <memstr.h>
#include <console/chardev.h>
#include <console/console.h>
 
/*
* The EGA driver.
45,13 → 43,6
static spinlock_t egalock;
static __u32 ega_cursor;
 
static void ega_putchar(chardev_t *d, const char ch);
 
chardev_t ega_console;
static chardev_operations_t ega_ops = {
.write = ega_putchar
};
 
void ega_move_cursor(void);
 
void ega_init(void)
64,11 → 55,7
outb(0x3d4,0xf);
lo = inb(0x3d5);
ega_cursor = (hi<<8)|lo;
 
chardev_initialize("ega_out", &ega_console, &ega_ops);
stdout = &ega_console;
 
putchar('\n');
ega_putchar('\n');
}
 
static void ega_display_char(char ch)
91,7 → 78,7
ega_cursor = ega_cursor - ROW;
}
 
void ega_putchar(chardev_t *d, const char ch)
void ega_putchar(const char ch)
{
ipl_t ipl;
 
124,3 → 111,8
outb(0x3d4,0xf);
outb(0x3d5,ega_cursor&0xff);
}
 
void putchar(const char ch)
{
ega_putchar(ch);
}