Lab2

vbe.h

00001 #ifndef __VBE_H
00002 #define __VBE_H
00003 
00016 typedef struct {
00017   /*  Mandatory information for all VBE revisions */
00018   u16_t ModeAttributes;         
00019   u8_t WinAAttributes;          
00020   u8_t WinBAttributes;          
00021   u16_t WinGranularity;         
00022   u16_t WinSize;                
00023   u16_t WinASegment;            
00024   u16_t WinBSegment;            
00025   phys_bytes WinFuncPtr;        
00026   u16_t BytesPerScanLine;       
00028   /* Mandatory information for VBE 1.2 and above */
00029 
00030   u16_t XResolution;            
00031   u16_t YResolution;            
00032   u8_t XCharSize;               
00033   u8_t YCharSize;               
00034   u8_t NumberOfPlanes;          
00035   u8_t BitsPerPixel;            
00036   u8_t NumberOfBanks;           
00037   u8_t MemoryModel;             
00038   u8_t BankSize;                
00039   u8_t NumberOfImagePages;      
00040   u8_t Reserved1;               
00042   /* Direct Color fields (required for direct/6 and YUV/7 memory models) */
00043   
00044   u8_t RedMaskSize;             /* size of direct color red mask in bits */
00045   u8_t RedFieldPosition;        /* bit position of lsb of red mask */
00046   u8_t GreenMaskSize;           /* size of direct color green mask in bits */
00047   u8_t GreenFieldPosition;      /* bit position of lsb of green mask */
00048   u8_t BlueMaskSize;            /* size of direct color blue mask in bits */
00049   u8_t BlueFieldPosition;       /* bit position of lsb of blue mask */
00050   u8_t RsvdMaskSize;            /* size of direct color reserved mask in bits */
00051   u8_t RsvdFieldPosition;       /* bit position of lsb of reserved mask */
00052   u8_t DirectColorModeInfo;     /* direct color mode attributes */
00053 
00054   /* Mandatory information for VBE 2.0 and above */
00055   phys_bytes PhysBasePtr;       
00056   u8_t Reserved2[4];            
00057   u8_t Reserved3[2];            
00059   /* Mandatory information for VBE 3.0 and above */
00060   u16_t LinBytesPerScanLine;    /* bytes per scan line for linear modes */
00061   u8_t BnkNumberOfImagePages;   /* number of images for banked modes */
00062   u8_t LinNumberOfImagePages;   /* number of images for linear modes */
00063   u8_t LinRedMaskSize;          /* size of direct color red mask (linear modes) */
00064   u8_t LinRedFieldPosition;     /* bit position of lsb of red mask (linear modes) */
00065   u8_t LinGreenMaskSize;        /* size of direct color green mask (linear modes) */
00066   u8_t LinGreenFieldPosition; /* bit position of lsb of green mask (linear  modes) */
00067   u8_t LinBlueMaskSize;         /* size of direct color blue mask (linear modes) */
00068   u8_t LinBlueFieldPosition;    /* bit position of lsb of blue mask (linear modes ) */
00069   u8_t LinRsvdMaskSize;         /* size of direct color reserved mask (linear modes) */
00070   u8_t LinRsvdFieldPosition;     /* bit position of lsb of reserved mask (linear modes) */
00071   u32_t MaxPixelClock;           /* maximum pixel clock (in Hz) for graphics mode */
00072   u8_t Reserved4[189];           /* remainder of ModeInfoBlock */
00073 } vbe_mode_info_t; 
00074 
00089 int vbe_get_mode_info(unsigned short mode, vbe_mode_info_t *vmi_p);
00090 
00093 #endif /* __VBE_H */
 All Data Structures Variables