Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4092 → Rev 4093

/trunk/kernel/genarch/src/fb/fb.c
283,7 → 283,7
* Emulate basic terminal commands.
*
*/
static void fb_putchar(chardev_t *dev, char ch, bool silent)
static void fb_putchar(outdev_t *dev, char ch, bool silent)
{
spinlock_lock(&fb_lock);
326,9 → 326,9
spinlock_unlock(&fb_lock);
}
 
static chardev_t framebuffer;
static chardev_operations_t fb_ops = {
.write = fb_putchar,
static outdev_t fb_console;
static outdev_operations_t fb_ops = {
.write = fb_putchar
};
 
 
423,7 → 423,7
}
 
 
/** Initialize framebuffer as a chardev output device
/** Initialize framebuffer as a output character device
*
* @param addr Physical address of the framebuffer
* @param x Screen width in pixels
526,8 → 526,8
fb_redraw();
chardev_initialize("fb", &framebuffer, &fb_ops);
stdout = &framebuffer;
outdev_initialize("fb", &fb_console, &fb_ops);
stdout = &fb_console;
}
 
/** @}
/trunk/kernel/genarch/src/drivers/ega/ega.c
60,9 → 60,10
static uint8_t *backbuf;
static ioport8_t *ega_base;
 
#define EMPTY_CHAR 0x0720
#define SPACE 0x20
#define STYLE 0x07
 
chardev_t ega_console;
#define EMPTY_CHAR (STYLE << 8 | SPACE)
 
/*
* This function takes care of scrolling.
123,12 → 124,15
static void ega_display_char(char ch, bool silent)
{
backbuf[ega_cursor * 2] = ch;
backbuf[ega_cursor * 2 + 1] = STYLE;
if (!silent)
if (!silent) {
videoram[ega_cursor * 2] = ch;
videoram[ega_cursor * 2 + 1] = STYLE;
}
}
 
static void ega_putchar(chardev_t *dev __attribute__((unused)), const char ch, bool silent)
static void ega_putchar(outdev_t *dev __attribute__((unused)), const char ch, bool silent)
{
ipl_t ipl;
160,7 → 164,8
interrupts_restore(ipl);
}
 
static chardev_operations_t ega_ops = {
static outdev_t ega_console;
static outdev_operations_t ega_ops = {
.write = ega_putchar
};
 
179,7 → 184,7
memcpy(backbuf, videoram, EGA_VRAM_SIZE);
ega_sync_cursor();
chardev_initialize("ega_out", &ega_console, &ega_ops);
outdev_initialize("ega", &ega_console, &ega_ops);
stdout = &ega_console;
sysinfo_set_item_val("fb", NULL, true);