blob: fea041a2df0ed5bad1c510bb6fa1aa81cf5c6725 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef __VGAHW_H
#define __VGAHW_H
#include "types.h" // u8
#include "config.h" // CONFIG_*
#include "clext.h" // clext_set_mode
#include "bochsvga.h" // bochsvga_set_mode
#include "stdvga.h" // stdvga_set_mode
#include "geodevga.h" // geodevga_init
static inline int vgahw_set_mode(int mode, int flags) {
if (CONFIG_VGA_CIRRUS)
return clext_set_mode(mode, flags);
if (CONFIG_VGA_BOCHS)
return bochsvga_set_mode(mode, flags);
return stdvga_set_mode(mode, flags);
}
static inline int vgahw_init(void) {
if (CONFIG_VGA_CIRRUS)
return clext_init();
if (CONFIG_VGA_BOCHS)
return bochsvga_init();
if (CONFIG_VGA_GEODELX)
return geodevga_init();
return stdvga_init();
}
#endif // vgahw.h
|