- Timestamp:
- 2006-07-04T17:18:24Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0166e99
- Parents:
- 09087d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
r09087d2 rafbe96a 71 71 72 72 struct { 73 __u8*fbaddress ;73 uint8_t *fbaddress ; 74 74 75 75 unsigned int xres ; … … 95 95 int cursor_shown; 96 96 /* Double buffering */ 97 __u8*dbdata;97 uint8_t *dbdata; 98 98 unsigned int dboffset; 99 99 unsigned int paused; … … 121 121 unsigned int width; 122 122 unsigned int height; 123 __u8*data;123 uint8_t *data; 124 124 } pixmap_t; 125 125 static pixmap_t pixmaps[MAX_PIXMAPS]; … … 154 154 static void rgb_3byte(void *dst, int rgb) 155 155 { 156 __u8*scr = dst;156 uint8_t *scr = dst; 157 157 #if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN)) 158 158 scr[0] = RED(rgb, 8); … … 170 170 static int byte3_rgb(void *src) 171 171 { 172 __u8*scr = src;172 uint8_t *scr = src; 173 173 #if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN)) 174 174 return scr[0] << 16 | scr[1] << 8 | scr[2]; … … 182 182 { 183 183 /* 5-bit, 6-bits, 5-bits */ 184 *(( __u16*)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | BLUE(rgb, 5);184 *((uint16_t *)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | BLUE(rgb, 5); 185 185 } 186 186 … … 188 188 static int byte2_rgb(void *src) 189 189 { 190 int color = *( __u16*)(src);190 int color = *(uint16_t *)(src); 191 191 return (((color >> 11) & 0x1f) << (16 + 3)) | (((color >> 5) & 0x3f) << (8 + 2)) | ((color & 0x1f) << 3); 192 192 } … … 195 195 static void rgb_1byte(void *dst, int rgb) 196 196 { 197 *( __u8*)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);197 *(uint8_t *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3); 198 198 } 199 199 … … 201 201 static int byte1_rgb(void *src) 202 202 { 203 int color = *( __u8*)src;203 int color = *(uint8_t *)src; 204 204 return (((color >> 5) & 0x7) << (16 + 5)) | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); 205 205 } … … 377 377 * @param transparent If false, print background color 378 378 */ 379 static void draw_glyph(viewport_t *vport, __u8glyph, unsigned int sx, unsigned int sy,379 static void draw_glyph(viewport_t *vport,uint8_t glyph, unsigned int sx, unsigned int sy, 380 380 style_t style, int transparent) 381 381 {
Note:
See TracChangeset
for help on using the changeset viewer.