 |
Index for Section 9 |
|
 |
Alphabetical listing for V |
|
 |
Bottom of page |
|
video_on(9r)
NAME
video_on, video_off - Graphics: Turn video on and off
SYNOPSIS
int (*ws_color_map_functions->video_on)(
caddr_t colormap_handle );
int (*ws_color_map_functions->video_off)(
caddr_t colormap_handle );
ARGUMENTS
colormap_handle
Specifies the virtual address (handle) of device-specific information.
Typically this is a pointer to a private data structure that may
contain information such as the address of the hardware, state
information, and other information that may be shared between drivers.
The Workstation Subsystem allows separate handles for the cursor,
colormap, and the screen functions.
DESCRIPTION
The video_on function turns the video on and the video_off function turns
the video off, which may involve such things as saving and restoring a
number of colormap entries for the cursor and X clients as well as
accessing the graphics hardware specified by the colormap_handle parameter.
RETURN VALUES
If successful, the video_on and video_off functions return 0 (zero). If
unsuccessful, they return -1.
EXAMPLES
The following example shows how the myvga example driver implements the
video_on and video_off functions:
int
myvga_video_on(caddr_t colormap_handle)
{
register struct myvga_type *scp =
(struct myvga_type *)colormap_handle;
unsigned char state;
OUTB(MYVGA_SEQ_ADDRESS, 0x01);
state = INB(MYVGA_SEQ_DATA);
state &= 0xDF;
/*
* Turn on video in Clocking Mode register.
*/
OUTB(MYVGA_SEQ_ADDRESS, 0x01);
OUTB(MYVGA_SEQ_DATA, state); /* change mode */
return(0);
}
int
myvga_video_off(caddr_t colormap_handle)
{
register struct myvga_type *scp =
(struct myvga_type *)colormap_handle;
unsigned char state;
OUTB(MYVGA_SEQ_ADDRESS, 0x01);
state = INB(MYVGA_SEQ_DATA);
state |= 0x20;
/*
* Turn off video in Clocking Mode register.
*/
OUTB(MYVGA_SEQ_ADDRESS, 0x01);
OUTB(MYVGA_SEQ_DATA, state); /* change mode */
return(0);
}
FILES
/usr/sys/include/sys/workstation.h
/usr/sys/include/sys/wsdevice.h
SEE ALSO
Data Structures: ws_color_map_functions(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for V |
|
 |
Top of page |
|