Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 1 | /* |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 3 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 4 | * Copyright (C) 2007 Luc Verhaegen <libv@skynet.be> |
Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 5 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 10 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Luc Verhaegen | 5c5beb7 | 2009-05-29 03:04:16 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef VGA_IO_H |
| 18 | #define VGA_IO_H |
| 19 | |
| 20 | /* |
| 21 | * All IO necessary to poke VGA registers. |
| 22 | */ |
| 23 | |
| 24 | /* VGA Enable */ |
| 25 | unsigned char vga_enable_read(void); |
| 26 | void vga_enable_write(unsigned char value); |
| 27 | void vga_enable_mask(unsigned char value, unsigned char mask); |
| 28 | |
| 29 | /* Miscellaneous register */ |
| 30 | unsigned char vga_misc_read(void); |
| 31 | void vga_misc_write(unsigned char value); |
| 32 | void vga_misc_mask(unsigned char value, unsigned char mask); |
| 33 | |
| 34 | /* Sequencer registers. */ |
| 35 | unsigned char vga_sr_read(unsigned char index); |
| 36 | void vga_sr_write(unsigned char index, unsigned char value); |
| 37 | void vga_sr_mask(unsigned char index, unsigned char value, unsigned char mask); |
| 38 | |
| 39 | /* CR registers. */ |
| 40 | unsigned char vga_cr_read(unsigned char index); |
| 41 | void vga_cr_write(unsigned char index, unsigned char value); |
| 42 | void vga_cr_mask(unsigned char index, unsigned char value, unsigned char mask); |
| 43 | |
| 44 | /* Attribute registers. */ |
| 45 | unsigned char vga_ar_read(unsigned char index); |
| 46 | void vga_ar_write(unsigned char index, unsigned char value); |
| 47 | void vga_ar_mask(unsigned char index, unsigned char value, unsigned char mask); |
| 48 | |
| 49 | /* Graphics registers. */ |
| 50 | unsigned char vga_gr_read(unsigned char index); |
| 51 | void vga_gr_write(unsigned char index, unsigned char value); |
| 52 | void vga_gr_mask(unsigned char index, unsigned char value, unsigned char mask); |
| 53 | |
| 54 | /* DAC functions. */ |
| 55 | void vga_palette_enable(void); |
| 56 | void vga_palette_disable(void); |
| 57 | unsigned char vga_dac_mask_read(void); |
| 58 | void vga_dac_mask_write(unsigned char mask); |
| 59 | void vga_dac_read_address(unsigned char address); |
| 60 | void vga_dac_write_address(unsigned char address); |
| 61 | unsigned char vga_dac_data_read(void); |
| 62 | void vga_dac_data_write(unsigned char data); |
| 63 | |
| 64 | #endif /* VGA_IO_H */ |