]>
Commit | Line | Data |
---|---|---|
1 | /* fb.h | |
2 | * Framebuffer definitions | |
3 | * NetWatch system management mode administration console | |
4 | * | |
5 | * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. | |
6 | * This program is free software; you can redistribute and/or modify it under | |
7 | * the terms found in the file LICENSE in the root of this source tree. | |
8 | * | |
9 | */ | |
10 | ||
11 | #ifndef __FB_H | |
12 | #define __FB_H | |
13 | ||
14 | #include <stdint.h> | |
15 | ||
16 | struct fbdevice; | |
17 | struct vmode; | |
18 | ||
19 | typedef enum { | |
20 | FB_RGB888 | |
21 | } format_t; | |
22 | ||
23 | typedef void (*getvmode_t)(void *); | |
24 | typedef uint32_t (*checksum_rect_t)(int x, int y, int width, int height); | |
25 | typedef void (*copy_pixels_t)(char *buf, int x, int y, int width, int height); | |
26 | ||
27 | struct vmode { | |
28 | int text:1; | |
29 | int xres, yres, bytestride; | |
30 | format_t format; | |
31 | }; | |
32 | ||
33 | struct fbdevice { | |
34 | unsigned char *fbaddr; | |
35 | unsigned char *textbase; /* A safe place to put a textfb. */ | |
36 | void *priv; | |
37 | getvmode_t getvmode; | |
38 | checksum_rect_t checksum_rect; | |
39 | copy_pixels_t copy_pixels; | |
40 | struct vmode curmode; | |
41 | }; | |
42 | ||
43 | extern struct fbdevice *fb; | |
44 | ||
45 | #endif |