PatchworkOS  10941b4
A non-POSIX operating system.
Loading...
Searching...
No Matches
screen.c File Reference
#include <kernel/log/screen.h>
#include <kernel/drivers/com.h>
#include <kernel/init/boot_info.h>
#include <kernel/log/glyphs.h>
#include <kernel/log/panic.h>
#include <kernel/sync/lock.h>
#include <string.h>
#include <sys/math.h>
Include dependency graph for screen.c:

Go to the source code of this file.

Functions

static screen_line_tscreen_get_line (size_t y)
 
static void screen_invalidate (const screen_pos_t *pos)
 
static void screen_put (char chr)
 
static void screen_flush (void)
 
void screen_init (void)
 Initialize and enable the screen logging.
 
static void screen_scroll (void)
 
static void screen_advance_cursor (char chr)
 
void screen_hide (void)
 Hide the screen logging.
 
void screen_show (void)
 Show the screen logging.
 
uint64_t screen_get_width (void)
 Get screen width in characters.
 
uint64_t screen_get_height (void)
 Get screen height in characters.
 
void screen_write (const char *string, uint64_t length)
 Write a string to the screen.
 

Variables

static bool hidden = false
 
static boot_gop_t gop = {0}
 
static screen_pos_t cursor = {0, 0}
 
static uint32_t width
 
static uint32_t height
 
static uint64_t offset
 
static screen_pos_t invalidStart
 
static screen_pos_t invalidEnd
 
static screen_line_t lines [CONFIG_SCREEN_MAX_LINES]
 
static lock_t lock = LOCK_CREATE()
 

Function Documentation

◆ screen_get_line()

static screen_line_t * screen_get_line ( size_t  y)
static

Definition at line 26 of file screen.c.

Here is the caller graph for this function:

◆ screen_invalidate()

static void screen_invalidate ( const screen_pos_t pos)
static

Definition at line 32 of file screen.c.

Here is the caller graph for this function:

◆ screen_put()

static void screen_put ( char  chr)
static

Definition at line 51 of file screen.c.

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

◆ screen_flush()

static void screen_flush ( void  )
static

Definition at line 74 of file screen.c.

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

◆ screen_scroll()

static void screen_scroll ( void  )
static

Definition at line 114 of file screen.c.

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

◆ screen_advance_cursor()

static void screen_advance_cursor ( char  chr)
static

Definition at line 161 of file screen.c.

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

Variable Documentation

◆ hidden

bool hidden = false
static

Definition at line 12 of file screen.c.

◆ gop

boot_gop_t gop = {0}
static

Definition at line 14 of file screen.c.

◆ cursor

screen_pos_t cursor = {0, 0}
static

Definition at line 15 of file screen.c.

◆ width

uint32_t width
static

Definition at line 17 of file screen.c.

◆ height

uint32_t height
static

Definition at line 18 of file screen.c.

◆ offset

uint64_t offset
static

Definition at line 19 of file screen.c.

◆ invalidStart

screen_pos_t invalidStart
static

Definition at line 20 of file screen.c.

◆ invalidEnd

screen_pos_t invalidEnd
static

Definition at line 21 of file screen.c.

◆ lines

Definition at line 22 of file screen.c.

◆ lock

lock_t lock = LOCK_CREATE()
static

Definition at line 24 of file screen.c.