示例#1
0
文件: vga.c 项目: Pating/unilator
void vga_init(void)
{
#if 0	
	card_base = pci_lookupclass(0x300);
	if (!card_base)
		card_base = pci_lookupclass(0x0001);
	if (!card_base)
		return;
#endif
	x = 0;
	y = 0;
	attrib = 7;
#if 0
	vendor = pci_read_config_word(card_base, PCI_VENDOR_ID);
	device = pci_read_config_word(card_base, PCI_DEVICE_ID);
#endif
	io_base = (volatile char *)0x00000000;
	charmap = (volatile char *)0x000b8000;
	scrmem  = (volatile char *)0x000b8000;

	io_base[0x3c3] = 1;

	vendor = 0;
	device = 0;
	
	vga_load_regs(list, vendor, device);

	io_base[0x3c0] = 0x20;
	io_base[0x3c6] = 0xff;

	vga_clear();
	vga_setcursor();

	display_fn = vga_print;
}
示例#2
0
static int pcconsole_open(cfe_devctx_t *ctx)
{
    pcconsole_t *softc = ctx->dev_softc;

    pcconsole_current = softc;

    softc->kbd_in = 0;
    softc->kbd_out = 0;

    vga_clear(&(softc->vga));
    vga_setcursor(&(softc->vga),0,0);
    
    return 0;
}
示例#3
0
文件: vga.c 项目: Pating/unilator
void vga_print(const char *buffer, int len)
{
	vga_write_string(buffer, len);
	vga_setcursor();
}