1 | /* |
---|
2 | * Copyright (c) 2000 - Rosimildo da Silva |
---|
3 | * |
---|
4 | * MODULE DESCRIPTION: |
---|
5 | * Micro FrameBuffer interface for Embedded Systems. |
---|
6 | * |
---|
7 | * $Id$ |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _MW_FB_H |
---|
11 | #define _MW_FB_H |
---|
12 | |
---|
13 | #include <stdint.h> |
---|
14 | |
---|
15 | #ifdef __cplusplus |
---|
16 | extern "C" { |
---|
17 | #endif |
---|
18 | |
---|
19 | /* ioctls |
---|
20 | 0x46 is 'F' */ |
---|
21 | #define FBIOGET_VSCREENINFO 0x4600 |
---|
22 | #define FBIOPUT_VSCREENINFO 0x4601 |
---|
23 | #define FBIOGET_FSCREENINFO 0x4602 |
---|
24 | #define FBIOGETCMAP 0x4604 |
---|
25 | #define FBIOPUTCMAP 0x4605 |
---|
26 | #define FB_EXEC_FUNCTION 0x4606 |
---|
27 | |
---|
28 | |
---|
29 | #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ |
---|
30 | #define FB_TYPE_PLANES 1 /* Non interleaved planes */ |
---|
31 | #define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ |
---|
32 | #define FB_TYPE_TEXT 3 /* Text/attributes */ |
---|
33 | #define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */ |
---|
34 | #define FB_TYPE_VIRTUAL_BUFFER 5 /* Virtual Buffer */ |
---|
35 | |
---|
36 | |
---|
37 | #define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ |
---|
38 | #define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ |
---|
39 | #define FB_VISUAL_TRUECOLOR 2 /* True color */ |
---|
40 | #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ |
---|
41 | #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ |
---|
42 | #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ |
---|
43 | |
---|
44 | #define FB_ACCEL_NONE 0 /* no hardware accelerator */ |
---|
45 | |
---|
46 | struct fb_bitfield { |
---|
47 | uint32_t offset; /* beginning of bitfield */ |
---|
48 | uint32_t length; /* length of bitfield */ |
---|
49 | uint32_t msb_right; /* != 0 : Most significant bit is */ |
---|
50 | /* right */ |
---|
51 | }; |
---|
52 | |
---|
53 | struct fb_var_screeninfo { |
---|
54 | uint32_t xres; /* visible resolution */ |
---|
55 | uint32_t yres; |
---|
56 | uint32_t bits_per_pixel; /* guess what */ |
---|
57 | struct fb_bitfield red; /* bitfield in fb mem if true color, */ |
---|
58 | struct fb_bitfield green; /* else only length is significant */ |
---|
59 | struct fb_bitfield blue; |
---|
60 | struct fb_bitfield transp; /* transparency */ |
---|
61 | }; |
---|
62 | |
---|
63 | struct fb_fix_screeninfo { |
---|
64 | volatile char *smem_start; /* Start of frame buffer mem */ |
---|
65 | /* (physical address) */ |
---|
66 | uint32_t smem_len; /* Length of frame buffer mem */ |
---|
67 | uint32_t type; /* see FB_TYPE_* */ |
---|
68 | uint32_t visual; /* see FB_VISUAL_* */ |
---|
69 | uint32_t line_length; /* number of chars per line */ |
---|
70 | }; |
---|
71 | |
---|
72 | struct fb_cmap { |
---|
73 | uint32_t start; /* First entry */ |
---|
74 | uint32_t len; /* Number of entries */ |
---|
75 | uint16_t *red; /* Red values */ |
---|
76 | uint16_t *green; |
---|
77 | uint16_t *blue; |
---|
78 | uint16_t *transp; /* transparency, can be NULL */ |
---|
79 | }; |
---|
80 | |
---|
81 | |
---|
82 | |
---|
83 | #ifdef __cplusplus |
---|
84 | } |
---|
85 | #endif |
---|
86 | |
---|
87 | #endif /* _MW_FB_H */ |
---|