PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
Framebuffer Abstraction

Framebuffer driver abstraction. More...

Collaboration diagram for Framebuffer Abstraction:

Detailed Description

Framebuffer driver abstraction.

Framebuffer devices are exposed as a /dev/fb/[id]/ directory, containing the following files:

Data Structures

struct  fb_t
 Framebuffer structure. More...
 

Typedefs

typedef void *(* fb_mmap_t) (fb_t *, void *, uint64_t, uint64_t *, pml_flags_t)
 Framebuffer mmap callback type.
 

Functions

fb_tfb_new (const fb_info_t *info, fb_mmap_t mmap)
 Allocate and initialize a framebuffer structure.
 
void fb_free (fb_t *fb)
 Free and deinitialize a framebuffer structure.
 

Typedef Documentation

◆ fb_mmap_t

typedef void *(* fb_mmap_t) (fb_t *, void *, uint64_t, uint64_t *, pml_flags_t)

Framebuffer mmap callback type.

Definition at line 27 of file fb.h.

Function Documentation

◆ fb_new()

fb_t * fb_new ( const fb_info_t info,
fb_mmap_t  mmap 
)

Allocate and initialize a framebuffer structure.

Will make the framebuffer available under /dev/fb/[id].

Parameters
infoPointer to the framebuffer information.
mmapFunction that user space will invoke to mmap the framebuffer.
Returns
On success, the new framebuffer structure. On failure, NULL and errno is set.

Definition at line 56 of file fb.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fb_free()

void fb_free ( fb_t fb)

Free and deinitialize a framebuffer structure.

Removes the framebuffer from /dev/fb/[id].

Parameters
fbPointer to the framebuffer structure to free.

Definition at line 111 of file fb.c.