44 if (chr ==
'\n' || chr <
' ')
208 for (
uint64_t i = 0; i < length; i++)
210 char chr =
string[i];
static const glyph_cache_t cache
const glyph_cache_t * glyph_cache_get(void)
#define SCREEN_WRAP_INDENT
Number of spaces to indent when a line wraps.
void log_screen_write(const char *string, uint64_t length)
Write a string to the screen.
uint64_t log_screen_get_width(void)
Get screen width in characters.
#define SCREEN_LINE_MAX_LENGTH
Maximum number of characters in a single line.
void log_screen_init(const boot_gop_t *bootGop)
Initialize the screen logging.
void log_screen_clear(void)
Clear the screen.
uint64_t log_screen_get_height(void)
Get screen height in characters.
#define SCREEN_LINE_STRIDE
The stride of a screen line in pixels.
#define LOCK_CREATE
Create a lock initializer. @macro LOCK_CREATE.
#define LOCK_SCOPE(lock)
Acquires a lock for the reminder of the current scope.
#define CONFIG_SCREEN_MAX_LINES
Maximum screen lines configuration.
static void log_screen_scroll(void)
static void log_screen_invalidate(const log_screen_pos_t *pos)
static log_screen_line_t * log_screen_get_line(uint64_t y)
static void log_screen_put(char chr)
static log_screen_pos_t cursor
static void log_screen_advance_cursor(char chr)
static log_screen_t screen
static void log_screen_flush(void)
_PUBLIC void * memset32(void *s, __UINT32_TYPE__ c, size_t n)
_PUBLIC void * memcpy(void *_RESTRICT s1, const void *_RESTRICT s2, size_t n)
_PUBLIC void * memset(void *s, int c, size_t n)
glyph_t glyphs[GLYPH_AMOUNT]
uint32_t pixels[GLYPH_HEIGHT *GLYPH_WIDTH]
A simple ticket lock implementation.
A single line in the screen buffer.
uint64_t length
The distance from the start of the line to the end of the furthest away char, in chars.
uint32_t pixels[GLYPH_HEIGHT *SCREEN_LINE_STRIDE]
The pixel data for the line.
Represents a position on the screen in character coordinates.
log_screen_pos_t invalidStart
The start of the invalid region in the buffer, forms a rectangle with invalidEnd.
log_screen_pos_t invalidEnd
The end of the invalid region in the buffer, forms a rectangle with invalidStart.
uint64_t height
The height of the buffer in chars.
log_screen_line_t lines[CONFIG_SCREEN_MAX_LINES]
The lines in the buffer, acts as a circular buffer.
uint64_t width
The width of the buffer in chars.
uint64_t firstLineIndex
The index of the first line in the buffer.