Annotation of 43BSDReno/sys/hpdev/itereg.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1988 University of Utah.
                      3:  * Copyright (c) 1990 The Regents of the University of California.
                      4:  * All rights reserved.
                      5:  *
                      6:  * This code is derived from software contributed to Berkeley by
                      7:  * the Systems Programming Group of the University of Utah Computer
                      8:  * Science Department.
                      9:  *
                     10:  * Redistribution is only permitted until one year after the first shipment
                     11:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
                     12:  * binary forms are permitted provided that: (1) source distributions retain
                     13:  * this entire copyright notice and comment, and (2) distributions including
                     14:  * binaries display the following acknowledgement:  This product includes
                     15:  * software developed by the University of California, Berkeley and its
                     16:  * contributors'' in the documentation or other materials provided with the
                     17:  * distribution and in all advertising materials mentioning features or use
                     18:  * of this software.  Neither the name of the University nor the names of
                     19:  * its contributors may be used to endorse or promote products derived from
                     20:  * this software without specific prior written permission.
                     21:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     22:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     23:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     24:  *
                     25:  * from: Utah $Hdr: itereg.h 1.2 89/08/25$
                     26:  *
                     27:  *     @(#)itereg.h    7.1 (Berkeley) 5/8/90
                     28:  */
                     29: 
                     30: #define REGADDR                ip->regbase
                     31: #define FBBASE         ((volatile u_char *)ip->fbbase)
                     32: #define        FONTROM         ((u_char *)(REGADDR+0x3B))
                     33: #define ITEREGS                ((struct iteregs *)(REGADDR))
                     34: 
                     35: /*
                     36:  * All of the HP displays use the same font ROM setup. These structures
                     37:  * are used to get at them.
                     38:  */
                     39: 
                     40: struct iteregs {
                     41:        u_short reset;
                     42:        u_short interrupt;
                     43:        u_char  :8,
                     44:                fbwidth_h,
                     45:                :8,
                     46:                fbwidth_l,
                     47:                :8,
                     48:                fbheight_h,
                     49:                :8,
                     50:                fbheight_l,
                     51:                :8,
                     52:                dispwidth_h,
                     53:                :8,
                     54:                dispwidth_l,
                     55:                :8,
                     56:                dispheight_h,
                     57:                :8,
                     58:                dispheight_l;
                     59: };
                     60: 
                     61: struct fontinfo {
                     62:        u_char  nfonts, :8,
                     63:                fontid, :8,
                     64:                haddr,  :8,
                     65:                laddr,  :8;
                     66: };
                     67: 
                     68: struct font {
                     69:        u_char  fh,     :8,
                     70:                fw;
                     71:        u_char  pad[7],
                     72:                data[256];
                     73: };
                     74: 
                     75: #define draw_cursor(ip) { \
                     76:        WINDOWMOVER(ip, ip->cblanky, ip->cblankx, \
                     77:                    ip->cury * ip->ftheight, \
                     78:                    ip->curx * ip->ftwidth, \
                     79:                    ip->ftheight, ip->ftwidth, RR_XOR); \
                     80:         ip->cursorx = ip->curx; \
                     81:        ip->cursory = ip->cury; }
                     82: 
                     83: #define erase_cursor(ip) \
                     84:        WINDOWMOVER(ip, ip->cblanky, ip->cblankx, \
                     85:                    ip->cursory * ip->ftheight, \
                     86:                    ip->cursorx * ip->ftwidth, \
                     87:                    ip->ftheight, ip->ftwidth, RR_XOR);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.