diff options
Diffstat (limited to 'share/man/man4/man4.hp300/rb.4')
-rw-r--r-- | share/man/man4/man4.hp300/rb.4 | 71 |
1 files changed, 27 insertions, 44 deletions
diff --git a/share/man/man4/man4.hp300/rb.4 b/share/man/man4/man4.hp300/rb.4 index 98ac4c926f4..101c5ed8534 100644 --- a/share/man/man4/man4.hp300/rb.4 +++ b/share/man/man4/man4.hp300/rb.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rb.4,v 1.5 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: rb.4,v 1.6 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,7 @@ .Nm rb .Nd .Tn HP98720 -``Renaissance'' device interface +``Renaissance'' frame buffer .Sh DESCRIPTION This driver is for the .Tn HP98720 @@ -83,7 +83,7 @@ Get Graphics Info Get info about device, setting the entries in the .Ar grfinfo structure, as defined in -.Aq Pa hpdev/grfioctl.h . +.Aq Pa machine/grfioctl.h . For the standard 98720, the number of planes should be 4. The number of colors would therefore be 15, excluding black. If one 98722A frame buffer board is installed, there will still @@ -108,10 +108,16 @@ are not affected. .It Dv GRFIOCMAP Map Device to user space .Pp -Map in control registers and framebuffer space. +Map in control registers and frame buffer space. Once the device file is mapped, the frame buffer structure is accessible. The structure describing the 98720 is defined in -.Pa hpdev/grf_rbreg.h . +.Aq Pa machine/grf_rbreg.h . +.El +.Sh FILES +.Bl -tag -width /dev/XXXX -compact +.It Pa /dev/grf? +.Ox +special file .El .Sh EXAMPLES This is a short segment of code showing how the device is opened and mapped @@ -122,56 +128,33 @@ u_char *Addr, frame_buffer; struct grfinfo gi; int disp_fd; -disp_fd = open("/dev/grf0",1); +disp_fd = open("/dev/grf0", O_WRONLY); -if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; +if (ioctl(disp_fd, GRFIOCGINFO, &gi) < 0) return -1; -(void) ioctl (disp_fd, GRFIOCON, 0); +ioctl(disp_fd, GRFIOCON, 0); -Addr = (u_char *) 0; -if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { - (void) ioctl (disp_fd, GRFIOCOFF, 0); +if (ioctl(disp_fd, GRFIOCMAP, &Addr) < 0) { + ioctl(disp_fd, GRFIOCOFF, 0); return -1; } -rbox = (rboxfb *) Addr; /* Control Registers */ -frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ +rbox = (rboxfb *)Addr; /* Control Registers */ +frame_buffer = (u_char *)Addr + gi.gd_regsize; /* Frame buffer memory */ .Ed -.Sh FILES -.Bl -tag -width /dev/MAKEDEV.hpux -compact -.It Pa /dev/grf? -.Bx -special file -.It Pa /dev/crt98720 -.It Pa /dev/ocrt98720 -.Tn HP-UX -.Em starbase -special files -.It Pa /dev/MAKEDEV.hpux -script for creating -.Tn HP-UX -special files -.El .Sh DIAGNOSTICS None under -.Bx . +.Ox . The .Tn HP-UX -.Tn CE.utilities -must be used. -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such device. -.It Bq Er EBUSY -Another process has the device open. -.It Bq Er EINVAL -Invalid ioctl specification. -.El +.Tn CE.utilities/Crtadjust +programs must be used. .Sh SEE ALSO .Xr ioctl 2 , -.Xr grf 4 -.Pp -For extensive code examples using the -Renaissance, see the X device dependent source. +.Xr dv 4 , +.Xr gb 4 , +.Xr grf 4 , +.\" .Xr hyper 4 , +.Xr intro 4 , +.Xr tc 4 .Sh BUGS Not tested for all configurations of scan board and frame buffer memory boards. |