| Index: include/dev/display.h
|
| diff --git a/include/dev/display.h b/include/dev/display.h
|
| index 451057374675ea8ab5e167910f36778195b8d6b5..6337d981cdef169acbb5211058f17043c37852ca 100644
|
| --- a/include/dev/display.h
|
| +++ b/include/dev/display.h
|
| @@ -35,30 +35,57 @@ int display_enable(bool enable);
|
| void display_pre_freq_change(void);
|
| void display_post_freq_change(void);
|
|
|
| -#define DISPLAY_FORMAT_NONE (-1)
|
| -#define DISPLAY_FORMAT_RGB_565 (0)
|
| -#define DISPLAY_FORMAT_RGB_332 (1)
|
| -#define DISPLAY_FORMAT_RGB_2220 (2)
|
| -#define DISPLAY_FORMAT_ARGB_8888 (3)
|
| -#define DISPLAY_FORMAT_RGB_x888 (4)
|
| -#define DISPLAY_FORMAT_RGB_x111 (5)
|
| -#define DISPLAY_FORMAT_MONO_1 (6)
|
| -#define DISPLAY_FORMAT_MONO_8 (7)
|
| +enum display_format {
|
| + DISPLAY_FORMAT_UNKNOWN,
|
| + DISPLAY_FORMAT_MONO_1,
|
| + DISPLAY_FORMAT_RGB_111,
|
| + DISPLAY_FORMAT_RGB_565,
|
| + DISPLAY_FORMAT_RGB_x888,
|
| + DISPLAY_FORMAT_ARGB_8888,
|
| +};
|
| +
|
| +enum image_format {
|
| + IMAGE_FORMAT_UNKNOWN,
|
| + IMAGE_FORMAT_MONO_1,
|
| + IMAGE_FORMAT_MONO_8,
|
| + IMAGE_FORMAT_RGB_x111,
|
| + IMAGE_FORMAT_RGB_332,
|
| + IMAGE_FORMAT_RGB_565,
|
| + IMAGE_FORMAT_RGB_2220,
|
| + IMAGE_FORMAT_RGB_x888,
|
| + IMAGE_FORMAT_ARGB_8888,
|
| +};
|
|
|
| struct display_info {
|
| - void *framebuffer;
|
| - int format;
|
| + enum display_format format;
|
| uint width;
|
| uint height;
|
| - uint stride;
|
| +};
|
| +
|
| +status_t display_get_info(struct display_info *info) __NONNULL((1));
|
|
|
| +struct display_image {
|
| + enum image_format format;
|
| + void *pixels;
|
| + uint width;
|
| + uint height;
|
| + int stride; // row length in pixels
|
| + int rowbytes; // row length in bytes
|
| +};
|
| +
|
| +status_t display_present(struct display_image *image, uint starty, uint endy)
|
| + __NONNULL((1));
|
| +
|
| +struct display_framebuffer {
|
| + enum display_format format;
|
| + struct display_image image;
|
| // Update function
|
| void (*flush)(uint starty, uint endy);
|
| };
|
|
|
| -status_t display_get_info(struct display_info *info);
|
| +status_t display_get_framebuffer(struct display_framebuffer *fb)
|
| + __NONNULL((1));
|
|
|
| __END_CDECLS
|
|
|
| #endif
|
| -
|
|
|