diff options
author | Christophe Bothamy <cbothamy@users.sourceforge.net> | 2002-03-10 16:19:08 +0000 |
---|---|---|
committer | Christophe Bothamy <cbothamy@users.sourceforge.net> | 2002-03-10 16:19:08 +0000 |
commit | f23a39807ba901fe9b39ece451c0d048c6f21f2c (patch) | |
tree | 04f7f1f86418ab8afacb0e186acb4a3d514e0853 | |
parent | 39144e8a19f1bc16f2c0eaf3fd6c55ebaa7400e8 (diff) | |
download | vgabios-f23a39807ba901fe9b39ece451c0d048c6f21f2c.tar.gz |
- added vbe_has_vbe_display function that detects an attached vbe display
-rw-r--r-- | vbe.c | 10 | ||||
-rw-r--r-- | vbe.h | 3 |
2 files changed, 12 insertions, 1 deletions
@@ -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 * @@ -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 |