Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:13

0001 /** 
0002  * @file
0003  *
0004  * @brief Frame Buffer Device Driver
0005  *
0006  * This file defines the interface to a frame buffer device driver.
0007  */
0008 
0009 /*
0010  * Copyright (c) 2000 - Rosimildo da Silva
0011  */
0012 
0013 #ifndef _MW_FB_H
0014 #define _MW_FB_H
0015 
0016 #include <stdint.h>
0017 
0018 /**
0019  * @defgroup libmisc_fb Frame Buffer Device Driver Interface
0020  *
0021  * @ingroup RTEMSDeviceDrivers
0022  */
0023 /**@{*/
0024 
0025 #ifdef  __cplusplus
0026 extern "C" {
0027 #endif
0028 
0029 /* ioctls
0030    0x46 is 'F'                                */
0031 #define FBIOGET_VSCREENINFO 0x4600
0032 #define FBIOPUT_VSCREENINFO 0x4601
0033 #define FBIOGET_FSCREENINFO 0x4602
0034 #define FBIOGETCMAP     0x4604
0035 #define FBIOPUTCMAP     0x4605
0036 #define FB_EXEC_FUNCTION    0x4606
0037 #define FBIOSWAPBUFFERS         0x4607
0038 #define FBIOSETBUFFERMODE       0x4608
0039 #define FBIOSETVIDEOMODE    0x4609
0040 
0041 #define FB_SINGLE_BUFFERED  0
0042 #define FB_TRIPLE_BUFFERED  1
0043 
0044 #define FB_TYPE_PACKED_PIXELS          0    /* Packed Pixels    */
0045 #define FB_TYPE_PLANES                 1    /* Non interleaved planes */
0046 #define FB_TYPE_INTERLEAVED_PLANES     2    /* Interleaved planes    */
0047 #define FB_TYPE_TEXT                   3    /* Text/attributes    */
0048 #define FB_TYPE_VGA_PLANES             4    /* EGA/VGA planes    */
0049 #define FB_TYPE_VIRTUAL_BUFFER         5    /* Virtual Buffer */
0050 
0051 
0052 #define FB_VISUAL_MONO01               0    /* Monochr. 1=Black 0=White */
0053 #define FB_VISUAL_MONO10               1    /* Monochr. 1=White 0=Black */
0054 #define FB_VISUAL_TRUECOLOR            2    /* True color    */
0055 #define FB_VISUAL_PSEUDOCOLOR          3    /* Pseudo color (like atari) */
0056 #define FB_VISUAL_DIRECTCOLOR          4    /* Direct color */
0057 #define FB_VISUAL_STATIC_PSEUDOCOLOR   5    /* Pseudo color readonly */
0058 
0059 #define FB_ACCEL_NONE                  0    /* no hardware accelerator    */
0060 
0061 struct fb_bitfield {
0062     uint32_t offset;        /* beginning of bitfield    */
0063     uint32_t length;        /* length of bitfield       */
0064     uint32_t msb_right;     /* != 0 : Most significant bit is */
0065                     /* right */
0066 };
0067 
0068 struct fb_var_screeninfo {
0069     uint32_t xres;                  /* visible resolution        */
0070     uint32_t yres;
0071     uint32_t bits_per_pixel;        /* guess what            */
0072     struct fb_bitfield red;     /* bitfield in fb mem if true color, */
0073     struct fb_bitfield green;       /* else only length is significant */
0074     struct fb_bitfield blue;
0075     struct fb_bitfield transp;      /* transparency         */
0076 };
0077 
0078 struct fb_fix_screeninfo {
0079     volatile char *smem_start;  /* Start of frame buffer mem  */
0080                                 /* (physical address)         */
0081     uint32_t smem_len;          /* Length of frame buffer mem */
0082     uint32_t type;              /* see FB_TYPE_*              */
0083     uint32_t visual;            /* see FB_VISUAL_*            */
0084     uint32_t line_length;       /* number of chars per line */
0085 };
0086 
0087 struct fb_cmap {
0088     uint32_t start;                /* First entry    */
0089     uint32_t len;                  /* Number of entries */
0090     uint16_t *red;                 /* Red values    */
0091     uint16_t *green;
0092     uint16_t *blue;
0093     uint16_t *transp;              /* transparency, can be NULL */
0094 };
0095 
0096 #ifdef  __cplusplus
0097 }
0098 #endif
0099 /**@}*/
0100 
0101 #endif /* _MW_FB_H */