PatchworkOS  c9fea19
A non-POSIX operating system.
Loading...
Searching...
No Matches
fb.h
Go to the documentation of this file.
1#ifndef _SYS_FB_H
2#define _SYS_FB_H 1
3
4#include <stdint.h>
5#include <sys/io.h>
6
7/**
8 * @brief Framebuffer device header.
9 * @ingroup libstd
10 * @defgroup libstd_sys_fb Framebuffer device
11 *
12 * The `sys/fb.h` header defines structs and constants used by framebuffer devices, for example `/dev/fb0`. The primary
13 * way to use a framebuffer device is to first use `IOCTL_FB_INFO` to retrieve its width and height, then factoring in
14 * its format to get the total size in bytes of the framebuffer and finally using `mmap` to map it to the currently
15 * running processes address space.
16 *
17 * @{
18 */
19
20/**
21 * @brief Framebuffer format enum.
22 *
23 * The `fb_format_t` enum specified the format of the pixel data in a framebuffer. All byte orders are specified in
24 * little-endian.
25 *
26 */
27typedef enum
28{
31
32/**
33 * @brief Framebuffer info struct.
34 *
35 * The `fb_info_t` struct stores information about a framebuffer and is retrieved by reading a `/dev/fb/[id]/info` file.
36 *
37 */
46
47#endif
48
49/** @} */
#define MAX_NAME
Maximum length of names.
Definition MAX_NAME.h:11
fb_format_t
Framebuffer format enum.
Definition fb.h:28
@ FB_ARGB32
Definition fb.h:29
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
Framebuffer info struct.
Definition fb.h:39
uint64_t width
Definition fb.h:40
fb_format_t format
Definition fb.h:43
uint64_t stride
Definition fb.h:42
uint64_t height
Definition fb.h:41