예제 #1
0
파일: newport.c 프로젝트: ryo/netbsd-src
static void
newport_attach_common(struct newport_devconfig *dc, struct gio_attach_args *ga)
{
	dc->dc_addr = ga->ga_addr;

	dc->dc_st = ga->ga_iot;
	dc->dc_sh = ga->ga_ioh;

	wsfont_init();

	dc->dc_font = wsfont_find(NULL, 8, 16, 0, WSDISPLAY_FONTORDER_L2R,
	    WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
	if (dc->dc_font < 0)
		panic("newport_attach_common: no suitable fonts");

	if (wsfont_lock(dc->dc_font, &dc->dc_fontdata))
		panic("newport_attach_common: unable to lock font data");

	newport_setup_hw(dc);

	newport_get_resolution(dc);

	newport_fill_rectangle(dc, 0, 0, dc->dc_xres, dc->dc_yres, 0);
	dc->dc_screen = &newport_screen;
	
	dc->dc_mode = WSDISPLAYIO_MODE_EMUL;
}
예제 #2
0
파일: newport.c 프로젝트: MarginC/kame
static void
newport_eraserows(void *c, int startrow, int nrows, long attr)
{
	struct newport_devconfig *dc = (void *)c;
	struct wsdisplay_font *font = dc->dc_fontdata;

	newport_fill_rectangle(dc,
	    0,							/* x1 */
	    startrow * font->fontheight,			/* y1 */
	    dc->dc_xres,					/* x2 */
	    (startrow + nrows + 1) * font->fontheight - 1,	/* y2 */
	    NEWPORT_ATTR_BG(attr));
}
예제 #3
0
파일: newport.c 프로젝트: MarginC/kame
static void
newport_erasecols(void *c, int row, int startcol, int ncols,
    long attr)
{
	struct newport_devconfig *dc = (void *)c;
	struct wsdisplay_font *font = dc->dc_fontdata;

	newport_fill_rectangle(dc,
	    startcol * font->fontwidth,				/* x1 */
	    row * font->fontheight,				/* y1 */
	    (startcol + ncols + 1) * font->fontwidth - 1,	/* x2 */
	    (row + 1) * font->fontheight - 1,			/* y2 */
	    NEWPORT_ATTR_BG(attr));
}
예제 #4
0
파일: newport.c 프로젝트: ryo/netbsd-src
static void
newport_eraserows(void *c, int startrow, int nrows, long attr)
{
	struct rasops_info *ri = c;
	struct vcons_screen *scr = ri->ri_hw;
	struct newport_devconfig *dc = scr->scr_cookie;
	struct wsdisplay_font *font = dc->dc_fontdata;

	newport_fill_rectangle(dc,
	    0,							/* x1 */
	    startrow * font->fontheight,			/* y1 */
	    dc->dc_xres,					/* x2 */
	    (startrow + nrows) * font->fontheight - 1,		/* y2 */
	    NEWPORT_ATTR_BG(attr));
}
예제 #5
0
파일: newport.c 프로젝트: ryo/netbsd-src
static void
newport_erasecols(void *c, int row, int startcol, int ncols,
    long attr)
{
	struct rasops_info *ri = c;
	struct vcons_screen *scr = ri->ri_hw;
	struct newport_devconfig *dc = scr->scr_cookie;
	struct wsdisplay_font *font = dc->dc_fontdata;

	newport_fill_rectangle(dc,
	    startcol * font->fontwidth,				/* x1 */
	    row * font->fontheight,				/* y1 */
	    (startcol + ncols) * font->fontwidth - 1,		/* x2 */
	    (row + 1) * font->fontheight - 1,			/* y2 */
	    NEWPORT_ATTR_BG(attr));
}