Kevin O'Connor | 5108c69 | 2011-12-31 19:13:45 -0500 | [diff] [blame] | 1 | #ifndef __VGAHW_H |
| 2 | #define __VGAHW_H |
| 3 | |
| 4 | #include "types.h" // u8 |
| 5 | #include "config.h" // CONFIG_* |
| 6 | |
| 7 | #include "clext.h" // clext_set_mode |
| 8 | #include "bochsvga.h" // bochsvga_set_mode |
| 9 | #include "stdvga.h" // stdvga_set_mode |
Nils | 31eabf9 | 2012-01-14 12:11:41 -0500 | [diff] [blame] | 10 | #include "geodevga.h" // geodevga_init |
Kevin O'Connor | 5108c69 | 2011-12-31 19:13:45 -0500 | [diff] [blame] | 11 | |
| 12 | static inline int vgahw_set_mode(int mode, int flags) { |
| 13 | if (CONFIG_VGA_CIRRUS) |
| 14 | return clext_set_mode(mode, flags); |
| 15 | if (CONFIG_VGA_BOCHS) |
| 16 | return bochsvga_set_mode(mode, flags); |
| 17 | return stdvga_set_mode(mode, flags); |
| 18 | } |
| 19 | |
Kevin O'Connor | 161d201 | 2011-12-31 19:42:21 -0500 | [diff] [blame] | 20 | static inline int vgahw_init(void) { |
| 21 | if (CONFIG_VGA_CIRRUS) |
| 22 | return clext_init(); |
| 23 | if (CONFIG_VGA_BOCHS) |
| 24 | return bochsvga_init(); |
Nils | 24ddd86 | 2012-01-14 12:15:14 -0500 | [diff] [blame^] | 25 | if (CONFIG_VGA_GEODEGX2 || CONFIG_VGA_GEODELX) |
Nils | 31eabf9 | 2012-01-14 12:11:41 -0500 | [diff] [blame] | 26 | return geodevga_init(); |
Kevin O'Connor | 161d201 | 2011-12-31 19:42:21 -0500 | [diff] [blame] | 27 | return stdvga_init(); |
| 28 | } |
| 29 | |
Kevin O'Connor | 5108c69 | 2011-12-31 19:13:45 -0500 | [diff] [blame] | 30 | #endif // vgahw.h |