]>
Commit | Line | Data |
---|---|---|
f1584bb0 JW |
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 | ||
5e4258d9 JW |
11 | #ifndef __FB_H |
12 | #define __FB_H | |
13 | ||
0a9d0188 JP |
14 | #include <stdint.h> |
15 | ||
5e4258d9 JW |
16 | struct fbdevice; |
17 | struct vmode; | |
18 | ||
19 | typedef enum { | |
20 | FB_RGB888 | |
21 | } format_t; | |
22 | ||
23 | typedef void (*getvmode_t)(void *); | |
0a9d0188 | 24 | typedef uint32_t (*checksum_rect_t)(int x, int y, int width, int height); |
66cd7e82 | 25 | typedef void (*copy_pixels_t)(char *buf, int x, int y, int width, int height); |
5e4258d9 JW |
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; | |
cdde55f5 | 35 | unsigned char *textbase; /* A safe place to put a textfb. */ |
5e4258d9 JW |
36 | void *priv; |
37 | getvmode_t getvmode; | |
0a9d0188 | 38 | checksum_rect_t checksum_rect; |
66cd7e82 | 39 | copy_pixels_t copy_pixels; |
5e4258d9 JW |
40 | struct vmode curmode; |
41 | }; | |
42 | ||
43 | extern struct fbdevice *fb; | |
44 | ||
45 | #endif |