aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Bothamy <cbothamy@users.sourceforge.net>2002-03-10 16:19:08 +0000
committerChristophe Bothamy <cbothamy@users.sourceforge.net>2002-03-10 16:19:08 +0000
commitf23a39807ba901fe9b39ece451c0d048c6f21f2c (patch)
tree04f7f1f86418ab8afacb0e186acb4a3d514e0853
parent39144e8a19f1bc16f2c0eaf3fd6c55ebaa7400e8 (diff)
downloadvgabios-f23a39807ba901fe9b39ece451c0d048c6f21f2c.tar.gz
- added vbe_has_vbe_display function that detects an attached vbe display
-rw-r--r--vbe.c10
-rw-r--r--vbe.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/vbe.c b/vbe.c
index 097e7c1..4acb259 100644
--- a/vbe.c
+++ b/vbe.c
@@ -127,6 +127,16 @@ MACRO HALT
MEND
#endasm
+/** Has VBE display - Returns true if VBE display detected
+ *
+ */
+Boolean vbe_has_vbe_display()
+{
+ outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ID);
+ outw(VBE_DISPI_IOPORT_DATA,VBE_DISPI_ID0);
+
+ return (inw(VBE_DISPI_IOPORT_DATA)==VBE_DISPI_ID0);
+}
/** VBE Init - Initialise the Vesa Bios Extension Code
*
diff --git a/vbe.h b/vbe.h
index e8e6cc9..8bde321 100644
--- a/vbe.h
+++ b/vbe.h
@@ -7,6 +7,7 @@
*
* See the function descriptions in vbe.c for more information
*/
+Boolean vbe_has_vbe_display();
void vbe_init();
void vbe_display_info();
void vbe_biosfn_return_controller_information(AX, ES, DI);
@@ -293,4 +294,4 @@ typedef struct ModeInfoBlock
#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
-#endif \ No newline at end of file
+#endif