64c62c7697632c0a3cffe9eb6a56774781436850
[coreboot.git] / src / include / pc80 / vga_io.h
1 /*
2  * Copyright (C)  2007  Luc Verhaegen <libv@skynet.be>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 2 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 51
16  * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18
19 #ifndef VGA_IO_H
20 #define VGA_IO_H
21
22 /*
23  * All IO necessary to poke VGA registers.
24  */
25
26 /* VGA Enable */
27 unsigned char vga_enable_read(void);
28 void vga_enable_write(unsigned char value);
29 void vga_enable_mask(unsigned char value, unsigned char mask);
30
31 /* Miscellaneous register */
32 unsigned char vga_misc_read(void);
33 void vga_misc_write(unsigned char value);
34 void vga_misc_mask(unsigned char value, unsigned char mask);
35
36 /* Sequencer registers. */
37 unsigned char vga_sr_read(unsigned char index);
38 void vga_sr_write(unsigned char index, unsigned char value);
39 void vga_sr_mask(unsigned char index, unsigned char value, unsigned char mask);
40
41 /* CR registers. */
42 unsigned char vga_cr_read(unsigned char index);
43 void vga_cr_write(unsigned char index, unsigned char value);
44 void vga_cr_mask(unsigned char index, unsigned char value, unsigned char mask);
45
46 /* Attribute registers. */
47 unsigned char vga_ar_read(unsigned char index);
48 void vga_ar_write(unsigned char index, unsigned char value);
49 void vga_ar_mask(unsigned char index, unsigned char value, unsigned char mask);
50
51 /* Graphics registers. */
52 unsigned char vga_gr_read(unsigned char index);
53 void vga_gr_write(unsigned char index, unsigned char value);
54 void vga_gr_mask(unsigned char index, unsigned char value, unsigned char mask);
55
56 /* DAC functions. */
57 void vga_palette_enable(void);
58 void vga_palette_disable(void);
59 unsigned char vga_dac_mask_read(void);
60 void vga_dac_mask_write(unsigned char mask);
61 void vga_dac_read_address(unsigned char address);
62 void vga_dac_write_address(unsigned char address);
63 unsigned char vga_dac_data_read(void);
64 void vga_dac_data_write(unsigned char data);
65
66 #endif /* VGA_IO_H */